Skip to content

fix(native-chat): let a mouse click reach a background task row's Stop - #51760

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/worker-dock-stop-click
Nov 29, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/worker-dock-stop-click

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

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 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.

Linked Issue

Found in QA of #51359 (no separate issue).

Visual Proof

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)

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed 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.

Share

Recent review info

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: 8fffb92d-3a41-4383-a6dc-4717a59a741a
Commits

Reviewing files that changed from the base of the PR and between 5d7416c and 4dbc32d.

Files selected for processing: 1

  • src/renderer/src/components/native-chat/tools/tasks/dock/WorkerDockRow.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@brennanb2025
brennanb2025 merged commit 514ebf0 into main Nov 29, 2026
97 of 101 checks passed
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