Skip to content

fix(macos): refresh inspector when locale changes - #523

Merged
jasoncavinder merged 9 commits into
devfrom
fix/v020-activity-inspector-locale-refresh
Aug 21, 2026
Merged

jasoncavinder merged 9 commits into
devfrom
fix/v020-activity-inspector-locale-refresh

Conversation

@jasoncavinder

@jasoncavinder jasoncavinder commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • refresh every selected Inspector branch when Helm's effective locale changes without replacing the Inspector subtree or discarding descendant state
  • resolve retained task labels, fallback descriptions, diagnostics, and package unknown versions at presentation time; keep localized placeholders out of mutation and identity paths
  • record the exact Task 4 QA provenance and keep unverified presentation/focus continuity explicit

Validation

  • .opencode/skills/run-quality-gate/scripts/run-quality-gate.sh ui — 301 tests passed, 0 failures
  • focused locale/state/task/package suites — 31 tests passed, 0 failures
  • swiftlint lint --strict --no-cache --reporter xcode — 0 violations across 111 files
  • .opencode/skills/docs-sync/scripts/docs-sync-check.sh
  • .opencode/skills/run-quality-gate/scripts/run-quality-gate.sh release-contracts
  • Xcode project lint and git diff --check

Owner QA and evidence scope

  • the broad static Task 4 Activity/recovery matrix ran on base 42c64760 in the isolated whole-workflow fixture
  • a corrected pre-commit snapshot whose changed source blobs were later committed unchanged as c1f7daf verified German → System Default visible-content refresh and the documented approximately +40% text reachability check
  • the full matrix was not rerun on c1f7daf; the independent-review regression covers stable structural identity, representative state/presentation-state preservation, and no child appear/disappear
  • real sheet/popover continuity, Inspector scroll position, keyboard first responder, and VoiceOver focus continuity remain open for production integration or owner retest

Safety

  • the QA fixture blocked service startup, database-backed snapshots, network/updater traffic, and package mutation
  • no production data, installed Helm bundle, release, appcast, or website was modified

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Deploying helm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a2168bb
Status: ✅  Deploy successful!
Preview URL: https://4bf32cb7.helm-6xn.pages.dev
Branch Preview URL: https://fix-v020-activity-inspector.helm-6xn.pages.dev

View logs

@jasoncavinder

Copy link
Copy Markdown
Owner Author

Independent review at c1f7daf790a0eee434ef2a449902616c0bb34754 found two issues:

  1. [P2] Preserve the selected Inspector's state when the locale changes. apps/macos-ui/Helm/Views/InspectorViews.swift:122 applies .id(context.localeRevision) to the entire Inspector ScrollView. Every effective language change therefore replaces the complete subtree and discards descendant @State: Task 4 recovery review/copy state, task diagnostics and log loading, package uninstall preview/alerts, and manager install/uninstall/post-setup options and in-flight guards. It also resets scroll, keyboard focus, and VoiceOver position. A language change from the independent Settings window can dismiss an active review or configuration sheet while its async work continues against the discarded view state; an in-flight guard can visibly reset before the underlying submission returns. The added test only counts generic probe renders and revision values, so it passes if the production .id line is removed and cannot detect this regression. Keep structural identity stable and make each selected detail branch depend on the locale revision as a normal input (or equivalent observation), then add a state-continuity regression that proves localized content refreshes without dismissing/resetting representative Inspector state.

  2. [P2] Split and identify the Task 4 QA evidence instead of presenting it as one corrected-build matrix. docs/validation/v0.20-wayfinder-popover-research-readiness.md:97,148-153,163 closes the complete current-host/live-locale matrix without naming a source revision. The retained artifacts show two distinct runs: the broad Task 4 matrix used the base 42c64760 build, while the locale correction and text-expansion checks used a source-equivalent pre-commit snapshot of the three blobs later committed as c1f7daf (built at 15:41 HST; the commit was created at 15:54). That distinction matters because the locale correction introduces the state/focus regression above. Record the exact base/corrected provenance separately, limit the corrected-build claim to what was actually rechecked, and keep live-locale state/focus continuity open until the remediation has regression evidence (or is manually retested).

I will remediate both findings and post a follow-up with the exact commits and validation results.

@jasoncavinder

Copy link
Copy Markdown
Owner Author

