Skip to content

refactor(i18n): reactive translate in sidebar (workspace cards, worktree list) - #39375

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

OrcaWin merged 1 commit into
mainfrom
OrcaWin/i18n-reactive-translate-sidebar-1

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 sidebar (workspace cards, worktree list):

  • components/sidebar/workspace-card
  • components/sidebar/worktree-list

Codemod result: Rewrote 315 call(s), threaded 43 helper(s) into 41 render call site(s), in 82 file(s); left 2 for manual review. Total diff: 83 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/right-sidebar/hosted-review/folder-checks/parent-pr-checks-rows.ts
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-title-derived-agent-rows.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/SectionHeader.tsx

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

  • components/sidebar/worktree-list/controls/use-sidebar-host-scope-options.ts:29 components/sidebar/worktree-list/controls/sidebar-host-options.ts#buildSidebarHostOptions: useMemo without a language dependency (adding one changes when it recomputes)
  • components/sidebar/worktree-list/controls/use-sidebar-host-scope-options.ts:53 components/sidebar/worktree-list/controls/sidebar-host-options.ts#buildSidebarHostScopeOptions: useMemo without a language dependency (adding one changes when it recomputes)

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

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 83 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​851 $\color{#cf222e}{\Huge{\mathbf{−}}}$​950 $\color{#cf222e}{\Huge{\mathbf{−}}}$​99

@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch 2 times, most recently from 22967b9 to b7f0aff Compare November 7, 2026 09:49
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-sidebar-1 branch from 42a237f to 8a1933c Compare November 7, 2026 09:53
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch from b7f0aff to ae63f22 Compare November 7, 2026 10:39
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-sidebar-1 branch from 8a1933c to 99c953e Compare November 7, 2026 10:39
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch from ae63f22 to 5f82e92 Compare November 7, 2026 10:57
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-sidebar-1 branch from 99c953e to 285d67f Compare November 7, 2026 10:58
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch from 5f82e92 to 59e1a23 Compare November 7, 2026 11:09
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-sidebar-1 branch from 285d67f to ad55f6c Compare November 7, 2026 11:14
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch from 59e1a23 to 9dd292c Compare November 7, 2026 20:46
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-sidebar-1 branch from ad55f6c to f2c4c01 Compare November 7, 2026 20:51
@OrcaWin
OrcaWin force-pushed the OrcaWin/i18n-reactive-translate-settings-3 branch from 9dd292c to 8ef3ca7 Compare November 8, 2026 00:45
@OrcaWin
OrcaWin changed the base branch from OrcaWin/i18n-reactive-translate-settings-3 to main November 8, 2026 01:00
…debar (workspace cards, worktree list)

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-sidebar-1 branch from f2c4c01 to 3bfd72e Compare November 8, 2026 01:05
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: e2f7d60b-270e-42ec-a66b-f462acb20aa8
Commits

Reviewing files that changed from the base of the PR and between 30cf87d and 3bfd72e.

Files selected for processing: 83

  • config/render-path-translate-baseline.txt
  • src/renderer/src/components/new-workspace/jira-source-status-message.ts
  • src/renderer/src/components/sidebar/workspace-card/activity/CacheTimer.tsx
  • src/renderer/src/components/sidebar/workspace-card/activity/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-card-agent-summary.ts
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-card-compact-agent-line-order.ts
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-card-compact-agent-row.tsx
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-card-compact-agents.tsx
  • src/renderer/src/components/sidebar/workspace-card/activity/worktree-card-idle-child-agents.tsx
  • src/renderer/src/components/sidebar/workspace-card/controller/use-worktree-card-workspace-actions.ts
  • src/renderer/src/components/sidebar/workspace-card/controller/worktree-card-model.ts
  • src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardAutomationDetailSection.tsx
  • src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardCliDetailSection.tsx
  • src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardMeta.tsx
  • src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardPorts.tsx
  • src/renderer/src/components/sidebar/workspace-card/details/use-worktree-card-linked-details.ts
  • src/renderer/src/components/sidebar/workspace-card/details/use-worktree-card-review-details.ts
  • src/renderer/src/components/sidebar/workspace-card/host/WorktreeCardSshHostControl.tsx
  • src/renderer/src/components/sidebar/workspace-card/host/WorktreeWslHostStartMenuItem.tsx
  • src/renderer/src/components/sidebar/workspace-card/identity/AutoRenameFailedDialog.tsx
  • src/renderer/src/components/sidebar/workspace-card/identity/WorktreeLineageToggle.tsx
  • src/renderer/src/components/sidebar/workspace-card/identity/WorktreeTitleInlineRename.tsx
  • src/renderer/src/components/sidebar/workspace-card/identity/worktree-card-header-items.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeCardMetaBadges.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeCardMetadataControls.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeCardMetadataStatusBadges.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeDisplayNameField.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeLinkedItemRow.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeLinkedItemsField.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/WorktreeMetaDialogDraft.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/worktree-card-meta-items.tsx
  • src/renderer/src/components/sidebar/workspace-card/metadata/worktree-conflict-label.ts
  • src/renderer/src/components/sidebar/workspace-card/review/WorkspaceAttachmentOrigins.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorkspaceAttachmentSearch.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorkspaceAttachmentSourceStatus.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeCardLinkedItemsSection.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeCardReferenceRow.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeCardReviewActions.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeCardReviewDetailSection.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeCardTaskDetailSection.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/WorktreeReferenceStack.tsx
  • src/renderer/src/components/sidebar/workspace-card/review/workspace-review-check-label.ts
  • src/renderer/src/components/sidebar/workspace-card/review/worktree-card-pr-display.ts
  • src/renderer/src/components/sidebar/workspace-card/review/worktree-task-state.ts
  • src/renderer/src/components/sidebar/workspace-card/surface/WorktreeCardStatusSlot.tsx
  • src/renderer/src/components/sidebar/workspace-card/surface/worktree-card-option-items.tsx
  • src/renderer/src/components/sidebar/workspace-status/presentation/WorkspaceReviewChecksIndicator.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/ProjectsCollapseAllButton.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/SidebarFilter.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/SidebarHostScopeMenuSection.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/SidebarProjectFilterPanel.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/SidebarRepositoryFilterSection.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/SidebarWorkspaceOptionsMenu.tsx
  • src/renderer/src/components/sidebar/worktree-list/controls/sidebar-host-options.ts
  • src/renderer/src/components/sidebar/worktree-list/controls/workspace-options-menu-items.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/EmptyState.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/ImportedWorktreesVisibilityLine.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/NewExternalWorktreesInboxLine.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/SuppressExternalWorktreeInboxDialog.tsx
  • src/renderer/src/components/sidebar/worktree-list/navigation/ScrollToCurrentWorkspaceToolbarButton.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/FolderPathStatusIndicator.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/HostSectionHeader.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/HostSectionHeaderMenu.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/NoticeHostGlyph.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/PendingWorktreeRow.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDeleteDialog.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupDialogs.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectGroupNameDialog.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/ProjectHeaderHostLabel.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/RepoScanUnavailableIndicator.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/RepoWslDistroStoppedIndicator.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/host-header-detail.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/project-group-header-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/repo-header-create-state.ts
  • src/renderer/src/components/sidebar/worktree-list/rows/repo-header-project-actions.tsx
  • src/renderer/src/components/sidebar/worktree-list/viewport/VirtualizedWorktreeViewport.tsx
  • src/renderer/src/components/sidebar/worktree-list/viewport/WorktreeListScrollToTopButton.tsx
  • src/renderer/src/components/wsl-host-mark/WslHostMark.tsx
  • src/renderer/src/lib/agent-row-stopping-label.ts
  • src/renderer/src/lib/folder-workspace-path-status.ts
  • src/renderer/src/lib/runtime-host-copy.ts
  • src/renderer/src/lib/workspace/creation/pending-worktree-creation.ts
  • src/renderer/src/ssh/ssh-connect-verb.ts
  • 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

@OrcaWin
OrcaWin merged commit 898fd25 into main Nov 8, 2026
48 checks passed
@OrcaWin
OrcaWin deleted the OrcaWin/i18n-reactive-translate-sidebar-1 branch November 8, 2026 01:16
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