Skip to content

refactor: use static toast label keys - #2627

Merged
Chris0Jeky merged 1 commit into
mainfrom
issue-1991/toast-label-map
Sep 5, 2026
Merged

refactor: use static toast label keys#2627
Chris0Jeky merged 1 commit into
mainfrom
issue-1991/toast-label-map

Conversation

@Chris0Jeky

Copy link
Copy Markdown
Owner

Refs #1991

Summary

  • Replace PaperToastContainer's runtime-assembled toast translation key with an exhaustive static Record<ToastLabel, string>.
  • Preserve all existing label text, severity tones, and locale behavior.

Verification

  • PaperToastContainer.spec.ts: 23/23
  • Frontend typecheck: passed
  • File-scoped ESLint: passed
  • Exhaustiveness mutation: removing the ailed entry produced TypeScript TS2741; the map was restored and the focused suite returned to 23/23.
  • git diff --check: passed

Two coordinator review passes completed for contract correctness and scope/regression quality.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Chris0Jeky

Copy link
Copy Markdown
Owner Author

CI note (coordinator, 2026-09-05): the only red at head 28890ff was Backend Unit (windows-latest) in run 33941869440: Taskdeck.Application.Tests.Services.ArtefactExtractionServiceTests.ExtractAsync_ShouldPropagateCallerCancellationWithoutRecording failed after 5 s. This PR changes one Vue component and no backend file, so the failure cannot come from the diff; it is a backend cancellation-propagation timing case on the Windows runner with no tracked issue yet. One diagnostic rerun of the failed job started; the flake gets its own issue once the rerun result is in.

@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Review gate (Codex review credits exhausted, SC-9; D-12 ruled 2026-09-05: the Codex session's PRs are reviewed and merged by the coordinator): one fresh-context read-only reviewer (Opus 5) on head 28890ff63. Verdict: SHIP.

Checked by reading: the ToastLabel union (store/toastStore.ts:30-38) has exactly eight members and TOAST_LABEL_KEYS maps all eight and no extras, so Record<ToastLabel, string> is exhaustive (a missing member is TS2741); all eight toast.label.* children exist in locales/{en,es,it}/shell.ts; the removed template-key line produced byte-identical keys for every reachable input, so no behavior change; the existing spec resolves real messages for all four explicit labels, all four severity fallbacks and one non-English locale, so a wrong key string would fail the suite; one file, +13/-1, no drive-by edits.

Findings and disposition:

  • LOW, PaperToastContainer.vue:90-100: the doc comment calls each entry a "checked catalog key", but the value type is plain string, so TypeScript only checks member presence, not catalog existence. Tracked on #1991; no code change owed for merge.

Issue disposition: slice of #1991 (the runtime-assembled i18n key item only); the board-scoped eyebrow divergence, unreserved applied label and refusal-toast stamping residuals stay open.

@Chris0Jeky
Chris0Jeky merged commit 6d34e36 into main Sep 5, 2026
51 of 52 checks passed
@github-project-automation github-project-automation Bot moved this from Pending to Done in Taskdeck Execution Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant