Add chat history and New chat controls below the composer#4133
Conversation
…poser Co-authored-by: Shaun Andrews <191598+shaunandrews@users.noreply.github.com>
…ic/studio into add-chat-history-below-composer
📊 Performance Test ResultsComparing af3c150 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
katinthehatsite
left a comment
There was a problem hiding this comment.
I think the changes mostly look good. I have two notes regarding this:
- I did not get what this icon was doing:
I thought it was meant to refresh a chat or restart a chat. I think it looks too similar to the refresh ico. I would either remove the icon and that functionality from the footer completely or change it for something else.
- I am finding this flash of the new chat row a big weird if you are already on a new chat (so select an Untitled chat and try to add a new chat):
Screen.Recording.2026-07-13.at.3.22.10.PM.mov
I think this could benefit from a smoother transition.
It matches the design from @shaunandrews and the icon in WordPress.com so I would say to keep it for now and we can align on it later when Shaun is back from AFK.
|
|
@katinthehatsite I fixed all the issues, can you take another look please? 🙇 |
Sounds good 👍 |
…ow-composer # Conflicts: # apps/ui/src/ui-classic/components/session-view/index.tsx
…ow-composer # Conflicts: # apps/ui/src/components/site-list/index.tsx
## Related issues - Related to STU-1985 - Final extraction from #3998 (built on the already-landed #4131, #4133, and #4134) ## How AI was used in this PR Claude (Fable 5) extracted and adapted this change from the #3998 reference branch under close direction, preserving Shaun Andrews' original work via co-authored commits, and re-verified the result (typecheck, unit tests, light/dark visual pass in the browser UI). Code was human-reviewed throughout. ## Proposed Changes This is the capstone of the site-centric sidebar work: the sidebar becomes a flat list of sites, with no per-site chat sublists. - Clicking a site opens its most recent (non-archived) chat, or starts a new chat when the site has none. Chat history is no longer browsed from the sidebar — that moved below the composer in #4133. - Each site row carries a single activity indicator that aggregates all of the site's sessions, with priority: live-site sync > needs an answer > working > new message. This keeps long site lists calm while still surfacing what needs attention. - Row quick actions (site actions menu + start/stop status button) appear on hover/focus; drag-to-reorder from #4134 keeps working on the flat rows. - Status colors move to shared `--studio-color-status-*` tokens: the wpds palette has no vivid status colors (`--wpds-color-fg-content-success` resolves to near-black at dot size), which also fixes the session header's running dot rendering almost black. - Chrome polish: full-bleed 44px site icon with overlaid status badge in the site dropdown, flattened site icons, a visible hover tint on the sidebar create button, the floating sidebar toggle moved to the bottom-left, and aligned settings-header padding. Two product decisions to be aware of (intentional for now): - **Unread "new message" badges are in-memory only** — they reset (seed as all-seen) on every launch. - **The current chat is indicated via `aria-current` + active-row styling**, not the literal "Current chat" label from the mockups. ## Testing Instructions - Start Studio with `npm start` and enable the `Agentic UI` feature flag. - Confirm the sidebar shows a flat list of sites (no chat sublists): clicking a site with chats opens its latest chat; a site without chats opens the new-chat view. - Hover a row: the site actions menu and start/stop button appear; right side shows a green dot for running sites, a play affordance for stopped ones. - Send a prompt on one site, switch to another: the first row shows a working spinner, then a "New message" badge when the turn completes; answering a pending question clears the "Needs an answer" indicator. - Drag a site row to reorder; the order persists across restarts. - Delete a site you're currently viewing and confirm you land back on the home view. - Check the sidebar and site dropdown in **both light and dark mode**. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors? 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Shaun Andrews <191598+shaunandrews@users.noreply.github.com>



Related issues
extract-site-centric-sidebar) — "add" half of the add-before-remove sequencing: this PR adds the session chat controls below the composer while the sidebar keeps its current chat sublists; a follow-up PR makes the sidebar site-centric.How AI was used in this PR
Claude Code adapted the session-chrome portion of @shaunandrews'
extract-site-centric-sidebarbranch onto trunk (his authorship is preserved viaCo-authored-by), and implemented the ⌘N accelerator fix. All changes reviewed by @bcotrim.Proposed Changes
We want chat access to live with the conversation rather than in the sidebar, and to discourage multiple concurrent chats per site. This PR adds a footer row below the composer in the agentic UI (
apps/ui) for sessions that belong to a site:CommandOrControl+Nto "File → Add Site…", which consumed the key before the renderer ever saw it — so the New chat shortcut could never work in the desktop app. When the agentic UI is active, the menu item no longer registers the accelerator (the item itself remains). The classic UI keeps ⌘N for Add Site unchanged.Testing Instructions
Enable the Agentic UI feature flag and open a chat session that belongs to a site:
Pre-merge Checklist