Skip to content

Make highlighted rows clickable across their whole area - #5891

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-row-click-targets-thr_mz22xha5hz
Oct 20, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-row-click-targets-thr_mz22xha5hz

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Several list rows put their hover highlight on a padded wrapper, while the element that runs the action covers only part of that wrapper. A click in the padding highlights the row and does nothing. The reported case is the New tab "Start terminal" row (NewTabActionRow). The row div is 28px tall with px-2 py-1.5, and its <button> fills only the 16px content box. A click in the top or bottom 6px or the left 8px lands on the div, which has no handler, so no terminal starts. Rapid repeat clicks then select the label text. The drag-and-drop click guard is not involved: the reported list had one action, which renders without DndContext.

An audit of row components found the same mismatch in three other places:

  • Settings > Projects rows: the Link is text height inside a py-1.5 px-2 hover wrapper.
  • The sidebar navigation customize rows (sidebar-visibility-customize): 4px side padding.
  • The Codex MCP elicitation radio and checkbox option rows: padding, the gap, and the label's right side.

What changed

Each affected row routes its whole highlighted area to its action, using patterns the codebase already has:

  • NewTabActions.tsx, sidebar-visibility-customize.tsx and plugins/provider-codex/src/mcp-elicitation-fields.tsx stretch the button or label over the relative row with after:absolute after:inset-0 (as info-list.tsx does). Drag handles, checkboxes and trailing controls are positioned above it. These rows are also select-none, so repeated clicks no longer select the label.
  • In ProjectsSettingsSection.tsx, the wrapper navigates on click and skips row actions through targetsResourceAction, matching the Settings > Machines row.
  • packages/plugin-registry/r/sidebar-visibility-customize.json is regenerated from the shared-ui source.

I left the sidebar footer "More menu" customize rows alone. They highlight on hover, but the row has no action of its own (only its "+" badge does), so making a row click add the item would be new behavior.

No wire, CLI, or plugin API changes.

How you verified

I used real CDP Input.dispatchMouseEvent clicks in Chrome at DPR 2, on a start:worktree build from this branch and on a matching base.

Case Base Branch
New tab "Start terminal": click 3px below the row's top edge Row highlights, no terminal (elementFromPoint = row div) Terminal starts
Same row: left padding +3px / bottom −3px with a 2px drag / far right No terminal Terminal starts in each case, no text selected
Same row: center click Terminal starts Terminal starts
Reorderable New tab list (thread view, 2 actions): drag the handle — Order changes
Same list: click the drag handle — No action runs
Settings > Projects: click the top-left padding corner with a 2px drag Lands on the wrapper div Opens the project's settings
Settings > Projects: click the overflow menu — Menu opens, no navigation
Customize navigation: click the 2px left edge Lands on the row div Toggles the item
Customize navigation: drag the handle down and back — Reorders, nothing toggles
MCP elicitation (Ladle story): corner clicks on radio, checkbox and Yes rows — Each selects or toggles; a direct click on the control toggles once

turbo run typecheck lint passes for @bb/app, @bb/shared-ui, @bb/plugin-registry and provider-codex. Tests pass for @bb/plugin-registry and provider-codex, plus the sidebar-visibility-customize, settings and New tab tests in @bb/app. I added no regression test: jsdom has no layout or hit-testing, so a test could only assert class names.

AGENT GENERATED

🤖 Generated with Claude Code

Several list rows put their hover highlight on a padded wrapper while the
element that runs the action covers only part of it. A click in the
wrapper's padding highlighted the row but did nothing. The New tab
"Start terminal" row was the visible case: its button filled only the
16px content box of a 28px row, so the top and bottom 6px and the left
8px were dead.

Each affected row now routes the whole highlighted area to its action,
using patterns the codebase already has:

- New tab actions, the sidebar navigation customize rows, and the Codex
  MCP elicitation option rows stretch the button or label over the row
  with an `after:absolute after:inset-0` pseudo-element. Drag handles,
  checkboxes, and trailing controls stay above it.
- Settings > Projects rows navigate on a wrapper click and skip clicks on
  row actions, like Settings > Machines.

Rows that carry the stretched target also stop selecting their text on
rapid clicks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 90b2738 into main Oct 20, 2026
47 checks passed
@ymichael
ymichael deleted the bb/fix-row-click-targets-thr_mz22xha5hz branch October 20, 2026 18:48
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

Task embed cards applied a hover background to their wrapper, but the
primary button covered only the content. Clicking the side padding,
vertical padding, or gap before the open arrow did nothing. Loading
cards also highlighted despite having no action. This is the same
hit-area mismatch addressed for other rows in #5891.

## What changed

Stretch the primary button over the rounded card and keep the
open-in-Tasks arrow above it as a separate control. Show a focus ring
around the whole primary target, prevent repeated clicks from selecting
text, and apply hover styling only to resolved, actionable cards.

To unblock CI against current main, this branch also carries the
existing query-tags lockfile repair from #5897 (switch its typecheck to
the repository's pinned tsrs) and bumps the plugin SDK to 0.6.61 because
the npm version guard detects changed generated declarations in 0.6.60.
Neither changes the task-card interaction contract.

## How you verified

- Reproduced the dead padding and gap with real browser pointer clicks
before the fix, using the actual component and production styles in an
isolated fixture.
- Verified the same coordinates open the side panel after the fix, while
the arrow only opens Tasks. Also checked keyboard Enter/Space, the
full-card focus ring, rounded corners, fallback navigation, retry, the
missing-task arrow, and loading without hover feedback.
- Started this branch with `pnpm start:worktree`, seeded a disposable
task and embed message, and confirmed a real padding click opens the
task in the production app.
- `pnpm exec turbo run typecheck lint test --filter=bb-plugin-tasks`
passed, including all 409 tests.
- Formatting and `git diff --check` passed. No new jsdom regression
test: it cannot exercise layout or pointer hit testing.

> AGENT GENERATED

---------

Co-authored-by: Ahmed Hesham Abdelkader <[email protected]>
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

Thread search palette rows highlighted their entire flex wrapper, but
only the inner option and the separate Open in split button handled
clicks. The strip before that button and the space above, below, and
beside it highlighted without opening the thread. This is the same class
of hit-area mismatch addressed in #5891.

## What changed

Move the primary click handler and pointer cursor to the highlighted
wrapper so its whole area opens the thread. Stop propagation on Open in
split so it performs only the split action, and prevent repeated clicks
from selecting row text. Status tooltips retain their existing hit
targets. Also regenerate the missing TypeScript 7.0.2 package and
platform snapshots in the existing lockfile: the query-tags alias
already referenced that version, but frozen CI installs failed before
any checks could run. No dependency declarations change. Bump the Plugin
SDK patch version to 0.6.61 because the generated declarations inherited
from main differ from the already-published 0.6.60 package and fail the
npm version guard. No wire, CLI, or plugin API changes.

## How you verified

- Reproduced with real browser coordinate clicks before editing: the
strip before Open in split, space above it, and right edge left the
highlighted palette open.
- After the fix, real clicks before, above, below, and beside the
button, plus the main content, open the selected thread normally.
- A direct Open in split click opens a second pane; the row edge remains
clickable when that button is hidden because the thread is already open.
- `pnpm exec turbo run test --filter=@bb/app --
src/components/commands/CommandPalette.test.tsx`: 71 tests passed,
including split activation without primary navigation.
- `pnpm exec turbo run lint typecheck --filter=@bb/app`: passed (lint
warnings, no errors).
- `pnpm install --frozen-lockfile --ignore-scripts`: passed after
regenerating the missing lockfile entries.
- Built and smoke-checked `pnpm start:worktree` with synthetic palette
threads.

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

The GitHub PR file diff header highlighted its entire padded row on
hover, but only the small expand glyph toggled the diff. Real clicks on
the padding, filename text, and addition/deletion counts did nothing.
This is the same hit-area mismatch addressed for other rows in #5891.

## What changed

Stretch the existing toggle button over the highlighted header using the
established positioned pseudo-element pattern. Keep the workspace
filename link above that area so its file-opening action remains
available. Expose the toggle state with `aria-expanded` and prevent
accidental text selection on repeated clicks.

Regenerate the lockfile after syncing main to restore the missing
TypeScript 7 package entries introduced by #5640. CI previously stopped
at frozen dependency installation before running any code checks. Bump
the SDK patch version for the same upstream change’s updated bundled
contract declarations, as required by the npm version guard.

## How you verified

- Reproduced before the change with real Chromium clicks: top/left
padding, counts, and filename did nothing; the glyph expanded the diff.
- Verified after the change with real clicks on all four padding edges,
counts, filename, and glyph for modified, removed, and oversized-diff
fixture files. Each expands and collapses; Enter and Space also work.
- Confirmed padding clicks on a `pnpm start:worktree` build with local
synthetic PR data.
- `pnpm exec turbo run typecheck lint test --filter=bb-plugin-github`
passed, including all 44 tests.
- `pnpm exec turbo run build --filter=bb-plugin-github` passed.

- `pnpm install --frozen-lockfile --ignore-scripts` passed after
regenerating the lockfile.

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

