Skip to content

Add chat history and New chat controls below the composer#4133

Draft
bcotrim wants to merge 2 commits into
trunkfrom
add-chat-history-below-composer
Draft

Add chat history and New chat controls below the composer#4133
bcotrim wants to merge 2 commits into
trunkfrom
add-chat-history-below-composer

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • Related to STU-1985 (chat-history-below-composer thread of the split; does not close the issue)
  • Split from Agentic UI: Simplify Sidebar with new Site-Centric Focus #3998 (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-sidebar branch onto trunk (his authorship is preserved via Co-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:

  • Chat history menu: opens upward, lists the site's chats newest-first with first-prompt titles and relative timestamps, marks the current chat, and offers a per-row archive action on hover. Empty state shows "No chats yet".
  • Archived chats dialog: reachable from the history menu (entry shows the count); selecting an archived chat reopens it.
  • New chat button: creates a fresh session for the current site and navigates to it; disabled while creating; ⌘N/Ctrl+N shortcut shown in the tooltip.
  • ⌘N conflict fix: the desktop menu bound CommandOrControl+N to "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.

⚠️ Visual change: needs human review in light + dark mode.

Testing Instructions

Enable the Agentic UI feature flag and open a chat session that belongs to a site:

  1. A footer row appears bottom-left below the composer with a history button and a "New chat" button; while the session is loading, the layout doesn't jump.
  2. Open the chat history menu: it opens upward, lists only this site's non-archived chats newest-first, titles from the first prompt (truncating cleanly when long), relative timestamps, and the active chat highlighted/marked as current.
  3. Hover a history row: the timestamp swaps to an archive button; archiving removes the chat from the menu and it appears in the "Archived chats" dialog (menu entry shows the count). Reopening an archived chat switches to it.
  4. Click "New chat" (or press ⌘N/Ctrl+N): a fresh session for the site is created and opened; the button is disabled while creating; the tooltip shows the shortcut.
  5. Desktop ⌘N: with the agentic UI active, File → Add Site… shows no ⌘N shortcut and ⌘N starts a new chat. With the flag off (classic UI), ⌘N still opens Add Site. Toggling the flag from the dev Feature Flags menu updates the menu after the renderer reloads.
  6. A site with no other chats shows "No chats yet" in the menu.
  7. Verify in both light and dark mode.

Known gap (intentional, ships with the follow-up sidebar PR): with the sidebar collapsed the footer indents slightly to reserve space for the upcoming bottom-left sidebar control.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@bcotrim bcotrim self-assigned this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant