Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Terminal focus no longer disables the reachable title-bar and sidebar drag regions, while interactive controls remain non-draggable. No concrete merge-blocking behavior remains identified. Pre-merge checks |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/e2e/titlebar-terminal-focus-drag.spec.ts (1)
53-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the right-sidebar drag header after opening it.
The workspace layout uses
.titlebar-left, not.titlebar: terminal workspace state setsshouldMount, so the full-width.titlebaris not mounted. Do not require.titlebar.The test does not require
.right-sidebar-header-drag. Open the right sidebar before collecting regions, then assert that selector has a visible match.Suggested fix
await waitForActiveWorktree(orcaPage) await ensureTerminalVisible(orcaPage) + await orcaPage.evaluate(() => window.__store?.getState().setRightSidebarOpen(true)) + await expect(orcaPage.locator('.right-sidebar-header-drag:visible').first()).toBeVisible() const helper = orcaPage.locator('.xterm:visible .xterm-helper-textarea').first() @@ expect( regions.drag.some(({ selector }) => selector === '[data-terminal-focus-release-surface="true"]') ).toBe(true) + expect(regions.drag.some(({ selector }) => selector === '.right-sidebar-header-drag')).toBe(true)
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
91b9d457-7971-40f9-a5a2-f7bc4fb58f11
📒 Files selected for processing (2)
src/renderer/src/assets/main.csstests/e2e/titlebar-terminal-focus-drag.spec.ts
💤 Files with no reviewable changes (1)
- src/renderer/src/assets/main.css
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Addressed CodeRabbit's right-sidebar coverage finding in af3e2be. This was worth fixing: without an explicit visible-match assertion, the loop could skip the right-sidebar header entirely if it were closed. The test now opens the sidebar, waits for its drag header to be visible, and requires that header in the measured regions before checking Validation: the focused Electron E2E test passes on isolated Xvfb (1 passed); changed-code quality gates, formatting, and |
ELI5
After clicking a terminal, moving the Orca window currently takes two attempts: the first press releases terminal focus, and only the second drags the window. Keep the title bar draggable so the first press works.
What Changed
Remove the terminal-focus-dependent
no-dragoverride frommain.css(11 lines). The existing drag regions remain active while xterm owns focus; buttons and other interactive controls retain their existingno-dragrules. No component, focus-handler, or IPC changes.Add an Electron regression test that focuses a real xterm helper, verifies the focus flag, checks every visible matching drag surface and interactive control, and clicks a sidebar toggle to verify terminal focus is still released. It attaches computed region values and a renderer screenshot.
Why
Electron chooses whether the press belongs to a window drag before the renderer's
pointerdownhandler can clear terminal focus. Re-enabling dragging in that handler is too late for the current press.Keeping caption regions draggable fixes the ordering problem without replacing the title bar or adding platform-specific window-movement IPC. Tradeoff: pressing empty caption space preserves terminal keyboard/zoom ownership, like dragging a native window. Interactive chrome still releases it.
Linked Issue
Fixes #17425
Fixes #19184
Related open PR: #17426 addresses the same root cause. This is a deliberately minimal alternative with executed before/after regression evidence and a Windows user-confirmed installed-build test; it does not include the marker rename or selection-style changes from that PR.
Visual Proof
Native mouse recording (24 seconds): click the terminal, press and hold the left mouse button on the title bar, and drag. The visible pointer and captions show each attempt.
Watch/download the MP4
The recording uses real Electron 43.7.5, native X11 mouse input, and Openbox on an isolated Linux Xvfb desktop. The before segment restores the exact removed upstream CSS rule in the fixed renderer; the after segment removes that rule in the same session. Only explanatory captions are overlaid; the mouse and window movement are actual screen capture.
Measured native window positions (raw results):
(60, 120)→(60, 120)— no movement.(60, 120)→(212, 196)— moved.(60, 120)→(212, 196)— moved after refocusing the terminal.The recording script asserted
[false, true, true]for these three movements and passed. This is Linux native-window evidence, separate from the Windows reporter confirmation below. Recording script is attached as evidence, not added to the PR's CI tests.Earlier renderer screenshots and computed-style evidence
Both screenshots below come from the actual hidden Electron renderer on an isolated Linux Xvfb display, with terminal focus active. They are appearance evidence, not proof of native window movement: this change affects hit testing rather than pixels.
no-dragdragno-dragdragno-dragdragno-dragno-dragEvidence attachments: original screenshots, computed-style JSON, before/after test results, and validation notes. These are hosted on the fork; no evidence binaries are included in the PR diff.
Windows manual evidence: on installed Orca 1.4.224 / Electron 43.7.5, the reporter reproduced the two-attempt behavior, then confirmed “Yes, first drag works” after an equivalent CSS-only patch and restart. This is a user-performed native drag check, not an automated Windows source-build test. The assistant's earlier Windows automation did not establish native movement and is not counted as a pass.
Testing
c69f9d2f625c: new regression test fails with fourExpected: drag / Received: no-dragassertions. The control/focus-release checks pass.ORCA_BACKGROUND_LAUNCH=1.pnpm testonregular-terminal-focus-ownership.test.ts,right-sidebar-titlebar-drag-regions.test.ts, andright-sidebar-titlebar-drag-regions.render.test.tsx: 30 tests pass.pnpm tc:web: passes.pnpm run check:code-quality:changed: passes all changed-code gates.oxlint,oxfmt --check, andgit diff --check: pass.pnpm exec electron-vite build --mode e2e: passes (existing CSS/chunk-size warnings).Reproduce the regression test after building in E2E mode:
Manual reproduction: focus a terminal, then press and hold an empty title-bar/terminal-strip area and move the pointer. Before: first gesture does not move the window. After: first gesture moves it. Confirm the window controls still work and clicking a sidebar control releases terminal input focus.
AI Disclosure
Investigated, implemented, and tested with OpenAI Codex (GPT-6). The reporter supplied the Windows reproduction and confirmed the installed-build fix.
Review
The production diff only removes a CSS override. Existing focus synchronization, terminal zoom routing, and control hit regions remain in place. The test guards both the focused-state regression and the interactive-control behavior.
Agent skill upstream boundary
Notes
Platform-neutral desktop CSS; no path, shortcut, security, persistence, remote protocol, or mobile changes. The fix applies to desktop chrome regardless of whether the terminal runs locally, in WSL, or over SSH; Windows manual, Linux renderer, and isolated Linux native-window behavior were exercised. Caption zoom ownership is the intentional behavior change described above.
Checklist