One additional independent finding surfaced while tracing every Inspector branch:

  1. [P2] A retained production task title still does not relocalize. apps/macos-ui/Helm/Core/HelmCore+Fetching.swift:189-205 resolves each task's labelKey/labelArgs into TaskItem.description only when the task snapshot is fetched. InspectorTaskDetailView then renders that immutable string at InspectorViews.swift:261 and passes it into diagnostics at line 366; TaskRowView does the same for the Activity row and accessibility label. Rebuilding the view around the same TaskItem therefore updates surrounding labels/status but leaves the task title and diagnostic description in the old language until another backend poll/refetch happens. Resolve retained label metadata at presentation time (with the stored description only as the unstructured fallback), use that value consistently in the row/Inspector/diagnostics, and add a retained-task locale regression that does not refetch or reselect.

I am including this in the remediation already underway.

@jasoncavinder

Copy link
Copy Markdown
Owner Author

Additional exact-SHA findings after integrating the first remediation:

  • [P2] Retained package/task fallback text can still remain in the previous locale. Package snapshots store a localized unknown version while the Inspector recognizes only English plus the locale captured by a one-time static token set. Nil-label task records, queued manager placeholders, and local manager failures likewise retain a prelocalized description; rebuilding the row/Inspector after a locale pulse still returns that old string. A nonempty missing task label key also renders the localization sentinel/raw key instead of the retained description. Please keep absence/fallback facts locale-neutral or retain a live-localizable descriptor, make missing-key lookup fall back explicitly, and cover retained package plus nil/missing-label task paths across a locale change.

  • [P2] The updated readiness text overstates the automated continuity evidence. The regression proves stable structural identity, representative @State/@StateObject and Boolean presentation-state preservation, and no child appear/disappear. It does not mount the production Inspector, a real sheet/popover, the Inspector ScrollView, keyboard first responder, or VoiceOver focus. Narrow CURRENT_STATE/NEXT_STEPS/readiness to the evidence actually collected and leave real presentation, scroll, keyboard-focus, and VoiceOver-focus continuity open until production integration or owner validation covers them.

I am remediating both items in this review branch and will post the exact validation results in the follow-up.

@jasoncavinder

Copy link
Copy Markdown
Owner Author

One final package-version seam was found while auditing the fallback remediation:

  • [P1/P2] Localized unknown placeholders can escape into semantic and mutation paths. The new central package identity policy recognizes all supported localized placeholders, but Pin/Unpin still strips only exact English unknown; a retained inconnu/unbekannt value can therefore be sent to the service as a real version selector. Library row projection, description lookup, and package-action identity also use narrower duplicate checks. I am routing these consumers through the same canonical known-version policy and adding localized-placeholder mutation/identity regressions before the follow-up.

@jasoncavinder

Copy link
Copy Markdown
Owner Author

Follow-up: all independent-review findings are remediated in final head 4932cc2ded8a7448e325601bb1e0daf5e9c55332.

What changed:

  • Replaced the whole-Inspector .id(localeRevision) reset with an ordinary locale-refresh dependency, preserving structural identity and descendant state while every selected detail branch redraws localized content.
  • Added mounted lifecycle/state regressions and presentation-time resolution for retained task labels, nil/missing-label fallbacks, Task rows, Inspector content, and diagnostics/export.
  • Centralized package-version absence semantics across all seven locales so localized unknown placeholders are presentation-only and never become Pin/Unpin selectors, identity qualifiers, Library versions, or description-matching tokens.
  • Added a complete live catalog_sync descriptor carrying its typed manager argument.
  • Split the Task 4 QA provenance between the broad base-build matrix and the bounded source-equivalent locale/text-expansion recheck; narrowed automation claims to the state/lifecycle behavior actually tested. Real sheet/popover, scroll, keyboard-first-responder, and VoiceOver-focus continuity remain explicitly open for owner/production retest.

Verification at the final SHA:

  • full UI quality gate: 301 passed, 0 failed
  • focused locale/state/task/package suites: 31 passed, 0 failed
  • strict SwiftLint: 0 violations across 111 files
  • i18n integrity, length, and seven-locale mirror checks passed
  • docs-sync and release-contract gates passed
  • Xcode project lint and full-range git diff --check passed
  • fresh independent code and docs/tests re-audits found no remaining actionable issue

The PR body now reflects the exact evidence boundaries and final validation. PR #523 is ready for merging from this review; fresh GitHub checks may continue in parallel.

@jasoncavinder
jasoncavinder merged commit d6c2d4b into dev Aug 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant