Skip to content

refactor(i18n): reactive translate in terminal pane, tab bar and work-item dialogs - #39418

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/i18n-reactive-translate-terminal-tabs-github
Nov 8, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/i18n-reactive-translate-terminal-tabs-github

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a batch of the reactive-translate rollout from #39353. It applies pnpm i18n:reactive-translate --helpers to terminal pane, tab bar and work-item dialogs:

  • components/terminal-pane
  • components/tab-bar
  • components/github-item-dialog
  • components/github-project

Codemod result: Rewrote 543 call(s), threaded 79 helper(s) into 66 render call site(s), in 147 file(s); left 16 for manual review. Total diff: 148 files, including helper files outside the directory that gain a defaulted t / intlLocale parameter.

This is a mechanical rewrite and behavior is unchanged with React Compiler off:

  • t from useTranslate() delegates to translate(), so every string is identical. Only its identity changes, and only on a language or resource change, when the tree already re-renders.
  • A threaded helper defaults its new parameter (t: Translate = translate), so callers that don't pass it are unchanged.
  • useMemo deps gain t only where they already include a useUiLanguageRevision() value.

Left for manual work because the rewrite would push these files over the max-lines budget. They stay untouched until someone splits them:

  • src/renderer/src/components/automations/use-external-automation-actions.ts
  • src/renderer/src/components/tab-bar/EditorFileTab.tsx

Skipped by the codemod (16 call sites, still counted by the ratchet):

  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:55 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:61 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:83 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:84 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:88 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:111 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:121 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx:125 translate: ChecksTabActions is also called as a plain function
  • components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-viewer.tsx:125 components/pull-request-page/files/inline-comments.ts#buildInlineReviewComments: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/TabBarAgentPickerEntry.tsx:21 components/tab-bar/tab-agent-launch-options.ts#buildAgentPickerLaunchOptions: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/TabBarCreateEntry.tsx:124 components/tab-bar/tab-create-entry-classifier.ts#getTabEntryOptions: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/use-open-tab-search.ts:67 components/tab-bar/open-tab-search-entries.ts#buildOpenTabSearchEntries: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/use-plugin-new-file-menu-options.ts:19 components/tab-bar/tab-create-menu-options.ts#withPluginNewFileMenuOptions: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/use-tab-bar-create-menu-controller.ts:141 components/tab-bar/tab-bar-windows-shell-options.ts#buildWindowsShellMenuEntries: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/use-tab-bar-create-menu-controller.ts:159 components/tab-bar/tab-create-menu-options.ts#buildTabCreateMenuOptions: useMemo without a language dependency (adding one changes when it recomputes)
  • components/tab-bar/use-tab-bar-item-projection.ts:145 components/tab-bar/tab-bar-item-model.ts#buildTabStripLayoutKey: useMemo without a language dependency (adding one changes when it recomputes)

The render-path-translate ratchet baseline drops to 2780.

Testing

  • pnpm tc
  • ORCA_CODE_QUALITY_BASE=origin/main pnpm check:changed (lint, ratchets, related unit tests)
