Skip to content

CONTRACT: feat(ui-react,ui-kit): wire the Start card for service, persona and recovery (#3698) - #3970

Merged
schlessera merged 20 commits into
mainfrom
feat/3698-wire-start-card
Nov 11, 2026
Merged

schlessera merged 20 commits into
mainfrom
feat/3698-wire-start-card

Conversation

@schlessera

@schlessera schlessera commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Closes #3698

What changed

Live conversation now opens on the kit StartCard (#3692, used unchanged apart from one CSS line) instead of the pre-Start disclosure sheet. The card names the service Start would open and lists the full former disclosure behind "What's shared". Its Service row shows Change only when two or more services are usable; each press moves to the next service for this conversation only and never writes the saved default (#3616 L1). When the saved service is unavailable (S3d), the row asks to Choose a service and Start stays unavailable until one is picked; the host default is never substituted (L2). The persona list preselects the saved persona, and a pick also saves it as the default (V2).

One notice above Start covers the recovery states:

To make Start send exactly what the card shows, the conversation client gains personaChoice and choosePersona(ref | null). Start sends that ref, including the one-time standard/builtin and voice: "default" choices. A refused first Start, which opened nothing, may pick a service or persona again. A CONVERSATION_PERSONA_CHANGED refusal clears the choice. Refusals still render as the stopped VoiceNotice, whose Start again reopens the card.

Why this shape

  • Integration only. Everything is fed into the existing StartCard props; no new visual design.
  • Change cycles through the usable services. The card has a single Change/Choose action and no picker. With the two adapters that exist this is a toggle. In S3d with one usable service, Choose picks it explicitly; the disclosure line then names it before Start.
  • The client holds the per-entry persona choice. Without it, Start could send the old persona while the V2 save is in flight. The one-time choices would also have nothing to carry them. The voice status for a persona that isn't the saved one mirrors the host's providerStatus exactly. The host's own livePersona.providers wins when it describes the same file.
  • Kit fix. At 320px in S3d, the Service row's "SERVICE" key and "Choose" link broke mid-word. Both now get flex: none; white-space: nowrap. This is a layout bug fix, not a design change.
  • Focus and Escape. Focus goes to the card's Start when the card opens; the composer that opened it is gone. Escape leaves, as the sheet's Escape did.
  • "What's shared" scrolls. It carries the whole former sheet, so on a small phone it scrolls inside the card's frame.

Proof

bun run check:pr --base origin/main
{"version":1,"kind":"brain-check-pr-receipt","head":"4767ee0cf37fe548183a50eef56b01580040450b","base":"origin/main","mode":"focused","startedAt":"2026-11-11T04:45:46.845Z","finishedAt":"2026-11-11T04:47:20.913Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12219.355726},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":104.47162099999878},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":69.3655859999999},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.204413999999815},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":81636.612402}]}

New app browser test: packages/ui-react/tests/start-card-runtime.test.ts.

  • Setup. Real Chrome and a real password-mode server. Two keyless live-service doubles each have their own voices and caps. Odysseus personas are Markdown files.
  • Coverage. Every case runs at 320×640 and 1280×860: 10 pass.
    • S2+ with three personas and the Service row fits 320×640.
    • S3, S3b, S3c and S3d are each reached. Blocked Starts open nothing, and no service or voice is substituted.
    • A persona edited before Start is refused as a VoiceNotice, and Start again reopens the card.
  • Echo. The page records the conversation_start it sent, and the server records the double that opened and its options. The disclosed service, persona and voice match both.

Mutation receipts (320px case; the file was restored and passes 10/10 afterwards):

Mutation Fails at Result
Change also calls client.start() after Change: NO_CONVERSATION_FRAME_BEFORE_START received ["conversation_start"]
A persona pick also calls client.start() after a persona pick: NO_CONVERSATION_FRAME_BEFORE_START
Change also PUTs defaultProvider CHANGE_IS_NOT_SAVED received the { defaultProvider: "gpt-live", revision: 1 } write
The card's V2 save is skipped V2_PICK_IS_SAVED expected harbour-storyteller, received ithaca-steward