The Docs HTML embed card highlighted its entire padded wrapper on hover,
but only its smaller preview and Open in Docs buttons handled clicks.
Clicking the side padding, top/bottom edges, or gap between buttons did
nothing. This is the same class of issue addressed by #5891.

## What changed

Stretch the preview button's pseudo-element over the whole card, using
the pattern from #5891. Position the separate Open in Docs button above
it so that action remains independent. Prevent text selection on
repeated card clicks and show the pointer cursor across the preview
target.

## How you verified

Reproduced with real mouse clicks in an isolated source app before
changing the code: left/right padding, the top edge, and the button gap
highlighted the card without opening a preview; clicking the title
opened the HTML document.

After the change, real clicks on left/right padding, the gap, top/bottom
edges, and the title all opened the preview. Enter and Space opened the
preview; Tab reached Open in Docs, and both keyboard activation and
mouse clicks on that button navigated to the full Docs document. Also
checked that the prepared `pnpm start:worktree` server renders the fixed
card.

`pnpm exec turbo run typecheck lint test
--filter=bb-plugin-simple-notes` passed, including all 113 tests. Lint
reported eight existing warnings and zero errors. `pnpm exec turbo run
build --filter=bb-plugin-simple-notes` and `git diff --check` passed.

No new test: jsdom does not provide the layout and hit testing needed to
reproduce the inactive padding; real browser clicks verified this
behavior.

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

Account Pooler account rows put their hover highlight and padding on a
wrapper around the Open button. Clicking the highlighted padding landed
on the wrapper and did nothing, matching the class of bug addressed in
#5891.

## What changed

Stretch the account button over the highlighted wrapper using the
existing pseudo-element pattern. Keep the actions menu and details
chevron above that target, and prevent incidental text selection on
repeated clicks. No wire, CLI, or plugin API changes.

## How you verified

Reproduced with real browser clicks before editing: a click 3px inside
the highlighted top-left corner did nothing, while clicking the account
text opened details. After the fix, real clicks on corners, left
padding, the gap beside the menu, and the center open details. Verified
the actions menu and chevron, keyboard activation, disabled accounts,
drag reordering, and the compact 390px layout. Confirmed the padding
click again on a `pnpm start:worktree` production build with two
synthetic accounts.

`pnpm exec turbo run typecheck lint --filter=bb-plugin-account-pool`
passes with two existing React Compiler warnings. Formatting and `git
diff --check` pass. No unit test added because jsdom cannot verify the
layout and hit-testing that caused this bug.

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

Prompt Library popup options highlight a padded wrapper, but only the
inner buttons handle clicks. Real mouse clicks in the highlighted
padding land on the wrapper and do nothing. This is the same hit-area
mismatch addressed for other rows in #5891.

## What changed

Stretch each option's primary button across its highlighted row using
the existing pseudo-element pattern. Keep the separate star button above
the stretched target, and prevent repeated row clicks from selecting
text. No wire, CLI, or public API changes.

## How you verified

- Reproduced before editing with a real mouse click 3px inside the row's
top-left corner: no action; clicking the inner button saved the draft.
- Verified real clicks in top-left, left, bottom-right, and right
padding select the prompt preview after the fix; the corner of Star
current draft saves the draft.
- Verified Unstar acts independently without changing the selected
preview, keyboard ArrowUp/Enter inserts the highlighted prompt, and
compact 500px layout opens the preview from a padding click.
- `pnpm exec turbo run typecheck lint test
--filter=bb-plugin-bb--prompt-library` passes: 49 tests across 2 files.
Lint reports one existing set-state-in-effect warning.
- Started a `pnpm start:worktree` build with two sample prompts for
manual sanity checking.

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 20, 2026
## Human comments

## What was wrong

Concurrency limit host rows applied a hover background to the entire
padded wrapper, but only the number input was interactive. Clicking the
highlighted host name or padding did nothing, implying an action that
the row did not provide.

## What changed

Removed the host row's hover background in
`plugins/concurrency-limit/app.tsx`. The number input remains the
editable control. This fixes another instance of the misleading row
highlight addressed in #5891.

## How you verified

- Reproduced before the change with real browser clicks in an isolated
source app: clicking the row corner highlighted it without focusing the
input; clicking the input focused it.
- After the change, real clicks on the corner, host text, and bottom
padding produced no row highlight. Editing a host limit persisted after
reload; clearing it restored Auto after reload.
- `pnpm exec turbo run typecheck lint
--filter=bb-plugin-concurrency-limit` passed.
- Built and started `pnpm start:worktree`, checked server/daemon health,
and confirmed the built settings page uses the updated row styling.

> AGENT GENERATED
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