Repository navigation
fix(console): remove machine-value text leaks from reachable UI (M01-M07, P01-P07) - #1024
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fourteen display leaks (M01–M07 inherited, P01–P07 cockpit) rendered raw source IDs, execution modes, enrollment enums, dotted i18n keys, control/operation/pause/restriction reasons, audit action/outcome/subject kinds and policy keys/sources/units as visible machine text (or in
titleattributes).Resulting behaviour
translategains an optional explicitfallbackKeyand resolves: key → fallback → namespace fallback →common.unknown, via own-property lookups only. A missing key can never return the key itself.未知操作,其他参数,执行模式未知,结果未知,其他对象,来源未知,市场状态影响未知,操作结果待确认,当前不支持该操作, …). Raw codes survive only in non-visualdata-*diagnostics; free-form reasons are fully suppressed (never in DOM,titleoraria-label).AuditEvent.subjectbecomes{ kind, id }(adapter splits legacy"kind: id"strings; no wire/schema change); revision copy is记录修订 {value}/Record revision {value};45 percentrenders45%, unknown units are omitted.Checks actually run (on
feat/cockpit-frontend-redesignhead + this branch,npm ci)tsc --noEmit: pass ·npm run build(tsc + vite + size budget): passnpm run test:operations(incl. extendedconsole_cockpit_decision_validation.mjsand newconsole_frontend_i18n_validation.mjs, registered in the chain): passnode --experimental-strip-types ../../../tests/initial_enrollment_ui_validation.mjs(extended for M02–M04/M07): PASSconsole_v2_i18n_validation.mjs: PASS (1416 locale entries, zh/en parity) ·console_display_gaps_validation.mjs: PASSImplemented from the audit plan in
inputs/plan.md. Note: the plan's #1019 head (ef4e0d3) has diverged from this base; the readback validation it references exists only there, so P01/P02 coverage was folded into the new i18n validation file.AI assistance
Qwen via the Qoder CLI performed the implementation assistance for this branch; the audit/repair plan behind it was drafted with Kimi.
What changed
Frontend display-leak cleanup on this branch, including commits
c0fb1178and812f5679: localized unknown audit change-log outcomes and tier labels through i18n (unknown values now render safe zh/en fallbacks instead of raw machine text), and regeneratedv2_asset_map.jsfrom the current build. See "Resulting behaviour" above for the full scope.How verified
All checks below ran to completion on this branch (no check was skipped or unrunnable):
npm run build: passnpm run sync:v2-assets: pass (regeneratedv2_asset_map.jsmatches the committed output)console_frontend_i18n_validation.mjs: pass (registered in and exercised by the operations chain)npm run test:operations: passAdditional evidence for the earlier leak cleanup is listed under "Checks actually run" above.