Updated for the card:

  • live-service-runtime.test.ts (CONTRACT: feat(ui-server, ui-react): configure the default live-conversation service in Settings › Voice (#3616) #3956's proof): 8 pass.
  • ui-react-layout offline files, 391 pass:
    • conversation.offline.tsx
    • conversation-controls.offline.tsx
    • conversation-consent.offline.tsx
    • conversation-contextual.offline.tsx
    • conversation-continuous.offline.tsx
    • conversation-discard.offline.tsx
    • conversation-endpoint.offline.tsx
    • dialogue-qualifiers.offline.tsx
    • dialogue-drain-deadline.offline.tsx
    • dialogue-recovery.offline.tsx
  • rail-mixed, 21 pass: composer-mic.pointer.tsx, attach-tooltip.pointer.tsx.
  • ui-react unit and render suites: 850 pass.

Collisions (bun scripts/collisions.ts --json --pr 3970, head 4767ee0c):

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof.
  • Acceptance criteria from the issue are all met, or the gap is named below.
  • The PR and completed/advanced issues have verified release milestones under docs/process/github.md.
  • A changeset is included, or this changes nothing a consumer can see.
  • No personal data anywhere in the diff — the leakage gate covers the whole tree.
  • The integration contract index or relevant component is updated in this same commit, or nothing in the machine surface moved.
  • Docs under docs/ reflect the change, or nothing documented moved.
  • A fail-closed guard added or changed answers the proportionate-containment checklist in this body, or no guard changed.
  • Provider history stays append-only: the provider-history guard passes, or nothing on a turn's path changed.

Anything left open

🤖 Generated with Claude Code

schlessera and others added 17 commits November 10, 2026 22:57
… each Start (#3616)

createApp accepts conversationProviders and defaultConversationProviderId;
conversationProvider still means a list of one. Startup fails on both
options, duplicate ids or an unregistered host default. A new Start uses a
one-time pick (conversation_start.providerId, which must equal the disclosed
profile), else the saved default only if registered, else the host default
or the only service when nothing is saved, else none. A saved but unusable
default never falls through. A resume keeps the service its conversation
opened with.

server_hello adds conversationProfiles and liveDefault and keeps
conversationProfile only while a service is effective (R1). A save sends
live_settings to open connections. conversation_opened adds providerSource.

GET/PUT /api/settings/voice read and save voice.live.defaultProvider in the
settings store, behind a new owner-only write guard (owner password/passkey
session or ambient human; 403 with an empty body otherwise), with 400
LIVE_PROVIDER_UNKNOWN and 409 LIVE_SETTINGS_CHANGED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LiveServiceSettings draws the registered services as 52px radio rows with
saved default, host default and in use now marks, a dashed unavailable row
that cannot be chosen, the zero and one service variants, saving, stale and
failed states and the read-only owner line. A wide container puts the label
in a 140px column and two services side by side. Stories cover every state
at 320px and desktop in both themes, plus the full pane with Dictation and
Persona neighbours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and before Start (#3616)

Settings › Voice adds the Live service group under Dictation. Picks save
brain-wide at once through a root-owned, latest-wins queue; 403 turns the
group read-only, 409 reloads with "Changed on another device". The
conversation client reads the hello roster and live_settings, pins the
service an explicit Start agreed to for that entry, and exposes
chooseService() for a one-time pick that is never saved; Start sends
providerId. The disclosure sheet offers that pick when several services are
usable or the saved default is unavailable, as a minimal stand-in until the
Start card (#3698).

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#3616)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live-service default joins the persona group on the one
/api/settings/voice route (design §6): top-level defaultProvider/revision
beside persona with its own revision, under the owner-only write guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ith personas (#3616)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sona and recovery (#3698)

Live conversation opens on the kit StartCard instead of the pre-Start
disclosure sheet. The card names the service Start would open, carries the
full former disclosure behind "What's shared", shows Change only with two or
more usable services (one-time, never saved), requires an explicit Choose when
the saved service is unavailable, and saves a picked persona as the default
(V2). S3/S3b/S3c and an unusable persona render as the card's notice, with
one-time "Use the default voice this time" and "Use Standard this time".

The conversation client gains personaChoice/choosePersona so Start sends
exactly the persona and voice the card shows; a refused first Start may pick
again. The kit Service row no longer breaks its key and link at 320px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: ui-react React chat/files/voice components, stores, WebSocket transport. 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 11, 2026
@uploads-sh

uploads-sh Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-kit/src/tokens.css, packages/ui-react/src/components/voice/conversation-field.tsx, packages/ui-react/src/components/voice/start-card.tsx and 4 more). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 3970
  • 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 3970 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3970 --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: 3970 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 3970. More in the github-screenshots skill or the agent docs.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 11, 2026
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 05:09
…#3698)

A Start without a card pick sends the saved persona; if the host's fresh
live_persona frame arrives before Start, the edit is already disclosed and
Start opens it. Picking the persona on the card pins the old revision, so
the refusal path is the one exercised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera marked this pull request as draft November 11, 2026 05:42
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 05:42
@schlessera
schlessera merged commit 4a8c43f into main Nov 11, 2026
48 of 50 checks passed
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. area: ui-react React chat/files/voice components, stores, WebSocket transport. 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-react: wire the Start card (S1–S5) — service, persona and recovery

1 participant