Repository navigation
Fix terminal pane title focus handling - #2756
Conversation
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
|
Ready to review this PR? Stage has broken it down into 5 individual chapters for you: Chapters generated by Stage for commit b8d3192 on Jun 20, 2026 12:31am UTC. |
…-pane-title-issue # Conflicts: # src/renderer/src/components/dictation/DictationController.tsx # src/renderer/src/components/mobile/MobilePage.tsx # src/renderer/src/components/settings/RuntimePairingGeneratorForm.tsx # src/renderer/src/components/settings/RuntimePairingUrlGenerator.tsx # src/renderer/src/components/sparse/SparseCheckoutPresetSelect.tsx # src/renderer/src/components/tab-bar/tab-create-entry-classifier.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTerminal pane title bars move from per-pane React portals to a single Orca-owned overlay 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 2
🧹 Nitpick comments (1)
src/renderer/src/components/tab-bar/tab-entry-file-matches.ts (1)
10-12: ⚡ Quick winPreserve the cross-platform normalization rationale in-place.
This normalization is a non-obvious behavior contract; please add a short “why” comment so future edits don’t remove it accidentally.
♻️ Proposed tweak
function normalizeFileMatchQuery(query: string): string { + // Why: users may type Windows separators, while indexed paths are slash-normalized. return query.trim().replace(/\\/g, '/') }As per coding guidelines: “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4423e1aa-c252-454c-84f2-2374df469436
📒 Files selected for processing (35)
src/main/runtime/headless-tab-group-split-layout.tssrc/main/runtime/orca-runtime.test.tssrc/renderer/src/assets/terminal.csssrc/renderer/src/components/dictation/DictationController.tsxsrc/renderer/src/components/dictation/use-dictation-speech-events.tssrc/renderer/src/components/mobile/MobilePage.tsxsrc/renderer/src/components/mobile/MobilePageHeroSection.tsxsrc/renderer/src/components/mobile/use-mobile-page-escape-close.tssrc/renderer/src/components/right-sidebar/FolderWorkspacePrChecksPanel.tsxsrc/renderer/src/components/settings/RuntimePairingGeneratorForm.tsxsrc/renderer/src/components/settings/RuntimePairingUrlGenerator.tsxsrc/renderer/src/components/sparse/SparseCheckoutPresetSelect.tsxsrc/renderer/src/components/sparse/SparsePresetDraftForm.tsxsrc/renderer/src/components/tab-bar/tab-create-entry-classifier.tssrc/renderer/src/components/tab-bar/tab-entry-file-matches.tssrc/renderer/src/components/tab-bar/tab-entry-path-validation.tssrc/renderer/src/components/terminal-pane/TerminalContextMenu.tsxsrc/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/pane-manager/pane-drag-pointer.tssrc/renderer/src/lib/pane-manager/pane-drag-reorder.test.tssrc/renderer/src/lib/pane-manager/pane-drag-reorder.tssrc/renderer/src/lib/pane-manager/pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-manager.tssrc/renderer/src/lib/terminal-theme.test.tssrc/renderer/src/lib/terminal-theme.tssrc/renderer/src/lib/terminal-title-contrast.tssrc/renderer/src/runtime/web-session-tabs-sync.test.tstests/e2e/terminal-panes.spec.ts
💤 Files with no reviewable changes (1)
- src/renderer/src/lib/pane-manager/pane-drag-reorder.ts
|
|
||
| test('Set Title strip activates its pane and accepts file-path drops', async ({ orcaPage }) => { | ||
| const title = `Drop target title ${Date.now()}` | ||
| const droppedPath = `/tmp/title-drop-${Date.now()}.txt` |
There was a problem hiding this comment.
Use OS-safe temp path construction for the dropped file payload.
Line 436 hardcodes a POSIX path (/tmp/...), which is not cross-platform and violates the repo path-handling rule.
As per coding guidelines, “Use path.join or Electron/Node path utilities for file paths — never assume / or \ for cross-platform compatibility.”
🔧 Suggested fix
- const droppedPath = `/tmp/title-drop-${Date.now()}.txt`
+ const droppedPath = path.join(os.tmpdir(), `title-drop-${Date.now()}.txt`)// Add if not already present at the top of the file:
import path from 'node:path'📝 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.
| const droppedPath = `/tmp/title-drop-${Date.now()}.txt` | |
| const droppedPath = path.join(os.tmpdir(), `title-drop-${Date.now()}.txt`) |
Source: Coding guidelines
…-pane-title-issue # Conflicts: # src/renderer/src/i18n/locales/ko.json
…-pane-title-issue # Conflicts: # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (6)
src/renderer/src/i18n/locales/ko.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDuplicate
copyTerminalIdkey causes silent overwrite.Line 2303 overwrites Line 2287 in the same object, so one value is unreachable and locale output can be unintentionally changed.
Suggested fix
"TerminalContextMenu": { "b4cdd9314e": "화면 지우기", "8c17d6786d": "창 닫기", - "copyTerminalId": "터미널 ID 복사", + "copyTerminalId": "터미널 ID 복사", "2cf85a6a55": "창 ID 복사", "39809d152f": "제목 설정…", "06c2b0f043": "창 크기 균등화", "98bccf4fa2": "Terminal을 아래로 분할", "20e565d865": "Terminal 오른쪽 분할", "8a7ddb8b8a": "포크 Agent 세션…", "0a82b0608c": "빠른 명령 추가...", "9528a65ef8": "빠른 명령 없음", "3ce594a4a0": "글로벌", "ec85df5914": "빠른 명령어", "0a917b591a": "붙여넣기", "f3eeb1de13": "복사", "c2f0b72b8d": "삽입", "925f49f210": "창 확장", "df766809e0": "창 축소", - "copyTerminalId": "Copy Terminal ID" + },Source: Linters/SAST tools
src/renderer/src/i18n/locales/en.json (2)
2301-2304:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the duplicate
copyTerminalIdentry.The second key at Line 2303 overwrites the earlier one at Line 2287, so only one label survives parsing. Keep a single catalog entry to avoid drift.
🛠️ Suggested cleanup
"925f49f210": "Expand Pane", "df766809e0": "Collapse Pane", - "copyTerminalId": "Copy Terminal ID"Source: Linters/SAST tools
9098-9100:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDeduplicate
SourceControlEntryContextMenu.This block repeats the earlier
SourceControlEntryContextMenudefinition from Line 8398, so one copy will be discarded when the JSON is parsed. Merge the content or keep only one definition.🛠️ Suggested cleanup
- "SourceControlEntryContextMenu": { - "a1f2c8d901": "View" - },Source: Linters/SAST tools
src/renderer/src/i18n/locales/es.json (1)
2287-2304:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the duplicate
copyTerminalIdentry.The later
copyTerminalIdvalue overwrites the Spanish translation above, so this menu item will only keep one string after parsing. Keep a single key here and update that value instead.Source: Linters/SAST tools
src/renderer/src/i18n/locales/ja.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove duplicate
copyTerminalIdinTerminalContextMenu.Line 2287 and Line 2303 both declare
copyTerminalId. The latter overwrites the former and triggers the duplicate-key lint error. Keep a singlecopyTerminalIdentry in this object.Source: Linters/SAST tools
src/renderer/src/i18n/locales/zh.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDuplicate
copyTerminalIdkey silently overwrites the first value.Line 2287 and Line 2303 define the same key in one object. The second value wins, so the earlier translation is ignored.
Suggested fix
"TerminalContextMenu": { "b4cdd9314e": "清晰的屏幕", "8c17d6786d": "关闭窗格", "copyTerminalId": "复制终端 ID", "2cf85a6a55": "复制窗格 ID", "39809d152f": "设置标题...", "06c2b0f043": "均衡窗格大小", "98bccf4fa2": "向下拆分 Terminal", "20e565d865": "向右拆分 Terminal", "8a7ddb8b8a": "分叉 Agent 会话...", "0a82b0608c": "添加快速命令...", "9528a65ef8": "没有快速命令", "3ce594a4a0": "全球的", "ec85df5914": "快捷命令", "0a917b591a": "粘贴", "f3eeb1de13": "复制", "c2f0b72b8d": "插入", "925f49f210": "展开窗格", - "df766809e0": "折叠窗格", - "copyTerminalId": "Copy Terminal ID" + "df766809e0": "折叠窗格" },Source: Linters/SAST tools
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2b4ae4e-587e-47ab-9add-748766b5d1ba
📒 Files selected for processing (5)
src/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (6)
src/renderer/src/i18n/locales/ko.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDuplicate
copyTerminalIdkey causes silent overwrite.Line 2303 overwrites Line 2287 in the same object, so one value is unreachable and locale output can be unintentionally changed.
Suggested fix
"TerminalContextMenu": { "b4cdd9314e": "화면 지우기", "8c17d6786d": "창 닫기", - "copyTerminalId": "터미널 ID 복사", + "copyTerminalId": "터미널 ID 복사", "2cf85a6a55": "창 ID 복사", "39809d152f": "제목 설정…", "06c2b0f043": "창 크기 균등화", "98bccf4fa2": "Terminal을 아래로 분할", "20e565d865": "Terminal 오른쪽 분할", "8a7ddb8b8a": "포크 Agent 세션…", "0a82b0608c": "빠른 명령 추가...", "9528a65ef8": "빠른 명령 없음", "3ce594a4a0": "글로벌", "ec85df5914": "빠른 명령어", "0a917b591a": "붙여넣기", "f3eeb1de13": "복사", "c2f0b72b8d": "삽입", "925f49f210": "창 확장", "df766809e0": "창 축소", - "copyTerminalId": "Copy Terminal ID" + },Source: Linters/SAST tools
src/renderer/src/i18n/locales/en.json (2)
2301-2304:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the duplicate
copyTerminalIdentry.The second key at Line 2303 overwrites the earlier one at Line 2287, so only one label survives parsing. Keep a single catalog entry to avoid drift.
🛠️ Suggested cleanup
"925f49f210": "Expand Pane", "df766809e0": "Collapse Pane", - "copyTerminalId": "Copy Terminal ID"Source: Linters/SAST tools
9098-9100:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDeduplicate
SourceControlEntryContextMenu.This block repeats the earlier
SourceControlEntryContextMenudefinition from Line 8398, so one copy will be discarded when the JSON is parsed. Merge the content or keep only one definition.🛠️ Suggested cleanup
- "SourceControlEntryContextMenu": { - "a1f2c8d901": "View" - },Source: Linters/SAST tools
src/renderer/src/i18n/locales/es.json (1)
2287-2304:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the duplicate
copyTerminalIdentry.The later
copyTerminalIdvalue overwrites the Spanish translation above, so this menu item will only keep one string after parsing. Keep a single key here and update that value instead.Source: Linters/SAST tools
src/renderer/src/i18n/locales/ja.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove duplicate
copyTerminalIdinTerminalContextMenu.Line 2287 and Line 2303 both declare
copyTerminalId. The latter overwrites the former and triggers the duplicate-key lint error. Keep a singlecopyTerminalIdentry in this object.Source: Linters/SAST tools
src/renderer/src/i18n/locales/zh.json (1)
2287-2303:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDuplicate
copyTerminalIdkey silently overwrites the first value.Line 2287 and Line 2303 define the same key in one object. The second value wins, so the earlier translation is ignored.
Suggested fix
"TerminalContextMenu": { "b4cdd9314e": "清晰的屏幕", "8c17d6786d": "关闭窗格", "copyTerminalId": "复制终端 ID", "2cf85a6a55": "复制窗格 ID", "39809d152f": "设置标题...", "06c2b0f043": "均衡窗格大小", "98bccf4fa2": "向下拆分 Terminal", "20e565d865": "向右拆分 Terminal", "8a7ddb8b8a": "分叉 Agent 会话...", "0a82b0608c": "添加快速命令...", "9528a65ef8": "没有快速命令", "3ce594a4a0": "全球的", "ec85df5914": "快捷命令", "0a917b591a": "粘贴", "f3eeb1de13": "复制", "c2f0b72b8d": "插入", "925f49f210": "展开窗格", - "df766809e0": "折叠窗格", - "copyTerminalId": "Copy Terminal ID" + "df766809e0": "折叠窗格" },Source: Linters/SAST tools
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2b4ae4e-587e-47ab-9add-748766b5d1ba
📒 Files selected for processing (5)
src/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
🛑 Comments failed to post (4)
src/renderer/src/i18n/locales/es.json (1)
8398-8400:
⚠️ Potential issue | 🟡 Minor | ⚡ Quick winKeep only one
SourceControlEntryContextMenublock.This new key collides with the existing menu entry later in the file, so one of the two objects will be dropped during JSON parsing. Merge them into a single entry and preserve the intended locale string.
🧰 Tools
🪛 Biome (2.5.0)
[error] 8398-8398: The key SourceControlEntryContextMenu was already declared.
(lint/suspicious/noDuplicateObjectKeys)
Source: Linters/SAST tools
src/renderer/src/i18n/locales/ja.json (1)
8398-8400:
⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove duplicate
SourceControlEntryContextMenuobject key.
SourceControlEntryContextMenuis declared twice (Line 8398 and Line 9098) under the same parent scope. The second declaration replaces the first and causes a duplicate-key lint failure. Consolidate into one declaration.Also applies to: 9098-9100
🧰 Tools
🪛 Biome (2.5.0)
[error] 8398-8398: The key SourceControlEntryContextMenu was already declared.
(lint/suspicious/noDuplicateObjectKeys)
Source: Linters/SAST tools
src/renderer/src/i18n/locales/ko.json (1)
8398-8400:
⚠️ Potential issue | 🟠 Major | ⚡ Quick win
SourceControlEntryContextMenuis declared twice in the same object.The second declaration shadows the first one. Even with identical values now, this is fragile and a lint error.
Suggested fix
- "SourceControlEntryContextMenu": { - "a1f2c8d901": "보기" - },(Keep the later
SourceControlEntryContextMenublock only once.)Also applies to: 9098-9100
🧰 Tools
🪛 Biome (2.5.0)
[error] 8398-8398: The key SourceControlEntryContextMenu was already declared.
(lint/suspicious/noDuplicateObjectKeys)
Source: Linters/SAST tools
src/renderer/src/i18n/locales/zh.json (1)
8398-8400:
⚠️ Potential issue | 🟠 Major | ⚡ Quick win
SourceControlEntryContextMenuis declared twice in the same object.Line 8398 and Line 9098 both define
SourceControlEntryContextMenu; the latter overwrites the former, so one value is dead data.Suggested fix
- "SourceControlEntryContextMenu": { - "a1f2c8d901": "查看" - },(keep only one
SourceControlEntryContextMenublock in this parent object)Also applies to: 9098-9100
🧰 Tools
🪛 Biome (2.5.0)
[error] 8398-8398: The key SourceControlEntryContextMenu was already declared.
(lint/suspicious/noDuplicateObjectKeys)
Source: Linters/SAST tools
This reverts commit 77f4d76.
…-pane-title-issue # Conflicts: # src/renderer/src/components/terminal-pane/TerminalPane.tsx
…ons (#8279) Two renderer paths let Promise rejections escape unhandled, where the crash-breadcrumb system retains them and grows the heap until the renderer white-screens (#8260): - The terminal file-link provider fires a `void Promise.all(...)` whose async mappers probe path existence over SSH. On disconnect these reject with "Remote connection dropped/reconnecting"; add a `.catch` that resolves the callback with no links so the rejection is handled. - "ResizeObserver loop completed" is a benign Chromium quirk; suppress it in crash-diagnostics so it stops filling the breadcrumb buffer and inflating the renderer error count. Scope note: the original fix for #8260 also proposed Windows pty:kill signal handling (killPtyProcess / isPtyAlreadyGoneError) and a ResizeObserver double-rAF. Those landed on main independently (Windows kill handling by v1.4.135; the pane-title-overlay rect-equality guard from #2756 already breaks the loop at the source), so this change carries only the two guards still missing upstream. Co-authored-by: Yixian HU <[email protected]> Co-authored-by: Claude <[email protected]>
Co-authored-by: Orca <[email protected]>
…ons (stablyai#8279) Two renderer paths let Promise rejections escape unhandled, where the crash-breadcrumb system retains them and grows the heap until the renderer white-screens (stablyai#8260): - The terminal file-link provider fires a `void Promise.all(...)` whose async mappers probe path existence over SSH. On disconnect these reject with "Remote connection dropped/reconnecting"; add a `.catch` that resolves the callback with no links so the rejection is handled. - "ResizeObserver loop completed" is a benign Chromium quirk; suppress it in crash-diagnostics so it stops filling the breadcrumb buffer and inflating the renderer error count. Scope note: the original fix for stablyai#8260 also proposed Windows pty:kill signal handling (killPtyProcess / isPtyAlreadyGoneError) and a ResizeObserver double-rAF. Those landed on main independently (Windows kill handling by v1.4.135; the pane-title-overlay rect-equality guard from stablyai#2756 already breaks the loop at the source), so this change carries only the two guards still missing upstream. Co-authored-by: Yixian HU <[email protected]> Co-authored-by: Claude <[email protected]>
Summary
Testing
Visual verification
Inspected fresh rendered screenshots from the temporary smoke specs. The title strip is opaque, terminal cursor/content starts below the reserved title area, the hovered title-strip drag affordance appears at the top of the titled pane, and the hovered remove-title X no longer shows the bright rounded ghost-button block. Gemini visual review was attempted earlier, but Gemini requested shell copy permission for the screenshot, so I used direct screenshot inspection as evidence.
Risk assessment
Risk: MEDIUM
Historic risk metadata backfill based on the existing
risk:mediumlabel.Risk: medium
Historic risk metadata backfill based on the existing
risk:mediumlabel.