Files Added Deleted Net
Test 0 0 0 0
Prod 148 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1592 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1658 $\color{#cf222e}{\Huge{\mathbf{−}}}$​66

@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-task-page-automations branch from 0ee53a4 to 00956b1 Compare November 7, 2026 10:21
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch from c793595 to 9ae18a3 Compare November 7, 2026 10:26
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-task-page-automations branch from 00956b1 to 9e92c14 Compare November 7, 2026 10:40
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch from 9ae18a3 to 0994990 Compare November 7, 2026 10:40
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-task-page-automations branch from 9e92c14 to 236d8ab Compare November 7, 2026 11:30
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch from 0994990 to 633eb35 Compare November 7, 2026 11:34
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-task-page-automations branch from 236d8ab to f99b44b Compare November 7, 2026 21:07
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch from 633eb35 to ed84260 Compare November 7, 2026 21:11
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-task-page-automations branch from f99b44b to 797a847 Compare November 8, 2026 03:43
@OrcaWin
OrcaWin changed the base branch from OrcaWin/i18n-reactive-translate-task-page-automations to main November 8, 2026 03:59
…rminal pane, tab bar and work-item dialogs

Applies pnpm i18n:reactive-translate --helpers. Output is unchanged: t delegates
to translate() and helpers default the threaded parameter.
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch from ed84260 to 1053eb0 Compare November 8, 2026 04:04
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The change replaces many direct renderer translation calls with the useTranslate hook. Helper APIs now accept optional translators and pass them through rendering, search, validation, error-copy, and recovery paths. Selected relative-time labels now use the active locale. The listed UI text, conditional behavior, and fallback translation behavior remain unchanged.

Merge Risk: Low · up to 1053e

Changing language while these menus or searches remain open can leave some labels, validation messages, and search terms in the previous language. The issues are bounded and do not block merging, but should be fixed or accepted as follow-up.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 2.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title names the main change: a refactor that moves render-path translations to the reactive useTranslate hook in the terminal pane, tab bar, and work-item dialog components. The changeset matches …
Description check Passed The description covers the template's core sections in substance. The Summary explains the codemod and the scope. It states the mechanical, behavior-neutral nature of the change and the defaulting of …
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: a refactor that moves render-path translations to the reactive useTranslate hook in the terminal pane, tab bar, and work-item dialog components. The changeset matches this. The title is long at 82 characters, but it stays specific and readable.

Full details: Description check

Explanation

The description covers the template's core sections in substance. The Summary explains the codemod and the scope. It states the mechanical, behavior-neutral nature of the change and the defaulting of new helper parameters, and it lists the files left for manual work and the call sites the codemod skipped. The Testing section lists commands run. Several template sections are missing or incomplete: ELI5, Why (alternatives considered), Linked Issue (the template requires an issue link, and this PR links none, though it refers to #39353), Visual Proof (marked N/A or required for behavior changes, not addressed), the manual testing checkbox, Risk level and rollback plan, AI Disclosure, the Agent skill upstream boundary checkbox, and the Checklist. Because the core content is present but several required sections are absent, the check is marginal and I judge it a pass with gaps.

Resolution

Consider adding the following to the description: an ELI5 section; a Why section that names the alternatives considered; a Linked Issue entry (Fixes # or an actual issue link); a Visual Proof entry (write N/A with a reason, since the change is claimed to be behavior-neutral); a Risk section with a level and a rollback plan (a revert is likely sufficient, and this should be stated); and the completed checklist items. Also reconcile the counts in the description with the PR objectives, which report different numbers (for example 77 vs 79 helpers threaded, 59 vs 66 call sites, and baseline 2846 vs 2780).

Full details: Docstring Coverage

Explanation

Docstring coverage is 2.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 75 functions across 50 files. (98 skipped: 1 unsupported, 97 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • 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

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

Additional comments: 1

src/renderer/src/components/github-project/slug-dialog/SlugDialogBody.tsx: 1

30-30: Trivial · Maintainability & Code Quality · Low value

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Pass t to projectViewErrorMessage in this component.

SlugDialogBody now calls useTranslate(). The calls to projectViewErrorMessage(res.error) on Lines 80, 120, 137, 238 and 258 omit the new optional translator. Comments.tsx has the same gap. Those error strings use the global translate, while other project components pass t. The fallback keeps output unchanged, so this is a minor consistency gap.

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: 4179ca23-1e81-436a-8fad-0226afa2fa56
Commits

Reviewing files that changed from the base of the PR and between dab4c41 and 1053eb0.

Files selected for processing: 148

  • config/render-path-translate-baseline.txt
  • src/renderer/src/components/github-item-dialog/discuss-item/comment-reply-form.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab-activity.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab-comment-card.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab-comment-group.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab-description.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab-timeline.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/conversation-tab.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/gh-comment-composer.tsx
  • src/renderer/src/components/github-item-dialog/discuss-item/issue-conversation-entries.ts
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section-assignees.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section-horizontal.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section-labels.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section-status-popover.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section-top-columns.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/gh-edit-section.tsx
  • src/renderer/src/components/github-item-dialog/edit-item-fields/github-labels-settings-link.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-check-details.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-check-row.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-header.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-body.tsx
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/pr-files-combined-diff-toolbar.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-merge-menu.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-actions-panel.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-picker-row.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-requested-list.tsx
  • src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-issue-header.tsx
  • src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-header.tsx
  • src/renderer/src/components/github-item-dialog/open-dialog/github-item-dialog-pr-tabs.tsx
  • src/renderer/src/components/github-project/ColumnResizeHandle.tsx
  • src/renderer/src/components/github-project/GhAuthErrorHelp.tsx
  • src/renderer/src/components/github-project/ProjectBoard.tsx
  • src/renderer/src/components/github-project/ProjectBoardCard.tsx
  • src/renderer/src/components/github-project/ProjectCell.tsx
  • src/renderer/src/components/github-project/ProjectCellIdentity.tsx
  • src/renderer/src/components/github-project/ProjectCellIssueType.tsx
  • src/renderer/src/components/github-project/ProjectCellRepositoryEditors.tsx
  • src/renderer/src/components/github-project/ProjectCellSelectionEditors.tsx
  • src/renderer/src/components/github-project/ProjectGroupHeader.tsx
  • src/renderer/src/components/github-project/ProjectItemSlugDialog.tsx
  • src/renderer/src/components/github-project/ProjectMissingRepoDialog.tsx
  • src/renderer/src/components/github-project/ProjectPickerBrowse.tsx
  • src/renderer/src/components/github-project/ProjectPickerPanels.tsx
  • src/renderer/src/components/github-project/ProjectRoadmap.tsx
  • src/renderer/src/components/github-project/ProjectRoadmapBar.tsx
  • src/renderer/src/components/github-project/ProjectRow.tsx
  • src/renderer/src/components/github-project/ProjectViewList.tsx
  • src/renderer/src/components/github-project/ProjectViewStates.tsx
  • src/renderer/src/components/github-project/ProjectViewToolbar.tsx
  • src/renderer/src/components/github-project/ProjectViewWrapper.tsx
  • src/renderer/src/components/github-project/project-view-error-copy.ts
  • src/renderer/src/components/github-project/slug-dialog/AssigneesEditor.tsx
  • src/renderer/src/components/github-project/slug-dialog/Comments.tsx
  • src/renderer/src/components/github-project/slug-dialog/LabelsEditor.tsx
  • src/renderer/src/components/github-project/slug-dialog/SlugDialogBody.tsx
  • src/renderer/src/components/github/work-item-state-presentation.tsx
  • src/renderer/src/components/pr-check-counts.ts
  • src/renderer/src/components/pull-request-page/files/inline-comments.ts
  • src/renderer/src/components/tab-bar/BrowserTab.tsx
  • src/renderer/src/components/tab-bar/ClientHostedBrowserTab.tsx
  • src/renderer/src/components/tab-bar/ClientHostedBrowserTabRows.tsx
  • src/renderer/src/components/tab-bar/CloseSplitPaneMenuItem.tsx
  • src/renderer/src/components/tab-bar/CopyTabIdMenuItem.tsx
  • src/renderer/src/components/tab-bar/EditorFileTabCloseButton.tsx
  • src/renderer/src/components/tab-bar/EditorFileTabContextMenu.tsx
  • src/renderer/src/components/tab-bar/NativeChatNamingFailure.tsx
  • src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
  • src/renderer/src/components/tab-bar/RecentTabSwitcher.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/tab-bar/SortableTabContextMenu.tsx
  • src/renderer/src/components/tab-bar/TabAgentSurfaceChoiceRow.tsx
  • src/renderer/src/components/tab-bar/TabBar.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntry.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntryRow.tsx
  • src/renderer/src/components/tab-bar/TabBarItemRow.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandAddActions.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandHostLoadStatus.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandItem.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandsButton.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandsList.tsx
  • src/renderer/src/components/tab-bar/TabBarQuickCommandsMenu.tsx
  • src/renderer/src/components/tab-bar/TabWorkspaceLayoutMenuSection.tsx
  • src/renderer/src/components/tab-bar/TerminalTabLeadingIcon.tsx
  • src/renderer/src/components/tab-bar/TerminalTabSplitMenuSection.tsx
  • src/renderer/src/components/tab-bar/client-hosted-browser-row-label.ts
  • src/renderer/src/components/tab-bar/new-tab-agent-menu-model.ts
  • src/renderer/src/components/tab-bar/open-tab-search-entries.ts
  • src/renderer/src/components/tab-bar/open-tab-search-retention.ts
  • src/renderer/src/components/tab-bar/open-tab-search.ts
  • src/renderer/src/components/tab-bar/shell-icons.tsx
  • src/renderer/src/components/tab-bar/tab-agent-launch-options.ts
  • src/renderer/src/components/tab-bar/tab-agent-row-presentation.ts
  • src/renderer/src/components/tab-bar/tab-bar-item-label.ts
  • src/renderer/src/components/tab-bar/tab-bar-item-model.ts
  • src/renderer/src/components/tab-bar/tab-bar-static-create-menu.tsx
  • src/renderer/src/components/tab-bar/tab-bar-surface.tsx
  • src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-classifier.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-copy.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-network-selection.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-path-validation.ts
  • src/renderer/src/components/tab-bar/tab-create-entry-url-classification.ts
  • src/renderer/src/components/tab-bar/tab-create-menu-options.ts
  • src/renderer/src/components/tab-bar/use-open-tab-search.ts
  • src/renderer/src/components/tab-bar/use-tab-create-entry-search-results.ts
  • src/renderer/src/components/terminal-pane/appearance/pane-top-banner/PaneTopWarningBanner.tsx
  • src/renderer/src/components/terminal-pane/chat/TerminalPaneResumeInChatButton.tsx
  • src/renderer/src/components/terminal-pane/clipboard/AgentSessionContextCopyMenuItem.tsx
  • src/renderer/src/components/terminal-pane/context-menu/TerminalContextMenu.tsx
  • src/renderer/src/components/terminal-pane/controller/TerminalPaneSurface.tsx
  • src/renderer/src/components/terminal-pane/errors/TerminalErrorToast.tsx
  • src/renderer/src/components/terminal-pane/errors/terminal-error-display.ts
  • src/renderer/src/components/terminal-pane/errors/terminal-error-ipc-unwrap.ts
  • src/renderer/src/components/terminal-pane/errors/terminal-spawn-error-display.ts
  • src/renderer/src/components/terminal-pane/errors/terminal-ssh-sign-in-error.ts
  • src/renderer/src/components/terminal-pane/launch-outcome/AgentLaunchPaneNotice.tsx
  • src/renderer/src/components/terminal-pane/launch-outcome/agent-launch-pane-notice-text.ts
  • src/renderer/src/components/terminal-pane/layout/close/CloseTerminalDialog.tsx
  • src/renderer/src/components/terminal-pane/layout/close/PinnedTabCloseDialog.tsx
  • src/renderer/src/components/terminal-pane/layout/close/terminal-pane-close-affordance.ts
  • src/renderer/src/components/terminal-pane/layout/persistence/TerminalSessionStateSaveFailureDialog.tsx
  • src/renderer/src/components/terminal-pane/mobile-driver/MobileDriverOverlay.tsx
  • src/renderer/src/components/terminal-pane/mounting/TerminalRestoringPlaceholder.tsx
  • src/renderer/src/components/terminal-pane/process-exit/TerminalProcessExitOverlay.tsx
  • src/renderer/src/components/terminal-pane/provider-notices/claude-account-shell/ClaudeOldTerminalBanner.tsx
  • src/renderer/src/components/terminal-pane/provider-notices/claude-diff-panel/ClaudeDiffPanelNoticeBanner.tsx
  • src/renderer/src/components/terminal-pane/provider-notices/codex-server-isolation/CodexSharedServerBanner.tsx
  • src/renderer/src/components/terminal-pane/provider-notices/codex-server-isolation/CodexSharedServerFixDialog.tsx
  • src/renderer/src/components/terminal-pane/provider-notices/terminal-upgrade/OldTerminalDialog.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/recovery/server-outage/RemoteServerOutageNotice.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/recovery/ssh/TerminalSshReconnectOverlay.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/recovery/wsl/WslDistroStoppedCard.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/recovery/wsl/WslHostUnavailableBanner.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/RemoteRuntimeRecoveryCard.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.tsx
  • src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-recovery-copy.ts
  • src/renderer/src/components/terminal-pane/quick-commands/TerminalQuickCommandsSubmenu.tsx
  • src/renderer/src/components/terminal-pane/session-fork/TerminalAgentSessionForkDialog.tsx
  • src/renderer/src/components/terminal-pane/session-restore/newer-daemon/NewerDaemonHoldBanner.tsx
  • src/renderer/src/components/terminal-pane/session-restore/spawn-deferral/TerminalSleepingPaneOverlay.tsx
  • src/renderer/src/components/terminal-pane/titles/ClearPaneTitleMenuItem.tsx
  • src/renderer/src/components/terminal-pane/titles/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/lib/ipc-error.ts
  • src/renderer/src/lib/simulator-palette-search.ts
  • src/renderer/src/lib/simulator-tab-label.ts
  • src/renderer/src/lib/wsl-distro-hold-copy.ts

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

gitBashAvailable: boolean
wslAvailable: boolean
},
t: Translate = translate

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.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

sed -n '120,170p' src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts
sed -n '1,80p' src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts

Repository: stablyai/orca

Length of output: 4394


Script executed:

printf '%s\n' '--- hook ---'
nl -ba src/renderer/src/i18n/use-translate.ts
printf '%s\n' '--- controller ---'
nl -ba src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts | sed -n '1,230p'
printf '%s\n' '--- static menu ---'
nl -ba src/renderer/src/components/tab-bar/tab-bar-static-create-menu.tsx | sed -n '1,180p'
printf '%s\n' '--- PR diff on relevant files ---'
git diff dab4c4148a3145560c05d31a26d56875a5ae2842 1053eb0182da28df0d5a58655d170c99fb63747d -- src/renderer/src/i18n/use-translate.ts src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts src/renderer/src/components/tab-bar/tab-bar-static-create-menu.tsx
printf '%s\n' '--- references ---'
rg -n -F -e 'useTabBarCreateMenuController' -e 'TabBarStaticCreateMenu' -e 'TranslationScopeContext' -e 'changeLanguage(' -- src/renderer/src/components/tab-bar src/renderer/src/i18n src/renderer/src/components/settings || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 33114


Script executed:

printf '%s\n' '--- provider and translation scope ---'
nl -ba src/renderer/src/i18n/I18nProvider.tsx
nl -ba src/renderer/src/i18n/translation-scope-provider.tsx
rg -n -F -e 'getTranslationScope' -e 'languageChanged' -e 'TranslationScopeProvider' -e '<I18nProvider' -- src/renderer/src/i18n src/renderer/src/main.tsx src/renderer/src/App.tsx || test "$?" -eq 1
printf '%s\n' '--- TabBar and menu call ---'
nl -ba src/renderer/src/components/tab-bar/TabBar.tsx | sed -n '1,160p'
nl -ba src/renderer/src/components/tab-bar/tab-bar-surface.tsx | sed -n '200,310p'
printf '%s\n' '--- menu option builder and controller return ---'
nl -ba src/renderer/src/components/tab-bar/tab-create-menu-options.ts | sed -n '1,220p'
nl -ba src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts | sed -n '225,350p'
printf '%s\n' '--- shell entry and prefix translations ---'
rg -n -F -e '2148f65e04' -e '1a8af49530' -e 'efb33546ff' -e 'd1afac112b' -e '7c1313d237' -- src/renderer/src/i18n/locales
printf '%s\n' '--- caller bindings ---'
rg -n -F -e 'showWindowsShellMenu' -e 'onNewTerminalWithShell' -- src/renderer/src/components/tab-bar/TabBar.tsx src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts src/renderer/src/components/tab-bar/tab-bar-surface.tsx

Repository: stablyai/orca

Length of output: 34624


Script executed:

printf '%s\n' '--- tab bar callers ---'
rg -n -F -e '<TabBar' -e 'onNewTerminalWithShell=' -- src/renderer/src/components
printf '%s\n' '--- runtime shell visibility ---'
nl -ba src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts | sed -n '120,195p'
rg -n -F -e 'shouldShowWindowsShellMenu' -e 'getProjectRuntimeShellMenuMode' -- src/renderer/src/components/tab-bar
printf '%s\n' '--- app provider subtree ---'
nl -ba src/renderer/src/main.tsx | sed -n '65,120p'
nl -ba src/renderer/src/i18n/i18n.ts | sed -n '65,125p'

Repository: stablyai/orca

Length of output: 12856


Script executed:

nl -ba src/renderer/src/components/TerminalTitlebarTabs.tsx | sed -n '1,110p'
nl -ba src/renderer/src/components/tab-bar/windows-shell-menu-visibility.ts
nl -ba src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts | sed -n '35,65p;195,220p'
nl -ba src/renderer/src/components/tab-group/TabGroupPanel.tsx | sed -n '60,185p'
rg -n -F -e 'newTerminalWithShell:' -e 'newTerminalWithShell =' -e 'createFloatingTerminalTab' -- src/renderer/src/components/tab-group src/renderer/src/components/floating-terminal

Repository: stablyai/orca

Length of output: 15102


Script executed:

nl -ba src/renderer/src/components/floating-terminal/use-floating-terminal-create-actions.ts | sed -n '1,150p'
nl -ba src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx | sed -n '85,155p'
rg -n -F -e 'useFloatingTerminalCreateActions(' -e '<FloatingTerminalPanelSurface' -- src/renderer/src/components/floating-terminal

Repository: stablyai/orca

Length of output: 10473


Refresh shell entries when the language changes.

If the shell dependencies stay unchanged during a language change, the cached CMD label can remain in the previous language while the prefix updates. Pass useTranslate() to the shell builder and include it in the memo dependencies.

Suggested fix

 import { useEffect, useMemo, useRef, useState } from 'react'
+import { useTranslate } from '@/i18n/use-translate'
 }): TabBarCreateMenuController {
+  const t = useTranslate()
   // Why: <webview> clicks are out-of-process, so Radix's document-pointerdown outside-click check misses them; use window blur.
-    return buildWindowsShellMenuEntries({
+    return buildWindowsShellMenuEntries({
       showWindowsShellMenu,
       hasShellLauncher: Boolean(onNewTerminalWithShell),
       projectRuntimeShellMenuMode,
       defaultWindowsShell,
       gitBashAvailable: windowsTerminalCapabilities.gitBashAvailable,
       wslAvailable: windowsTerminalCapabilities.wslAvailable
-    })
+    }, t)
   }, [
     defaultWindowsShell,
     onNewTerminalWithShell,
     projectRuntimeShellMenuMode,
     showWindowsShellMenu,
+    t,
     windowsTerminalCapabilities.gitBashAvailable,

limit = 4,
context: TabEntryOptionsContext = {}
context: TabEntryOptionsContext = {},
t: Translate = translate

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.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

nl -ba src/renderer/src/components/tab-bar/TabBarCreateEntry.tsx | sed -n '100,205p;330,380p'
nl -ba src/renderer/src/components/tab-bar/tab-create-entry-classifier.ts | sed -n '1,240p'
nl -ba src/renderer/src/i18n/use-translate.ts | sed -n '1,130p'
nl -ba src/renderer/src/i18n/i18n.ts | sed -n '70,125p'

Repository: stablyai/orca

Length of output: 20859


Pass the entry component’s translator into classification.

When translations change while the entry is open, the memo can retain an old status message while the placeholder updates. Pass t and include it in the memo dependencies.

Suggested fix

-      getTabEntryOptions(query, fileList, 4, {
-        allowAbsolutePaths,
-        localPlatform,
-        searchEngine
-      }),
+      getTabEntryOptions(
+        query,
+        fileList,
+        4,
+        {
+          allowAbsolutePaths,
+          localPlatform,
+          searchEngine
+        },
+        t
+      ),
     searchEngine,
+    t,
     tabResults,

export function buildTabCreateMenuOptions(
context: TabCreateMenuOptionsContext
context: TabCreateMenuOptionsContext,
t: Translate = translate

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.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

rg -n -C 9 'buildTabCreateMenuOptions\(|withPluginNewFileMenuOptions\(' src/renderer/src

Repository: stablyai/orca

Length of output: 7910


Script executed:

for f in src/renderer/src/components/tab-bar/tab-create-menu-options.ts src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts src/renderer/src/components/tab-bar/use-plugin-new-file-menu-options.ts; do echo "===== $f"; nl -ba "$f"; done
echo '===== translator and caller locations'
rg -n -F -e 'function useTranslate' -e 'const useTranslate' -e 'usePluginNewFileMenuOptions(' -e 'useTabBarCreateMenuController(' -- src/renderer/src
echo '===== comparison for relevant files'
git diff dab4c4148a3145560c05d31a26d56875a5ae2842 1053eb0182da28df0d5a58655d170c99fb63747d -- src/renderer/src/components/tab-bar/tab-create-menu-options.ts src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts src/renderer/src/components/tab-bar/use-plugin-new-file-menu-options.ts

Repository: stablyai/orca

Length of output: 35130


Script executed:

for f in src/renderer/src/i18n/use-translate.ts src/renderer/src/components/tab-bar/TabBar.tsx; do echo "===== $f"; nl -ba "$f"; done
echo '===== translate and locale subscriptions'
rg -n -C 4 -e 'export (function|const) translate' -e 'languageChanged' -e 'changeLanguage' -- src/renderer/src/i18n/i18n.ts
echo '===== relevant menu consumers'
rg -n -C 4 -F -e 'findMatchingTabCreateMenuOptions(' -e 'createMenuOptions' -- src/renderer/src/components/tab-bar/TabBar.tsx src/renderer/src/components/tab-bar

Repository: stablyai/orca

Length of output: 18540


Script executed:

rg -n -F -e 'translationScopeValue(' -e 'getTranslationScopeKey' -e 'TranslationScopeContext.Provider' -- src/renderer/src/i18n src/renderer/src
nl -ba src/renderer/src/components/tab-bar/TabBarCreateEntry.tsx | sed -n '1,250p'
rg -n -F -e '"d364f3c8d4"' -e '"6d8b6b4117"' -- src/renderer/src/i18n/locales/en.json src/renderer/src/i18n/locales/es.json

Repository: stablyai/orca

Length of output: 12794


Refresh the create-menu options when the translation scope changes.

After a language change, search-result labels and keywords can remain in the previous language. Depend on t in the controller memo. The plugin memo will also rebuild because it depends on the controller’s options array.

Suggested fix

 import { buildTabCreateMenuOptions, type TabCreateMenuOption } from './tab-create-menu-options'
+import { useTranslate } from '@/i18n/use-translate'
@@
 }): TabBarCreateMenuController {
+  const t = useTranslate()
@@
-      }),
+      }, t),
@@
       terminalOnly,
