You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): let a mouse click reach a background task row's Stop - #51760
In a chat, the Stop button on a running background command didn't respond to the mouse. Clicking it opened the command's details instead. Now a click on Stop stops the command, and a click anywhere else on the row still opens the details.
What Changed
Before: a mouse click on a background task row's Stop opened the Command details dialog, and the task kept running. Only keyboard Space/Enter on a focused Stop worked. This was found during real-agent QA of #51359.
After: a mouse click on Stop stops the task and doesn't open the details. A click on the rest of the row opens the details as before.
Mechanism:WorkerDockRow's action overlay is pointer-events: none and re-enables its action only under group-hover/worker: or a coarse pointer. Tailwind v4 gates group-hover on @media (hover: hover). Linux Chromium can report hover: none with a mouse attached. On the QA box, (hover: hover), (any-hover: hover), (pointer: fine) and (pointer: coarse) were all false. So hover never enabled Stop, and the row's stretched open button took the click. Focus-within showed Stop (opacity) but never enabled it, which is why only the keyboard worked.
The overlay's hover state now uses group-[:hover]/worker:, which isn't gated on the media query, for both opacity and pointer events.
Focus-within now also turns pointer events on, so a Stop that's shown always takes the press.
At rest (no hover, no focus) the overlay is still transparent, and a press there opens the row.
Why
Stop should accept a press whenever it's visible. Tying pointer events to the same states as visibility does that with a one-line class change. The alternatives were dropping the at-rest click-through or adding JS hover tracking. Both are bigger changes in behavior.
Real app on Linux (omarchy), with a native Claude chat running sleep as a background command. In both shots the row's Stop was mouse-clicked.
Before (main): Command details open, task still running
After: no dialog, task stopped
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Testing
Real Electron app on omarchy Linux (qa-gate ticket 13522), with a real native Claude chat (Opus 5.5, medium). Each Stop was checked against the real sleep process.
Check
main
this branch
Hover row, elementFromPoint at Stop
open button
Stop
Mouse click Stop (hovered)
details opened, sleep kept running
no dialog, row → stopped, sleep PID gone
Tab-focused row, then mouse click Stop
details opened, sleep kept running
stopped, no dialog
Keyboard Tab→Stop + Space / Enter
stops
stops
Mouse click on row title
opens details
opens details, task keeps running
Stop click also opens/toggles the row
–
no
Full evidence (computed styles, process snapshots, report) is at omarchy-brennan:~/orca-qa/worker-dock-stop-click/evidence/.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
No unit test: jsdom doesn't evaluate the CSS, and UI-behavior tests are excluded by the repo rules.
Performance
None, because this only changes which Tailwind classes one row overlay carries; no new work, listeners or renders.
Risk
Low. On a fine-pointer machine that does report hover, behavior is unchanged except that a keyboard-focused row's Stop now also takes mouse presses. On touch, the coarse-pointer rule already showed Stop. A non-media-gated :hover can stick after a tap, but that state already shows Stop on coarse pointers. Back out with a plain revert.
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
The non-pending action overlay now uses explicit :hover group selectors for visibility and pointer events. Focus behavior and coarse-pointer rules remain unchanged. The comment now notes that hover is not gated by (hover: hover).
Merge Risk: Minimal · up to 4dbc3
This fixes mouse clicks on a background task row's Stop action in environments that report no hover capability. At rest, clicking the row still opens its details. The change is small and easy to revert, and no merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: a mouse click on a background task row's Stop now reaches the Stop button instead of the row's open button. It matches the raw summary (explicit :hover selectors, focus-wit…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description covers the required template sections in substance. It has a clear ELI5, a before/after What Changed section with the mechanism, and a Why section that explains the alternatives. It li…
Full details: Title check
Explanation
The title names the change: a mouse click on a background task row's Stop now reaches the Stop button instead of the row's open button. It matches the raw summary (explicit :hover selectors, focus-within and coarse-pointer behavior) and the PR objectives. The 'fix(native-chat)' prefix is conventional and the length is acceptable.
Full details: Description check
Explanation
The description covers the required template sections in substance. It has a clear ELI5, a before/after What Changed section with the mechanism, and a Why section that explains the alternatives. It links the QA source (#51359) but has no separate issue, and the template's Linked Issue section expects an actual issue, so this is a gap. Visual Proof has before/after images in a table. Testing lists manual testing with a detailed matrix. Performance is filled in ('None, because ...'). Risk has a level and a revert plan. The AI Disclosure section is empty, which the template allows for internal contributors. Most required content is present, so the check passes, with one note on the missing linked issue.
Finishing Touches
Fix failing CI checks
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
In a chat, the Stop button on a running background command didn't respond to the mouse. Clicking it opened the command's details instead. Now a click on Stop stops the command, and a click anywhere else on the row still opens the details.
What Changed
Before: a mouse click on a background task row's Stop opened the Command details dialog, and the task kept running. Only keyboard Space/Enter on a focused Stop worked. This was found during real-agent QA of #51359.
After: a mouse click on Stop stops the task and doesn't open the details. A click on the rest of the row opens the details as before.
Mechanism:
WorkerDockRow's action overlay ispointer-events: noneand re-enables its action only undergroup-hover/worker:or a coarse pointer. Tailwind v4 gatesgroup-hoveron@media (hover: hover). Linux Chromium can reporthover: nonewith a mouse attached. On the QA box,(hover: hover),(any-hover: hover),(pointer: fine)and(pointer: coarse)were all false. So hover never enabled Stop, and the row's stretched open button took the click. Focus-within showed Stop (opacity) but never enabled it, which is why only the keyboard worked.group-[:hover]/worker:, which isn't gated on the media query, for both opacity and pointer events.At rest (no hover, no focus) the overlay is still transparent, and a press there opens the row.
Why
Stop should accept a press whenever it's visible. Tying pointer events to the same states as visibility does that with a one-line class change. The alternatives were dropping the at-rest click-through or adding JS hover tracking. Both are bigger changes in behavior.
Linked Issue
Found in QA of #51359 (no separate issue).
Visual Proof
Real app on Linux (omarchy), with a native Claude chat running
sleepas a background command. In both shots the row's Stop was mouse-clicked.Testing
Real Electron app on omarchy Linux (qa-gate ticket 13522), with a real native Claude chat (Opus 5.5, medium). Each Stop was checked against the real
sleepprocess.elementFromPointat Stopsleepkept runningsleepPID gonesleepkept runningFull evidence (computed styles, process snapshots, report) is at
omarchy-brennan:~/orca-qa/worker-dock-stop-click/evidence/.No unit test: jsdom doesn't evaluate the CSS, and UI-behavior tests are excluded by the repo rules.
Performance
None, because this only changes which Tailwind classes one row overlay carries; no new work, listeners or renders.
Risk
Low. On a fine-pointer machine that does report hover, behavior is unchanged except that a keyboard-focused row's Stop now also takes mouse presses. On touch, the coarse-pointer rule already showed Stop. A non-media-gated
:hovercan stick after a tap, but that state already shows Stop on coarse pointers. Back out with a plain revert.Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)