Skip to content

fix(chat): translate the live run-status indicator copy - #5545

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/run-status-copy-i18n-w4
Aug 1, 2026
Merged

fix(chat): translate the live run-status indicator copy#5545
pedrofrxncx merged 1 commit into
mainfrom
fix/run-status-copy-i18n-w4

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Source: bug found while auditing the chat hot-reload/resilience area (apps/web/src/components/chat/) — not tied to a specific issue.

Payoff: RUN_STATUS_COPY in run-status.ts hardcoded the label/detail for all 10 run-status stages ("Sending your message", "Message received", "Waiting to start", ... rendered live in RunStatusIndicator via thinking-indicator.tsx) directly in English, bypassing the i18n layer the rest of the chat UI uses. Every pt-br user watching a run progress saw English text mixed into an otherwise-translated chat surface — this is the same class of hardcoded-string bug as the repo's recurring i18n merge lane (#5099, #5373, #5479, etc).

Fix: moved the 20 strings into i18n/en/chat.ts / i18n/pt-br/chat.ts under chat.runStatus.*, and replaced the static RUN_STATUS_COPY record with getRunStatusCopy(t, stage), a pure helper that takes the TFunction and returns the translated { label, detail } — called from RunStatusIndicator (which already has t = useT()) instead of indexing the old hardcoded map. No behavior change for non-translation logic (advanceRunStatusStage, parseRunStatusStageChunk, etc. are untouched).

Verify:

  • cd apps/web && bunx tsc --noEmit (also proves en/pt-br key parity via the satisfies Record<keyof typeof chatEn, string> check on the pt-br dictionary)
  • bun test apps/web/src/components/chat/run-status.test.ts — updated to call getRunStatusCopy(translate, stage) instead of indexing the old static map; still asserts the exact copy for waiting-runner / analyzing-scope
  • bunx oxlint on all 5 changed files: 0 warnings/errors
  • bun run fmt — clean

CI runs the full suite; these are the targeted checks covering this change.


Summary by cubic

Localized the live run-status indicator by moving hardcoded English strings into i18n and using getRunStatusCopy(t, stage), fixing mixed-language UI for pt-br users with no logic changes.

  • Bug Fixes
    • Added chat.runStatus.* keys to i18n/en/chat.ts and i18n/pt-br/chat.ts for all 10 stages (label + detail).
    • Replaced RUN_STATUS_COPY with getRunStatusCopy(t, stage) and updated RunStatusIndicator to use it.
    • Updated tests to call getRunStatusCopy with translate and assert expected copy.

Written for commit f290547. Summary will update on new commits.

Review in cubic

The 10 run-status stages (sending, received, waiting-runner, ...) rendered
their label/detail directly from hardcoded English strings in run-status.ts,
bypassing i18n entirely — every pt-br user saw English text while a run was
in flight.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Re-trigger cubic

@pedrofrxncx
pedrofrxncx merged commit c64c83c into main Aug 1, 2026
26 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/run-status-copy-i18n-w4 branch August 1, 2026 02:01
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