Repository navigation
fix(ui): restore missing spaces in i18n JSX fragment copy - #9513
Conversation
Across settings, setup prompts, checks, and dialogs, translate() fragments
were concatenated with <code>/dynamic values without explicit JSX spaces,
gluing words together (sharedorca.yaml, ormaster, Showing8 of42, etc.).
Insert {' '} between word-ending fragments and the next token, matching the
orca.yaml trust dialog fix. Add a source guard test for high-impact cases.
📝 WalkthroughWalkthroughUpdated renderer JSX text composition to use explicit whitespace between translated labels, timestamps, counts, paths, errors, and inline elements across dialogs, editor views, automation, settings, sidebar, and statistics components. Some multiline expressions were consolidated without changing logic or displayed values. Added a Vitest guard that verifies explicit spacing after selected translation fallbacks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6967e646-9353-4ffa-8b08-13cf66bb1474
📒 Files selected for processing (46)
src/renderer/src/components/GitHubItemDialog.tsxsrc/renderer/src/components/GitLabItemDialog.tsxsrc/renderer/src/components/PullRequestPage.tsxsrc/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/UpdateCard.tsxsrc/renderer/src/components/automations/AutomationsPage.tsxsrc/renderer/src/components/automations/ExternalAutomationRunTable.tsxsrc/renderer/src/components/contextual-tours/ContextualTourProgressDots.tsxsrc/renderer/src/components/editor/CombinedDiffViewer.tsxsrc/renderer/src/components/editor/ConflictComponents.tsxsrc/renderer/src/components/editor/IpynbViewer.tsxsrc/renderer/src/components/editor/MermaidBlock.tsxsrc/renderer/src/components/editor/RichMarkdownDocLinkMenu.tsxsrc/renderer/src/components/feature-wall/ReviewNotesAnimatedVisual.tsxsrc/renderer/src/components/feature-wall/ReviewPRViewAnimatedVisual.tsxsrc/renderer/src/components/feature-wall/ReviewShipAnimatedVisual.tsxsrc/renderer/src/components/feature-wall/review-notes-diff-rows.tsxsrc/renderer/src/components/github/PRFilterSections.tsxsrc/renderer/src/components/github/github-rate-limit-display.tsxsrc/renderer/src/components/gitlab/gitlab-rate-limit-display.tsxsrc/renderer/src/components/linear-priority-icon.tsxsrc/renderer/src/components/right-sidebar/FileExplorerTreeStatus.tsxsrc/renderer/src/components/right-sidebar/SourceControlAgentActionDialogForm.tsxsrc/renderer/src/components/right-sidebar/checks-panel-content.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/AutoRenameBranchFromWorkSetting.tsxsrc/renderer/src/components/settings/BaseRefPicker.tsxsrc/renderer/src/components/settings/BrowserSessionCookiesSection.tsxsrc/renderer/src/components/settings/CliSection.tsxsrc/renderer/src/components/settings/CommitMessageAiPane.tsxsrc/renderer/src/components/settings/GeneralEditorSettingsSection.tsxsrc/renderer/src/components/settings/GeneralUpdateSettingsSection.tsxsrc/renderer/src/components/settings/GitPane.tsxsrc/renderer/src/components/settings/ManageSessionKillDialog.tsxsrc/renderer/src/components/settings/NotificationSoundSection.tsxsrc/renderer/src/components/settings/RepositoryHooksSection.tsxsrc/renderer/src/components/settings/RepositoryPane.tsxsrc/renderer/src/components/settings/RepositorySourceControlAiHostedReviewDefaults.tsxsrc/renderer/src/components/settings/RuntimeEnvironmentsPane.tsxsrc/renderer/src/components/settings/SshPassphraseDialog.tsxsrc/renderer/src/components/settings/WslCliRegistration.tsxsrc/renderer/src/components/sidebar/DeleteWorktreeWarningPanels.tsxsrc/renderer/src/components/sidebar/SetupScriptPromptCardViews.tsxsrc/renderer/src/components/stats/ShareUsageCard.tsxsrc/renderer/src/components/stats/UsageOverviewPane.tsxsrc/renderer/src/lib/i18n-jsx-spacing-guard.test.ts
| <div className="mermaid-error"> | ||
| {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} | ||
| {error} | ||
| {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use explicit JSX whitespace to prevent formatting bugs.
Using a raw space between JSX expressions (e.g., } {error}) works when the code is on a single line, but if an auto-formatter like Prettier wraps the code across multiple lines, the space will be stripped by the JSX parser. This is the exact root cause of the glued-word bugs this PR fixes. Use explicit {' '} to ensure the space is always preserved.
💻 Proposed fix
- {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error}
+ {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')}{' '}
+ {error}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error} | |
| {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')}{' '} | |
| {error} |


Summary
Follow-up to #9511. The same glue-word class of bug exists wherever
translate(...)fragments sit next to<code>/ dynamic values without an explicit{' '}.Examples of broken copy this fixes:
This repo ignores sharedorca.yaml setup scriptsExampleorca.yaml template/Editorca.yaml to changemain ormaster/commands likegit diff main...HEADRunorca serve --pairing-address …Showing8 of42Force-quitssess_abc123Version1.2.3 is availableStarted…,Renamed from…,Filter pull requests, rate limits, etc.)Approach
{' '}between word-ending fragments and the next token (same pattern as the trust dialog fix).check #123,comment L42,Clear (+ count +)).i18n-jsx-spacing-guard.test.tsto lock high-impact cases.Screenshots
Critical paths (orca.yaml / setup / git / run)
Full before/after grid (all fixed cases)
Test plan
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/i18n-jsx-spacing-guard.test.tspnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/OrcaYamlTrustDialog.test.tsx