Skip to content

FE-1793: Unify Chat and Voice conversation presentation - #9829

Merged
kostandinang merged 31 commits into
mainfrom
ka/fe-1793-conversation-ui
Oct 1, 2026
Merged

kostandinang merged 31 commits into
mainfrom
ka/fe-1793-conversation-ui

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Make Chat and Voice turns easier to follow while keeping their existing execution behavior. This PR now contains only conversation presentation; permissions/reset and experiment lifecycle are reviewed separately above it.

🔗 Related links

🚫 Blocked by

No prerequisite PR. This PR targets main; voice steering #9826 is independent.

Stack: main → this PR → #9856 → #9857 → #9836.

🔍 What does this change?

  • Group reasoning and tool calls under Activity, followed by Chat answer cards and produced cards. Preserve optional Voice brief/reply rendering contracts without generating their content.
  • Keep one inline composer action: Voice when empty, Send for text, Stop during a response. The textarea starts as one row and grows with input.
  • Keep answer Copy/Retry, draft and scroll preservation, audio settings and recovery feedback together with their tests and guide sections.
  • Keep generic produced-card placement here so an experiment draft stays mounted when Activity collapses.
  • Use a compact initial microphone consent card and collapse floating Voice to a 56px dock, without leaving an empty panel. Preserve consent wording and restore the expanded panel's position and size.
  • Animate the red disconnected waveform independently of microphone input, respecting reduced motion. Show concise recovery copy with Retry voice and Back to chat; retain the full diagnostic under Technical details.
  • Include two Activity-related integration-test adaptations previously published in the mediation stack.
  • Exclude new destructive approvals, fresh-conversation reset, experiment lifecycle/follow-up and all petrinaut-core changes.
  • Select this presentation with an explicit aiAssistant.presentation: "brunch" option instead of inferring it from the tab label. Other hosts keep the stock presentation: reasoning and tool calls shown directly, the stock placeholder, Stop styling and auto-layout labels, and no Copy/Retry. Tool status dots and reasoning styling are shared.
  • Also included beyond presentation: a public preserveDraft flag on composer text submissions, a Live microphone test action, and a 0.05 step for the speech-speed slider.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

  • Modifies an npm-publishable library and adds a patch changeset for @hashintel/petrinaut.

📜 Does this require a change to the docs?

  • User-facing guide changes are included.

🕸️ Does this require a change to the Turbo Graph?

  • No execution-graph changes.

⚠️ Known issues

  • The commit list retains the combined UI development history; extraction commits reduce the net comparison against main to presentation. Review Files changed for the current scope.
  • The history-fixture fix remains a separate signed commit with unchanged code.
  • No provider or microphone testing was performed. Mocked browser rendering does not establish live-audio behavior.

🐾 Next steps

Review permissions, experiments and mediation as separate feature layers above this PR. This PR remains draft.

🛡 What tests cover this?

  • Main-based presentation tree: all 18 Turborepo build, type-check and lint tasks passed. Both complete unit suites passed separately.
  • Petrinaut: 173 files / 1,514 tests passed.
  • Website: 61 files / 884 tests passed.
  • Formatting and git diff --check passed.
  • The browser checks below predate the main-based separation. The rendered component sources remain unchanged; they are not new browser runs on this head.
  • Browser DOM checks found one composer action in each Voice/Send/Stop state and verified that Voice and Send share the textarea row. Stable collapsed/expanded Activity screenshots were inspected.
  • The floating-collapse regression failed at 640px before the fix and passed at 56px afterward. Browser checks cover dock position and restoration of moved panel geometry. Desktop and 390px consent screenshots were inspected in unchecked and checked states; no microphone or provider was started.
  • Recovery checks sampled six distinct red-wave frames after first paint and verified a static waveform under reduced motion. Keyboard expansion of Technical details, Back to chat and the 390px layout were checked; screenshots were inspected.

