Skip to content

ui-kit: open a spoken turn's transcript details from a long-press or the context menu, without the evidence glyph #3728

Closed

Description

@schlessera

Context

Part of #3690. #3700 wired the #3692 spoken-turn marks into the chat (PR linked from #3700). Epic #3690 says the "?" evidence glyphs leave the chat, and #3700 says a turn's details (confidence, generated vs heard, timing) open from a long-press or the context menu.

The kit cannot do that yet. The only way to reach the transcript details is the glyph trigger inside TranscriptQualifiers (export function TranscriptQualifiers, packages/ui-kit/src/conversation/TranscriptQualifiers.tsx:67-141). That component owns the details dialog, the tooltip and the focus return, and nothing outside it can open them. #3692 shipped no details surface for spoken turns. #3700 must use the kit unchanged, so it keeps the existing glyph trigger, now placed under each spoken turn (ConversationRecognitionRow and ConversationOutput, packages/ui-react/src/components/voice/conversation-outputs.tsx).

Scope

  • A kit way to open the existing transcript details for a spoken turn from a long-press (touch) or the context menu (pointer and keyboard), without the glyph trigger.
  • A keyboard path to the same details once the glyph trigger is gone, so evidence stays reachable without a pointer.
  • Stories and visual baselines for it under Voice/Chat marks.

Out of scope

Acceptance criteria

  • A long-press on a SpokenTurn and a contextmenu event on it open the same transcript details the glyph trigger opens today, with the same D54 focus, dismissal and focus-return behaviour.
  • A keyboard-only user can open the details for any spoken turn, proven by a story play function that uses only the keyboard.
  • No glyph renders inside or beside a spoken turn in the new stories.
  • Stories and 320px plus desktop baselines in both themes, and design sign-off on the keyboard path.

Verification

ui-kit story play functions and voice.visual.tsx baselines generated in the pinned image.

Contract impact

None. The ui-kit component API change is additive.

Decisions (maintainer, 2026-11-08)

  • T1: touch gets no at-rest hint that long-press exists. The pressed veil shows at 150 ms and Details opens at 500 ms.
  • T2: right-click opens Details directly, except when there is a text selection inside the turn. Then the native menu passes through, so Copy works.

2026-11-08: open decision questions answered by the maintainer and recorded above.

