fix(workers): don't hijack card-wide taps on interactive children #27

Merged
lz merged 1 commit from fix/mobile-workspace-card-taps into main 2026-05-26 20:52:44 +02:00
Owner

Summary

On mobile, tapping anywhere in a workspace card opened the right-pane file explorer for the workspace scope — including taps that landed on the inner Start/Stop/Logs/Remove buttons (which had stopPropagation) and especially the session-name input + agent-teams checkbox (which did not). Once scope was set, .left-pane got display: none via .mobile-hidden and the user's tap target vanished mid-action.

Guard the card tap by walking up from event.target: if the click landed on a button, input, textarea, select, label, a, or [contenteditable="true"], let that child handle it and skip scope selection. Card-wide tap still works on the title / meta / status area.

Test plan

  • pnpm lint — clean (verified on a sibling branch carrying the same change)
  • pnpm typecheck — clean
  • pnpm test — 474/474 passing
  • Manual on mobile: tap Start/Stop/Logs/Remove → action fires, scope unchanged
  • Manual on mobile: tap the "feature-name" input → keyboard appears, can type
  • Manual on mobile: tap card title / meta text → right pane slides in for workspace scope
  • Manual on desktop: card-wide click still selects workspace scope
## Summary On mobile, tapping anywhere in a workspace card opened the right-pane file explorer for the workspace scope — including taps that landed on the inner Start/Stop/Logs/Remove buttons (which had `stopPropagation`) and especially the session-name input + agent-teams checkbox (which did not). Once scope was set, `.left-pane` got `display: none` via `.mobile-hidden` and the user's tap target vanished mid-action. Guard the card tap by walking up from `event.target`: if the click landed on a `button`, `input`, `textarea`, `select`, `label`, `a`, or `[contenteditable="true"]`, let that child handle it and skip scope selection. Card-wide tap still works on the title / meta / status area. ## Test plan - [x] `pnpm lint` — clean (verified on a sibling branch carrying the same change) - [x] `pnpm typecheck` — clean - [x] `pnpm test` — 474/474 passing - [ ] Manual on mobile: tap Start/Stop/Logs/Remove → action fires, scope unchanged - [ ] Manual on mobile: tap the "feature-name" input → keyboard appears, can type - [ ] Manual on mobile: tap card title / meta text → right pane slides in for workspace scope - [ ] Manual on desktop: card-wide click still selects workspace scope
fix(workers): don't hijack card-wide taps on interactive children
All checks were successful
ci / nexus (pull_request) Successful in 2m27s
ci / images (./nexus, agent-nexus) (pull_request) Successful in 3m55s
ci / images (./worker, nexus-worker) (pull_request) Successful in 1m11s
6cf402cb18
The workspace card has a card-wide onclick that opens the right-pane
file explorer for the workspace scope. On mobile that's brutal:
selecting scope flips .left-pane to display:none via .mobile-hidden,
so a tap that lands on an inner Start/Stop button, the session-name
input, or the agent-teams checkbox — none of which had stopPropagation
on every path — vanishes mid-action as the right pane slides over.

Guard the card tap by walking up from event.target: if the click
landed on a button/input/textarea/select/label/a/contenteditable,
let that child handle it and skip scope selection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lz merged commit 6cc1a2fa13 into main 2026-05-26 20:52:44 +02:00
lz deleted branch fix/mobile-workspace-card-taps 2026-05-26 20:52:44 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lz/agent-nexus!27
No description provided.