Skip to content

CONTRACT: feat(ui-kit): a backspace icon for Discard draft in the voice field (#3762) - #3764

Merged
schlessera merged 16 commits into
mainfrom
feat/3762-backspace-icon
Nov 10, 2026
Merged

schlessera merged 16 commits into
mainfrom
feat/3762-backspace-icon

Conversation

@schlessera

@schlessera schlessera commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #3762

What

  • ICONS gains the semantic key backspace, mapped to lucide Delete (the backspace-key glyph).
  • The voice stories' Discard draft control (draftControls, shared by every held-draft live state: L1d, L1u, L4d) draws it in place of circle-minus. The accessible name stays "Discard draft"; the Live stories' controlNames assertions are unchanged and pass.
  • tests/icon-map.test.ts: counts move to 93 keys over 91 distinct glyphs, the comment records the addition, and ICONS.backspace === lucide.Delete is pinned.
  • Contract: package-api.md records the new key (additive, 0.45.0), api-report/ui-kit.txt regenerated; the first commit is prefixed CONTRACT:. Changeset: @schlessera/brain-ui-kit minor, since an additive contract change ships in a minor (same as the enlarge key in module-diagrams: frame rendered diagrams like other content blocks, with open and share actions in the header #3397).

Validation

  • Mutation receipt: mapping backspace: CircleMinus fails icon map > all 93 keys survive, over 91 distinct glyphs with Expected: 91 / Received: 90; restored, 3/3 pass.
  • bun test packages/ui-kit/tests: 1037 pass, 0 fail.
  • Storybook voice stories, dark and light (--project=storybook --project=storybook-light stories/voice): 10 files, 134 tests pass.
  • fix(ui-kit): the tall voice field grows to hold its body under enlarged text #3779 then added enlarged-text captures of the held-draft states, drawn with the old glyph. After merging it, a second pinned-container run (953 tests pass) changed exactly the 8 voice-live-enlarged-{l1d,l4d}-{320,desktop}-{dark,light} baselines, now showing the backspace glyph; nothing else moved. bun test packages/ui-kit/tests 1041 pass, voice stories 138 pass, and check:pr was rerun on dbbc5fc49 (receipt below).
  • Pinned-container visual run (--project=visual --update, whole project, 949 tests pass): exactly 12 baselines changed, all Discard-draft states — voice-live-{l1d,l1u,l4d}-{320,desktop}-{dark,light}. No other baseline changed. Reviewed: the backspace glyph replaces circle-minus, nothing else moves.
  • bun run lint clean; build ok.
{"version":1,"kind":"brain-check-pr-receipt","head":"dbbc5fc4908aa539c10b7f8fd005b462973a833f","base":"origin/main","mode":"focused","startedAt":"2026-11-09T14:53:40.603Z","finishedAt":"2026-11-09T14:55:12.543Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":16726.004247},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":139.44419399999606},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":135.88326100000268},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":27.254626000001736},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":74892.108649}]}

Refreshes

While waiting for the integration lease, the branch is refreshed only by merging origin/main and pushing, and only when main's new commits touch none of this PR's files. #3758 then landed on package-api.md and api-report/ui-kit.txt (separate sections). Merging it was clean, bun run api-report regenerated with no further change, and check:pr was rerun on the merge head 7fec15e4f (receipt above). Later refreshes that touch none of this PR's files are merge+push only (latest: a server-side merge of main via GitHub's update-branch to eb4695c25; main's 3 new commits touch none of this PR's files); hosted proof runs on the exact refreshed head. The contract run for e692a45d4 failed with a GitHub "workflow file issue" and no jobs; another PR's contract run failed the same way at the same minute. A fresh contract run was started by this body edit, not by rerunning the job.

Collisions

bun scripts/collisions.ts at head 7eaf4ac6c21869883732eeecf3cf86973ddee403: path overlaps only on docs/integration-contract/package-api.md / api-report/ui-kit.txt with #3393, #3622, #3662, #3735, #3743, #3758 (separate sections, append-style); no overlap on the icon map, the icon-map test or the voice stories.

🤖 Generated with Claude Code

schlessera and others added 2 commits November 9, 2026 08:53
…raft (#3762)

IconName gains `backspace`, drawing lucide's Delete (the backspace-key
glyph). The voice stories' Discard draft control uses it in place of
circle-minus; its accessible name is unchanged. Additive; no existing key
or glyph changes. Icon-map counts move to 93 keys over 91 glyphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pace glyph (#3762)

Only the held-draft live states (L1d, L1u, L4d; 320 and desktop, both
themes) change. Generated in the pinned container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 9, 2026
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. labels Nov 9, 2026
@uploads-sh

uploads-sh Bot commented Nov 9, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-kit/src/primitives/Icon.tsx and packages/ui-kit/stories/voice/_voice.tsx). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 3764
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 3764 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3764 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 3764 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 3764. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

@schlessera
schlessera marked this pull request as draft November 10, 2026 00:58
@schlessera
schlessera marked this pull request as ready for review November 10, 2026 00:58
@schlessera
schlessera merged commit e8ea534 into main Nov 10, 2026
51 of 64 checks passed
schlessera added a commit that referenced this pull request Nov 10, 2026
…field

Brings in #3764 (the backspace key for Discard draft). No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schlessera added a commit that referenced this pull request Nov 10, 2026
The live field's Discard draft draws the kit's backspace glyph, as the
signed-off stories do since #3764. The four review-permission and two
output-muted-draft baselines are regenerated in the pinned container;
two consecutive runs passed 24/24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schlessera added a commit that referenced this pull request Nov 10, 2026
…the tall voice field (#3735)

* CONTRACT: feat(ui-react): draw live conversation in the tall voice field

The live overlay's status header and control row become the #3692 kit
components, unchanged: the tall VoiceField for S5 and L1-L8, a VoiceNotice
for L9, and the composer again for L10. Mute, Interrupt and End are raised
VoiceControlButtons; Interrupt is enabled only while a reply plays (L4), and
a muted microphone does not silence brain's current sentence (V5).

Every state comes from the client's own state. The client now exposes the
capture intent it already tracks (`capture`: idle, listening, muted or
stopped) and display-only meter readings (`levels()`), documented as an
additive package API change. Capture, recovery and permission behaviour
are unchanged.

The diagnostic status lines, the provider-code details button and the
Mute mic, Stop reply and Leave voice buttons are removed. Manual review,
Recover reply audio, notices, the coverage notice, the refusal line and the
background-task list stay as they were, pending design (Refs #3699).

Refs #3699

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CONTRACT: chore(api-report): record the conversation client's capture and levels

Refs #3699

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CONTRACT: feat(ui-react): place the live overlay's functions in the tall field (#3699)

Applies the signed-off design: nothing stacks above the field.

- The body shows one message, by priority draft, refusal, reply audio
  off, client notice. A held draft reads "Draft · not sent yet"; a line
  about the draft itself (unclear audio, a bounded or trimmed review)
  takes its words' place.
- Send now and Discard draft join the controls row. R1: Interrupt
  leaves the row while a draft is held, except in L4, which carries five.
- Recover reply audio stays in the row while reply audio is off, even
  under a draft. Readiness reads "mic off" with its own body line.
- L6's body is the tap-only refusal line. L9's microphone copy ends
  "then Start again".
- R2: incomplete startup-context coverage is an inline chat notice at
  the start of the live section, from a new timeline entry; background
  tasks leave the field for the chat.

The wire.md 264px transcript line holds: both 320px layout tests pass
unchanged. wire.md now names the field's refusal line instead of the
40px strip line. Capture, recovery and permission behaviour are
unchanged; the client's notice strings become named constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CONTRACT: feat(ui-sdk,ui-server,ui-react): name the live startup context's message count (#3699)

Maintainer ruling on #3699: historyCoverage gains an optional, additive
includedMessages, the number of prior chat and spoken messages the startup
context actually carried (completed results and gap markers excluded; 0
when no history block was sent). boundHistory computes it from what it
serialized, and liveContext reports it for both engines.

The inline coverage notice now reads "Started with the last {n} messages
· Details" (pluralised), keeping the coverage-state wording only for an
older host without the count. The count is host-only display data: the
provider-facing startup text is unchanged and never carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui-react): regenerate the live field's app baselines in the pinned container (#3699)

The interruption, review-permission, notice-body and output-muted-draft
baselines show the tall field with nothing above it; notice-review is
retired with the stacked notice. The ticking connected clock is masked
so a baseline cannot depend on elapsed seconds. At doubled text the kit's
fixed 136px field cannot hold a body; the audit asserts every control
stays reachable there instead (kit follow-up filed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui-react): draw the live field's messages as VoiceText children (#3699, #3773)

Draft words stay `text`, which the kit clamps to two whole lines; the
refusal, reply-audio-off, readiness and client notice lines are messages,
which the kit never clamps once #3779 lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui-react): restore strict 2× containment in the live field audit (#3773)

With #3779 the tall field grows to hold a message body at doubled text,
so control audit and notice with review assert scrollHeight <=
clientHeight at every scale again. Failing-first: on the pre-#3779 kit
the same check failed at 2× (160 > 135).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ui-react): regenerate live field baselines over #3779 in the pinned container (#3773)

Messages are VoiceText children, never clamped, and the tall field grows
to hold them at doubled text. The last container run passed 24/24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(ui-react): Discard draft uses the backspace key (#3699, #3762)

The live field's Discard draft draws the kit's backspace glyph, as the
signed-off stories do since #3764. The four review-permission and two
output-muted-draft baselines are regenerated in the pinned container;
two consecutive runs passed 24/24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. type: feat A new capability or a change in user-visible behaviour.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-kit: a backspace icon for Discard draft in the live voice field

1 participant