Activity

  1. added
    type: feat
    area: ui-kit
    priority: p2
    needs: design
    on Nov 8, 2026
  2. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Design needed: how a spoken turn's details are reached without the evidence glyph. Two things are already decided. Details open from a long-press or the context menu (#3700), and the "?" glyphs leave the chat (#3690). What is left is how a keyboard or screen-reader user reaches the same details once the 44px glyph button is gone, and whether long-press needs a visible hint. The code cannot settle this: removing the only focus stop without a replacement makes the evidence unreachable without a pointer.

    Read first
    - Epic #3690 ("Evidence as styling, not diagnostics"), #3700 and this issue.
    - packages/ui-kit/src/conversation/TranscriptQualifiers.tsx:67-141: today's glyph trigger, tooltip and details dialog (the D54 overlay: focus, dismissal, return).
    - packages/ui-kit/src/voice/SpokenTurn.tsx and stories/voice/ChatMarks.stories.tsx: the signed-off spoken-turn marks.
    - packages/ui-react/src/components/voice/conversation-outputs.tsx: how the app renders recognized speech and voice replies today, with the glyph trigger under each turn.
    - docs/decisions/live-conversation.md and docs/decisions/voice-permission.md (what may not change).
    
    The problem
    A spoken turn ("When is Calypso's axe back?", with a dotted uncertain word) must open its transcript details (confidence, generated vs heard, timing) from a long-press or the context menu, with no glyph shown. Today the glyph button is the only keyboard focus stop for that evidence.
    
    Design
    1. The keyboard path: make the turn focusable and use the ContextMenu key or Shift+F10, show a control on focus only, use a roving focus through the transcript, or something else. Say what Tab does through 50 spoken turns.
    2. What a screen reader announces on a focused spoken turn, and how it learns that details exist.
    3. Whether a long-press gets visual feedback (a pressed state, a hold ring) and how it is told apart from text selection on a phone.
    4. Whether the context menu is the native menu or a small kit menu with one "Details" item.
    
    Requirements to hold
    - The details content and wording stay as they are. This changes only how they are reached.
    - 44px targets and 320px legibility. No glyph inside or beside a spoken turn.
    - Long-press never selects text by accident, and never conflicts with the uncertain word's own optional click.
    - Reduced motion keeps a static form.
    - No new colour or token. Use the #3692 voice language.
    
    Deliverable
    ASCII mocks at 320px and desktop for focus, long-press and the open details, the exact keyboard sequence, and the accessible names. "Use the native context menu plus a focus-only Details control" is an acceptable answer if it is argued.
    
  3. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Design brief: reaching a spoken turn's details without the glyph

    3728-turn-details.png

    ui-kit components: TranscriptQualifiers is extended with a new trigger form. SpokenTurn is extended with an optional details prop. The Overlay dialog and the vocabulary are reused unchanged.

    Answer, argued

    There is one "Details" stop per spoken turn. It is visually hidden at rest and shows on focus or hover. Long-press and right-click open the dialog directly, with no menu.

    • Tab count does not change. Today each spoken turn has one glyph button. It becomes one Details stop, so 50 spoken turns are still 50 stops (plus any uncertain-word buttons, as today). Typed turns add none. A roving focus would save stops, but the transcript has no roving model anywhere else, and adding one only for voice turns would be the bigger surprise.
    • The turn itself is not focusable. It contains the uncertain word's own button, so making the turn a button would nest interactive elements.
    • No menu. A one-item kit menu adds a step and draws a new component. The native menu has nothing for the details. Opening the dialog directly is the shortest path.

    Keyboard sequence

    Tab            → Details stop of turn n (pill appears on the bubble's outer bottom corner)
    Enter / Space  → Transcript details dialog (D54: focus on heading)
    Esc / ×        → closes; focus returns to that Details stop
    Shift+F10 / ≣  → same as Enter, from the Details stop or the uncertain-word button
    Tab            → (uncertain word, if any) → next spoken turn's Details
    

    Accessible names

    • The Details stop reuses the existing name string: "Recognized speech; Gemini Live; unverified. Transcript details." or "Voice reply; Gemini Live; playback unknown. Transcript details." It keeps aria-haspopup="dialog".
    • The turn still announces "Spoken by you" / "Spoken by brain" from SpokenMark. A screen reader finds the stop in browse mode because it is clipped, not display:none.

    Pointer and touch

    320px · long-press                    desktop · focus / hover
                ╭────────────────────╮                 ╭────────────────────────╮
                │🎙 When is Calypso’s│ ← veil + edge    │🎙 When is Calypso’s axe│
                │   axe back?        │   at 150 ms      ╰──────────────[Details]─╯
                ╰────────────────────╯   opens 500 ms                    ↑ focus ring
    
    • Long-press (touch): the existing hover veil and edge show as the pressed state at 150 ms. There is no ring (the ring is the mic's) and no scale. Details open at 500 ms. Moving more than 10 px, or a pointercancel, aborts, so scrolling is unaffected. The turn has user-select: none; -webkit-touch-callout: none on (hover: none), so long-press never selects text. The words stay selectable inside the dialog's evidence.
    • Uncertain word: a tap opens its alternatives as today. A long-press on it belongs to the turn and opens Details.
    • Right-click (pointer): opens Details directly. If the selection is inside the turn, the native menu passes through, so Copy still works.
    • Hover: the pill shows after 300 ms, the same delay as today's tooltip. On (hover: none) it is never shown at rest.
    • Reduced motion: the pressed state is the same static veil, and the pill appears without fading.

    The pill is a 24px visual on a 44px hit area (bk-hit), absolutely placed on the turn's outer bottom corner: right for yours, left for brain's. Revealing it never shifts the layout. There is no glyph inside or beside a turn at rest, and no new colour or token.

    Kit API (additive)

    // TranscriptQualifiers
    trigger?: "glyphs" | "reveal";   // default "glyphs" = today
    // SpokenTurn
    details?: Omit<TranscriptQualifiersProps, "trigger">;  // renders trigger="reveal" and wires long-press + contextmenu to it

    Stories (Voice/Chat marks, 320 + desktop, both themes)

    Rest · Details focused · Long-press pressed · Details open · Right-click with selection (native) · Reduced motion. Keyboard-only play function: Tab → Enter → Esc, asserting focus returns.

    Open questions (needs: decision)

    • T1 Touch gets no at-rest hint that long-press exists (recommended). The alternative is a one-time line under the first spoken turn of a chat.
    • T2 Right-click passing through to the native menu when there is a selection in the turn (recommended), rather than always opening Details.
  4. added
    needs: decision
    needs: design
    and removed
    needs: design
    needs: decision
    on Nov 8, 2026
  5. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-08):

    • T1: touch gets no at-rest hint that long-press exists. The pressed veil shows at 150 ms and Details opens at 500 ms.
    • T2: right-click opens Details directly, except when there is a text selection inside the turn. Then the native menu passes through, so Copy works.

    The design brief above is otherwise unchanged. Its sign-off is still pending, so this issue now carries needs: design instead of needs: decision.

  6. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Design sign-off: spoken-turn details without the glyph (final, T1 and T2 folded in)

    3728-turn-details.png

    Signed off. The brief above stands as drawn, and T1 and T2 match its recommendations. This is the consolidated spec.

    ui-kit components: TranscriptQualifiers is extended with trigger: "glyphs" | "reveal" (default "glyphs"). SpokenTurn is extended with details?. Overlay and the vocabulary are reused unchanged.

    Behaviour

    Input Result
    Tab The turn's Details stop takes focus, and the pill shows on the bubble's outer bottom corner (right for you, left for brain)
    Enter / Space / Shift+F10 / ContextMenu key Opens Transcript details (D54: focus on heading)
    Esc / × Closes, and focus returns to that Details stop
    Pointer hover (300 ms) The pill shows. Clicking it opens Details
    Right-click, no selection in the turn Opens Details directly (T2)
    Right-click, selection inside the turn Native menu passes through, so Copy works (T2)
    Long-press (touch) Veil and edge at 150 ms, Details at 500 ms. More than 10 px of movement or pointercancel aborts
    Tap on uncertain word Its alternatives, as today. A long-press on it opens Details
    Touch at rest No hint (T1). The pill is never shown on (hover: none)
    320px · rest            long-press (150 ms)        desktop · focus
      ╭──────────────────╮    ╭──────────────────╮      ╭────────────────────────╮
      │🎙 When is ┄Calypso’s┄ │    │▒🎙 When is Calypso’s▒│      │🎙 When is ┄Calypso’s┄ axe│
      │   axe back?      │    │▒   axe back?     ▒│      ╰──────────────[Details]─╯
      ╰──────────────────╯    ╰──────────────────╯                      ↑ ring
    

    Accessibility

    • 50 spoken turns are 50 stops, as today. Typed turns add none, and the turn itself is not focusable.
    • The Details stop's name is the existing qualifier string, for example "Recognized speech; Gemini Live; unverified. Transcript details.", with aria-haspopup="dialog". It is clipped, not display:none, so browse mode finds it.
    • The pill is a 24px visual on a 44px bk-hit, absolutely placed, so there is no layout shift.
    • user-select: none; -webkit-touch-callout: none applies on (hover: none) only. The words stay selectable in the dialog's evidence.
    • Reduced motion: a static veil and no fade.
    • No glyph at rest. No new colour or token.

    Stories (Voice/Chat marks, 320 + desktop, both themes)

    Rest · Details focused · Hover · Long-press pressed · Details open · Right-click with selection · Reduced motion. Keyboard-only play function: Tab → Enter → Esc, asserting the dialog opens and focus returns.

    No open questions remain.

  7. removed
    needs: design
    on Nov 8, 2026
  8. self-assigned this
    on Nov 8, 2026
  9. added
    agent-ready
    on Nov 8, 2026
  10. added this to the 0.45.0 milestone on Nov 8, 2026
  11. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Claimed (claim token c3728-6de7), branch feat/3728-spoken-turn-details.

    Readiness: the design sign-off of 2026-11-08 21:35Z settles every open question (T1, T2), the acceptance criteria are checkable, and the cited TranscriptQualifiers (packages/ui-kit/src/conversation/TranscriptQualifiers.tsx) and SpokenTurn sources are on main. Added agent-ready and the 0.45.0 milestone. Scope stays in the kit; the app wiring is #3700's.

    Collisions: collisions.ts --paths reports only workspace-closure overlaps with older drafts, no path collisions.

  12. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Delivered in #3743, squash ab487873671eaea15301efc188d28c8cbcd0e6c2 on main (0.45.0). Candidate proof run 42652613175 passed on head 3288876 against base 4b8db90.

    SpokenTurn gains details?: SpokenTurnDetails and TranscriptQualifiers gains trigger?: "glyphs" | "reveal" (the default is unchanged). The reveal trigger is one clipped Details stop per turn. It shows as a pill on focus or after a 300 ms hover, and opens the existing D54 dialog with focus returning to the stop. It opens from Enter, Space, Shift+F10, the ContextMenu key, a right-click (T2: the native menu passes through when text inside the turn is selected) and a touch long-press (veil at 150 ms, open at 500 ms, aborted by more than 10 px of movement or a pointercancel). There is no at-rest hint (T1) and no glyph. Stories are under Voice/Chat marks, with 24 baselines covering six states at 320 and desktop in both themes. The mutation receipts are in the PR. The app wiring remains #3700's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-kitpriority: p2type: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions