Skip to content

fix(mobile-page): keep the terminal mock in English - #50433

Merged
nwparker merged 1 commit into
stablyai:mainfrom
x-Ai:fix/mobile-page-terminal-mock
Nov 27, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
x-Ai:fix/mobile-page-terminal-mock

Conversation

@x-Ai

@x-Ai x-Ai commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The Mobile page shows a picture of a phone running a terminal session. That picture's text went through the translation system, so in Chinese the "terminal" showed translated code: feat/mobile-page became 壮举/手机页面, PASS became 经过, and the Tab / Esc keys became 选项卡 / Esc键. A real terminal is never translated, so the mock now stays in English while the phone's own buttons and labels stay translated.

What Changed

  • Before: in non-English locales, the terminal mock in TerminalSlide (worktree name, tab labels, prompt, tool-call transcript, test output, agent reply, accessory key caps) rendered translated strings via t().
  • After: those strings are module-level English constants (WORKTREE, TABS, TRANSCRIPT, ACCESSORY_KEYS) with a short comment saying why they must not go through t(). The accessory keys render from one array. The agent reply is now one paragraph that wraps at the frame width instead of three hard-split lines.
  • The 23 keys nothing reads any more are removed from en.json and all ten other renderer locales, plus the matching entries in config/scripts/locale-catalog/locale-ko-key-overrides.json.
  • The phone chrome around the mock (Back, the "2 terminals · claude active" status line, the input placeholder, Paste) is unchanged and still translated, because that part is Orca's own UI.

Why

Translating terminal output misrepresents what the phone actually shows: Orca mirrors the desktop terminal byte-for-byte, so a Chinese user would see English output in reality. 壮举 is "feat" as in "achievement", so the translated mock was nonsense. Making the strings constants, rather than marking them do-not-translate in every catalog, removes the dead keys too and leaves nothing for future translation passes to get wrong.

Linked Issue

Refs #32207 (part of the localization effort; does not close it).

Visual Proof

Mobile page › terminal mock, Chinese locale:

Before (main) After (this PR)
before zh after zh

English locale (unchanged apart from the reply wrapping as one paragraph):

Before (main) After (this PR)
before en after en

Testing

  • Rendered the TerminalSlide component fixture in English and Chinese before and after the change (screenshots above, macOS).

  • Localization verifiers all pass on the rebased commit: verify:localization-catalogs, verify:localization-catalog, verify:localization-runtime-catalog, verify:localization-protected-copy, verify:localization-extraction (0 inline defaults differ from en.json), verify:localization-coverage.

  • CI static gates on the touched file pass: anti-slop oxlint, code-quality native plugins, ast-grep, the changed-code quality gate, and oxfmt --check on all 13 files.

  • No new automated test: the change is static mock copy and catalog removals, which the localization verifiers above cover (they reject unused or missing keys).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None, because this only runs when the Mobile page's static mock renders, and it replaces 23 t() lookups per render with module-level constants (slightly less work). Removing 23 keys from each locale also shrinks the catalogs a little. No hot path, I/O, polling, or subprocess work is touched.

Risk

Level: Low

  • Affects only the decorative terminal mock on the Mobile page. Worst case is a visual difference in that mock.
  • Back out with a plain revert.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Original fix by @x-Ai in #50433 (rebased and squashed onto current main; authorship preserved).

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile terminal slide now renders its mock worktree title, tabs, transcript, and accessory keys from local constants. The transcript reply appears on one line. Locale entries retain interface labels and remove mock transcript strings.

Merge Risk: Minimal · up to 4cb13

The Mobile page's simulated terminal now shows English mock content, while the surrounding phone UI stays translated. The removed locale strings are no longer referenced and the remaining keys resolve in every catalog. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the mobile terminal mock's text stays in English instead of going through translation. It uses the conventional fix(scope) prefix and is specific enough for a teammate…
Description check Passed The description follows the template closely. It has an ELI5 section, What Changed, Why, Linked Issue, Visual Proof with before and after images, Testing, Performance, Risk with a level, AI Disclosure…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the mobile terminal mock's text stays in English instead of going through translation. It uses the conventional fix(scope) prefix and is specific enough for a teammate scanning history. The changeset matches it: TerminalSlide.tsx swaps t() calls for English constants, and the 23 mock keys are removed from en.json and the other locales.

Full details: Description check

Explanation

The description follows the template closely. It has an ELI5 section, What Changed, Why, Linked Issue, Visual Proof with before and after images, Testing, Performance, Risk with a level, AI Disclosure, the upstream boundary checkbox, and Notes. The explanation of the change is clear, and the risk and rollback are stated. The Linked Issue cites #32207 as a partial reference, not a 'Fixes' link, which the template asks for from outside contributors. The Checklist section is not present. The remaining gaps are minor, so the check passes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e07fb3ce-f04e-489b-ba60-02fe46c200de
Commits

Reviewing files that changed from the base of the PR and between e76c629 and 4cb1378.

Files selected for processing: 2

  • config/scripts/locale-catalog/locale-ko-key-overrides.json
  • src/renderer/src/i18n/locales/en.json
Files with no reviewable changes: 2

  • config/scripts/locale-catalog/locale-ko-key-overrides.json
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

The Mobile page's phone mock renders a terminal session. Its worktree
name, tab labels, transcript, test output and key caps went through t(),
so locales translated code and terminal output (feat/mobile-page became
壮举/手机页面, PASS became 经过). The phone never translates a real
terminal session, so these strings are now English constants and their
23 now-unused keys are removed from every renderer locale and the Korean
override catalog. The surrounding phone chrome stays translated.

Refs stablyai#32207

Co-authored-by: Neil <[email protected]>
@nwparker
nwparker force-pushed the fix/mobile-page-terminal-mock branch from e76c629 to 4cb1378 Compare November 27, 2026 05:31
@nwparker
nwparker merged commit 51714f9 into stablyai:main Nov 27, 2026
55 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.

2 participants