Skip to content

FE-1808: Separate stock and Brunch assistant presentations - #9883

Merged
kostandinang merged 3 commits into
mainfrom
ka/fe-1808-presentation-split
Oct 2, 2026
Merged

kostandinang merged 3 commits into
mainfrom
ka/fe-1808-presentation-split

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

The Brunch conversation stack (#9829) was meant to change only the Brunch assistant, but it also changed the stock assistant that every other host and npm consumer of @hashintel/petrinaut sees. Both presentations shared one large component, so Brunch changes leaked into stock.

This PR restores the stock assistant and gives each presentation its own components.

🔗 Related links

🚫 Blocked by

Nothing. Targets main. #9886 is stacked on top.

🔍 What does this change?

  • The stock assistant (presentation: "stock", the default) matches main from before FE-1793: Unify Chat and Voice conversation presentation #9829: message order, tool rows, styling, tabs, scrolling and composer. Two fixes stay: a tool stopped mid-run shows "Cancelled" instead of spinning, and reasoning stops looking live once its reply fails.
  • The Brunch assistant is unchanged.
  • The panel is split so neither presentation renders the other's components:
AiAssistantContents (container)
├── StockTranscript  ── StockToolList
├── BrunchTranscript ── BrunchToolList, work fold, voice input provenance
├── AiAssistantComposer
└── BrunchResponseStatus

shared/: tool model, interactive tool items, row styles

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

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

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • A few isBrunchChat checks remain in the container.

🐾 Next steps

  • Move the remaining isBrunchChat checks out of the container.
  • Stop ai-assistant-panel.tsx and the stories importing from the private ai-assistant-contents/ folder (they do on main too).

🛡 What tests cover this?

  • The existing panel tests, now run once per presentation where the two differ.
  • New tests for stock scrolling, stock message order and stock reasoning after an error.

❓ How to test this?

  1. Open the Petrinaut website on this branch with the stock assistant selected, and open main from before FE-1793: Unify Chat and Voice conversation presentation #9829 (4561ee8e7b^) next to it.
  2. Send a prompt that runs tools, then stop another prompt while a tool is running. Confirm the messages, tool rows, tabs, scrolling and composer match the old main, and the stopped tool shows "Cancelled".
  3. Switch to the Brunch assistant and confirm it matches current main.

@kostandinang kostandinang added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Sep 30, 2026
@vercel

vercel Bot commented Sep 30, 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 10:19am UTC
petrinaut Ready Ready Preview Oct 1, 2026 10:19am UTC
petrinaut-docs Ready Ready Preview Oct 1, 2026 10:19am UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Oct 1, 2026 10:19am UTC

Request Review

@cursor

cursor Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches the primary AI assistant UI and message rendering for all Petrinaut hosts; regressions could affect stock users or Brunch parity, though the change is largely a structural split with explicit presentation tests.

Overview
Splits the AI assistant panel so stock (default) and Brunch no longer share one transcript implementation, preventing Brunch conversation UI from leaking into npm hosts and the default assistant.

AiAssistantContents now routes to StockTranscript vs BrunchTranscript, with shared AiAssistantComposer, BrunchResponseStatus, and extracted shared helpers. Stock reads messages via getChronologicalRenderItems (stream order, including tool runs split at steps); Brunch keeps turn-based grouping. Stock-specific behavior is restored or clarified: chronological layout, stock tool-row chrome, tab styling without Brunch marks, auto-scroll that still follows new output when the reader has scrolled up (Brunch stops following past 96px), and stock reasoning labels (Thinking / heading in the trigger). Brunch-only tab marks and status row stay gated on presentation === "brunch".

Tests are reorganized: voice-dock coverage moves next to those components, and many assertions run as paired stock/brunch parameterised suites. Tab attention tests now look for aria-hidden markers instead of [data-attention]. Patch changeset notes that tools stopped mid-run show Cancelled instead of an endless spinner in stock.

Reviewed by Cursor Bugbot for commit 560d796. Bugbot is set up for automated code reviews on this repo. Configure here.

Base automatically changed from ka/fe-1795-voice-mediation to ka/fe-1793-experiment-lifecycle October 1, 2026 07:33
@kostandinang
kostandinang deleted the branch main October 1, 2026 07:33
@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/tests New or updated tests area/apps > hash.design Affects the `hash.design` design site (app) labels Oct 1, 2026
…unch presentations

Restore main's stock transcript, tool rows, tabs, scrolling and composer behind the default presentation, and give the stock and Brunch transcripts, tool lists, composer and status row their own files. Stopped in-progress stock tools show Cancelled instead of a spinner.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang kostandinang reopened this Oct 1, 2026
@kostandinang
kostandinang changed the base branch from ka/fe-1793-experiment-lifecycle to main October 1, 2026 07:40
@github-actions github-actions Bot removed the area/tests New or updated tests label Oct 1, 2026
@kostandinang
kostandinang force-pushed the ka/fe-1808-presentation-split branch from fe51762 to f4454d0 Compare October 1, 2026 07:41
@github-actions github-actions Bot removed the area/infra Relates to version control, CI, CD or IaC (area) label Oct 1, 2026
@github-actions github-actions Bot removed area/apps area/apps > hash.design Affects the `hash.design` design site (app) labels Oct 1, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the area/infra Relates to version control, CI, CD or IaC (area) label Oct 1, 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

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 a822cee. Configure here.

A failed stream never ends its reasoning part, so the stock disclosure stayed open with a running timer after an error.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang
kostandinang added this pull request to stack #9887 October 1, 2026 10:28
@kostandinang
kostandinang requested review from kube and lunelson October 1, 2026 11:45
@kostandinang kostandinang changed the title FE-1808: Split the assistant panel into stock and Brunch presentations FE-1808: Separate stock and Brunch assistant presentations Oct 2, 2026
@kostandinang
kostandinang added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 3f088b6 Oct 2, 2026
72 checks passed
@kostandinang
kostandinang deleted the ka/fe-1808-presentation-split branch October 2, 2026 21:56

This branch was successfully deployed

3 active deployments
Preview – hash — 560d796e Deployed Oct 1, 2026 by vercel[bot]
Preview – petrinaut-docs — 560d796e Deployed Oct 1, 2026 by vercel[bot]
Preview – petrinaut — 560d796e 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/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.

2 participants