+      t,
       windowsShellEntries,

Comment on lines +81 to +91
? searchOpenTabCandidates(
{
...entries,
query: deferredQuery,
context
},
t
)
: EMPTY_RESULTS,
// oxlint-disable-next-line react-hooks/exhaustive-deps -- simulator titles translate the default label.
[context, deferredQuery, entries, languageRevision]
[context, deferredQuery, entries, languageRevision, t]

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.

Minor · Functional Correctness · Quick win

entries memo omits the translator, so simulator titles can use a different translator than the search.

buildOpenTabSearchEntries (Line 69) is called without t. buildSearchableSimulatorTabs therefore bakes the default-label title into document using the global translate. The entries memo also does not depend on t or languageRevision. The search at Lines 81-91 passes t, but the title already sits in the prebuilt document. Matching and displayed titles can lag a language change until entries rebuilds. Pass t and add languageRevision and t to the memo dependencies.

Proposed fix

   const entries = useMemo(
-    () => (state && agentState ? buildOpenTabSearchEntries(state, agentState, chatNames) : null),
-    [agentState, chatNames, state]
+    () => (state && agentState ? buildOpenTabSearchEntries(state, agentState, chatNames, t) : null),
+    // oxlint-disable-next-line react-hooks/exhaustive-deps -- simulator titles translate the default label.
+    [agentState, chatNames, state, languageRevision, t]
   )

@OrcaWin
OrcaWin merged commit ab6a147 into main Nov 8, 2026
56 checks passed
@OrcaWin
OrcaWin deleted the OrcaWin/i18n-reactive-translate-terminal-tabs-github branch November 8, 2026 04:24
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