❓ How to test this?

  1. Run turbo run build test:unit lint:tsc lint:eslint --filter @hashintel/petrinaut --filter @apps/petrinaut-website with the repo-pinned Node and Turbo versions.
  2. Open the BrunchWithVoiceAvailable, ChatTurn, and StreamingReasoning Storybook fixtures.
  3. Type and clear text; check the single inline action switches between Voice and Send. In the streaming fixture check that only Stop remains.
  4. Expand/collapse Activity and its reasoning/tool disclosures. Check that the answer and composer remain readable.
  5. Open initial Voice setup and inspect the consent card. In the floating Voice fixture, move the panel, minimize it, and restore it; check that only the compact dock remains while minimized and the expanded geometry is restored.
  6. Open the error fixture. Verify the moving red waveform, reduced-motion behavior, concise recovery copy and expandable technical diagnostic.

📹 Demo

Controlled Storybook recordings; no live provider or microphone is exercised.

Chat Activity

pr-9829-chat-activity.mp4

Floating Voice dock

pr-9829-floating-voice-dock.mp4

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Oct 1, 2026 6:29am UTC
petrinaut Ready Ready Preview Oct 1, 2026 6:29am UTC
petrinaut-docs Ready Ready Preview Oct 1, 2026 6:29am UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Oct 1, 2026 6:29am UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps area/apps > hash.design Affects the `hash.design` design site (app) labels Sep 24, 2026
@kostandinang
kostandinang force-pushed the ka/fe-1793-conversation-ui branch from 6ab7f92 to 1979edd Compare September 24, 2026 15:29
@kostandinang
kostandinang changed the base branch from kostandin/fe-1789-brunch-voice-steering to main September 25, 2026 11:18
@kostandinang
kostandinang added this pull request to stack #9837 September 25, 2026 11:24
@kostandinang kostandinang changed the title FE-1793: Unify the Brunch conversation UI for chat and voice FE-1793: Unify the Brunch conversation UI for Chat and Voice Sep 25, 2026
kostandinang and others added 3 commits September 29, 2026 18:22
A host can submit text with preserveDraft while an interactive tool is
pending. The tool path now honours that flag like the message path, so a
background result no longer wipes the person's unsent draft.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hosts without a primary label read AI again, a custom label is shown in both input modes, and the attention announcement uses the visible tab label. Waiting for Brunch appears only in Brunch Chat, the working label shows beside stock transcripts, and spoken-turn thinking no longer names Brunch.

Co-authored-by: Cursor <cursoragent@cursor.com>
…aming

Brunch Chat shows Waiting for Brunch in a fixed status row above the composer, keeps activity, thought and tool disclosure choices while a response streams, bounds long activity, keeps hidden prompt chips in place, and moves voice guidance back into an information popover.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

kube
kube previously approved these changes Sep 29, 2026
The follow scroll fires the same scroll handler as the reader. When content grew by more than 96px mid-animation, the trailing position turned follow off and later tokens stopped pinning the transcript. Only an upward move, which the follow scroll never makes, now stops following.
Card placement came from the resolved interactive definition, which exists only once a call's input is available or its output arrived. A draft tool whose arguments were streaming, or whose call failed, was grouped under Activity and hidden when the fold was collapsed. Placement now follows the registered tool, whatever the call's state.
Each streaming period restarted the elapsed clock, so a settled Activity label showed only the time after the last approval. Active periods now add up, and time spent waiting for a decision is not counted.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…tation

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread libs/@hashintel/petrinaut/src/ui/petrinaut.tsx Outdated
kube
kube previously approved these changes Sep 30, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

lunelson
lunelson previously approved these changes Sep 30, 2026

@lunelson lunelson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — all threads addressed.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

kostandinang and others added 3 commits October 1, 2026 08:24
Forward the active and stopped state to stock tool rows so they show elapsed time and Cancelled, attach the stopped note only to assistant turns with a transcript-level note for a turn stopped before any reply, and keep the compact Stop treatment in the Brunch presentation.

Refs FE-1793

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2fcd04d. Configure here.

This branch was successfully deployed

3 active deployments
Preview – petrinaut-docs — 2fcd04d0 Deployed Oct 1, 2026 by vercel[bot]
Preview – hash — 2fcd04d0 Deployed Oct 1, 2026 by vercel[bot]
Preview – petrinaut — 2fcd04d0 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

4 participants