feat(sidebar): mark the row a create just made - #30
Merged
Conversation
A new snippet or saved diff landed below every starred row, in a panel that is usually scrolled past its insertion point, and nothing marked it. Four channels on one event, because the sweep across all 14 themes shows no single one survives every palette: the row animates in, an accent wash peaks at 26% (the sepia minimum) and decays to nothing, a 3px --accent rail wipes down the row's RIGHT edge and stays, and a NEW keyline chip says it in words. The right edge is deliberate — the left carries the pin bar, and starring a row you just made is the ordinary response to finding it, so the two states stack. Plus the half that is behaviour: expand a collapsed section, scroll the row into view, say so when a filter hides it, and retire the mark on the row's primary action, the next create, or 60s. Why not the .key.added wash already in the repo: a sidebar row has a --bg-hover, so a resting tint competes with hover rather than the panel. The tint that clears a theme's own hover step ranges 12% (dim) to 26% (sepia), and on light no tint under 60% clears it at all. The marker is ONE key on uiStore, not one per store: "the row you just made" is a single row, so saving a diff and then adding a snippet must leave one mark, not two in different sections. It carries a `marks` opt-out, because add() is also the seam for seeding, bulk import and backup restore — none of which the user made. To fit at that seam without raising a size ratchet, the pure logic came out of both stores: utils/snippetState.js (tag palette and arithmetic, legacy-shape migration) and utils/vaultEntries.js (entry coercion, diffFormatTag). Both stores re-export their public names, so no caller changed; snippetStore 575 -> 496, vaultStore 408 -> 366, both baselines retightened. theme-sweep gains a new-row surface, and probes may now name the channel they gate — the accent keyline was collected and never enforced, which would have left the design's central claim unguarded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A new snippet or saved diff landed below every starred row, in a panel that is usually scrolled past its insertion point, and nothing marked it.
Spec:
specs/2026-08-07-new-row-highlight/plan.md— from interaction proposal artifact89f60c6d.What it does
Four channels on one create event, because the sweep across all 14 themes shows no single one survives every palette:
--accentdown the row's RIGHT edge, wipes in and staysNEWkeyline chip — says it in words, so hue cannot fail itPlus the behavioural half: expand a collapsed section,
scrollIntoView({ block: 'nearest' }), say so when a filter hides the row, and retire the mark on the row's primary action, the next create, or 60s.The rail goes right because the left carries the pin bar — and starring a row you just made is the ordinary response to finding it, so the two states genuinely co-occur and must stack.
Why not the wash already in the repo
.key.added(TrustedKeyRow.css) works in a dialog whose rows have no hover background. A sidebar row has--bg-hover, so a resting tint competes with hover, not the panel. The tint needed to clear a theme's own hover step ranges 12% (dim) to 26% (sepia), and on light no tint ≤60% clears it at all.Evidence — all 14 themes
Every number was re-derived from
themes.cssbefore the code was written, then confirmed against the live DOM bymake theme-sweep. The two agreed exactly.--text(min sepia 8.55)--accentvs--favorite: 0.044 ΔE on dim and matrix — which is why words, not hue, carry the identificationNotable
uiStore, not one per store. "The row you just made" is a single row, so saving a diff then adding a snippet must leave one mark, not two in different sections.marksopt-out.add()is also the seam for seeding, bulk import and backup restore. Caught by reading the sweep's own PNGs, where the first-run seeded example wore a NEW badge.utils/extractions. The size ratchets refused the growth at the right seam, so the pure logic came out instead of a number going up:utils/snippetState.jsandutils/vaultEntries.js. snippetStore 575 → 496, vaultStore 408 → 366, both baselines retightened. Stores re-export their public names, so no caller changed.theme-sweepprobes can now name the channel they gate. The accent keyline was collected and never enforced, which would have left the design's central claim unguarded.Verification
npm run check— green. 2650 passed | 2 skipped; coverage 95.1 st / 88.03 br / 95.7 fn / 96.1 limake e2e(Docker, full suite) — 395 passed, 2 skipped (the macOS-gated specs)make theme-sweep(Docker, all 14) — 504 measurements, none under floore2e/new-row-marker.spec.mjswatched red → green; it asserts the rail's box and computed colour, the badge's keyline vs label, and that a starred new row keeps both marks🤖 Generated with Claude Code