Skip to content

fix(devknobs): grab tray follows the page theme and keeps one note - #113

Merged
mertbuilds merged 2 commits into
mainfrom
feat/grab-one-note
Nov 26, 2026
Merged

mertbuilds merged 2 commits into
mainfrom
feat/grab-one-note

Conversation

@mertbuilds

Copy link
Copy Markdown
Collaborator

Round 2 of grab multi select (#112), from Mert's review of the tray.

What changed

  • The selection tray now follows the page's theme: a dark tray on a dark page, a light tray on a light page. Before, it took the label pill's inverted theme, so a dark page got a light tray. The label pill keeps its inverted look.
  • One note for the whole selection. The note field on each item is gone. n focuses the one note, Return adds a line in it, and ⌘↩ copies.
  • Item labels show in full. The list grid could grow wider than the tray, and focusing a field scrolled it sideways, which cut the start of a label ("dd Row" for "Add Row"). The column is now minmax(0, 1fr), and a long label only gets "..." at its end.
  • Docs (grab guide and reference) and the CHANGELOG Unreleased entry now describe one note.

Nothing was copied from agentation (PolyForm Shield 1.0.0). This is our own code.

Proof

  • Real browser on https://knobs.localhost/#try with a dark color scheme: drag around one card, shift click a second, n, type a note, ⌘↩. The tray has data-page="dark" and background rgb(22, 22, 22). Copied text:
1. [<section aria-labelledby="_R_7db6_" data-card="half" /> in Card (at src/lib/card.tsx:128:5) in SchemeCard (at src/demo/look.tsx:346:5) in Stage (at src/demo/stage.tsx:25:7)]
2. [<span aria-hidden="true" /> in ContrastCard (at src/demo/look.tsx:388:9) in Stage (at src/demo/stage.tsx:26:7) in Landing (at src/routes/index.tsx:310:11)]

Note: make these use the same spacing
  • Light color scheme: the tray has data-page="light" and shows light.
  • Long label before the fix: list scrollWidth 427 against clientWidth 368, scrollLeft 27.5 after focus, so the start of the label was cut. After the fix: 368/368, scrollLeft 0, and the label start shows.
  • One element with no note copies the same bytes as before (unit test formatPicks([one]) === joinEntries([one])).
  • bun test in packages/devknobs: 4696 pass, 0 fail. Web tests: 71 pass. Typecheck, lint and format check are clean.
  • Recording and screenshots are on Mert's review card (dark mode recording).

Weakened checks

None. The removed tests covered the per item notes, and that feature is gone.

Risk

Low. Grab tray UI only, not released yet (Unreleased in the CHANGELOG). GrabEntry.note was removed, but it only existed in the unreleased #112.

How to revert

Revert this PR's squash commit on main. No release, data or config depends on it.

…s whole labels

The tray took the label's inverted theme, so it was light on dark pages.
Mounted nodes now get data-page from the page's own theme, read at mount.

Per-element notes and their n focus are gone. One note covers the
selection and goes last in the copy. One element with no note still
copies its line alone.

The list's implicit grid column grew to the rows' min-content, and the
list, a scroll container, scrolled sideways on focus, cutting the start of
a row. The column is now minmax(0, 1fr) and the label takes the row.
@mertbuilds
mertbuilds merged commit 2765c45 into main Nov 26, 2026
3 checks passed
@mertbuilds
mertbuilds deleted the feat/grab-one-note branch November 26, 2026 09:24
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