Repository navigation
feat(apollo-react): add the Wind chat history and settings panels - #1397
Open
BenGSchulz wants to merge 2 commits into
Open
BenGSchulz wants to merge 2 commits into
BenGSchulz wants to merge 2 commits into
Conversation
Contributor
Dependency License Review
License distribution
Excluded packages
|
BenGSchulz
force-pushed
the
feat/wind-chat-history-settings
branch
from
October 16, 2026 21:14
a6c779e to
89177cd
Compare
- newChat() now clears activeConversationId. Before, the history kept marking the previous conversation as open after a new chat, and clicking it did nothing. Hosts that read activeConversationId after newChat now get null. - With paginatedHistory, closing the history after a search clears the search box and emits HistorySearch with an empty searchText, so the host returns its unfiltered list: the list always follows the box. Answer it like any other search. It is sent only when the host's list was filtered, and no skeleton waits for it. - appendOlderHistoryItems([]) now stops the load-more indicator. The documented way to stop loading on error (an empty page with done) left the spinner running. - Material: the settings close button runs the ToggleSettings pre-hook; it ran ToggleHistory. - Material: the settings content wraps instead of scrolling sideways (it inherited the panel's nowrap). MST-16568 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the Wind chat's history and settings placeholders. The history opens as a popover under the header's history button in both modes, as Material's does, with search, date groups, the host's paginated loading, opening, rename and delete. It is not modal, so a host's own dialog opened from a pre-hook stays usable. The settings slide in from the right as Material's do: over the conversation in Embedded, beside it in FullScreen, closing from their X, the header button or Escape through the ToggleSettings pre-hook. The settings panel stays mounted, so the settingsRenderer container is the same element for the chat's life, emptied on close and rendered into on each opening. Hoist the history grouping and search, the list state (debounced HistorySearch, HistoryLoadMore near the end or when the first page does not fill the list, scroll kept on append, the search reset on close, a new chat when the open conversation is deleted), the per-item open, rename and delete flows, and the settingsRenderer lifecycle into src/chat/headless, and switch Material's history and settings to them. The service keeps whether the host has more history, so a list mounted after its last page does not ask again. MST-16568 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BenGSchulz
force-pushed
the
feat/wind-chat-history-settings
branch
from
October 16, 2026 22:53
89177cd to
1c25bf5
Compare
This was referenced Oct 16, 2026
BenGSchulz
added this pull request to stack #1374
October 16, 2026 22:57
Contributor
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Seventh PR of the Wind chat renderer stack (MST-16568). It replaces the history and settings placeholders with the real panels, consumed from the service as Material does, and fixes a few service and Material issues found on the way.
It has two commits, so the host-visible fixes read as release notes on their own:
fix(apollo-react): fix chat history and settings behaviour hosts rely on: see Service and Material fixes below. Its message is written as release notes.feat(apollo-react): add the Wind chat history and settings panels: everything else.History: a popover in both modes, as Material's
Popoverunder the header's history button (wind/common/panel-popover.tsx), sized as Material's: up to 568 by 441 in a panel, 16px in from its sides; 342 wide and as tall as the area under the header in FullScreen, where the conversation column makes room for it while it is open. It opens from the button's start and is held inside the panel, landing against the trailing edge as Material's does (Material's runs past the panel's edge in Embedded; Wind's stays inside).<dialog>from the playground's pre-hooks). Focus starts in the search; Escape, a click elsewhere or focus leaving close it; clicks and focus in another open dialog, and clicks on the history button (which toggles it), leave it open. Focus returns to the history button unless a click put it elsewhere. Its open and close animation is off under reduced motion.paginatedHistory, a debouncedHistorySearch(400 ms) with a skeleton until the host'ssetHistory.HistoryLoadMorewithin 50px of the end, or as soon as the list has its size when the first page does not fill it; a spinner until the host answers, the scroll position kept whenappendOlderHistoryItemslands, and none afterdone. The service keeps whether the host has more, so a list mounted after its last page (or a mode switch) does not ask again.HistorySearch(both renderers, through the shared hook). The skeleton shows only for a non-empty query, so a host that ignores the empty search leaves none behind.openConversationand closes the history; the open one is marked (aria-current).RenameConversationpre-hook, Escape cancels without closing the history (and the blur that follows cannot rename); empty or unchanged names, a declining or failing pre-hook cancel. Hidden withdisabledFeatures.renameChat.DeleteConversationpre-hook (no confirmation, as in Material); a declining or failing pre-hook keeps it.Settings: a slide-in panel, as Material's
ToggleSettingspre-hook. The X and Escape run the pre-hook and then close explicitly, once at a time, so a held Escape or a second press during the pre-hook cannot reopen them; Escape is a React handler on the layout root, after Wind's own handlers, and ignores key repeat and IME composition. A focused button's tooltip takes the first Escape. Focus moves to the X on open and back to the settings button on close.inertwhile it is open, standing in for Material's focus trap there. FullScreen does not trap focus, as in Material.settingsRenderercontainer is the same element for the chat's life: emptied on close and handed to the renderer again on each opening, as in Material.Service and Material fixes (the
fixcommit)newChat()clearsactiveConversationId. Before, the history kept marking the previous conversation as open after a new chat, and clicking it did nothing (both renderers). DOCS.md updated.paginatedHistory, closing the history after a search emitsHistorySearchwith an emptysearchText(see above). DOCS.md updated.appendOlderHistoryItems([])stops the load-more indicator. DOCS.md already told hosts to call it with an empty page on error to stop loading, but the spinner kept running; this also caused the endless indicator in the paginated story.ToggleSettingspre-hook (it ranToggleHistory).nowrap).Hoisted into
src/chat/headless(Material switched in this PR)history/history-groups.ts:groupHistory,getHistoryBucket,filterHistorychat-history.tsxhooks/use-chat-history.ts:useChatHistory,useHistoryGroupTitleHistorySearch), the search reset on close, load more near the end, scroll kept on append, the skeleton, spinner, empty and no-result flags, localized group titleschat-history.tsxkeeps its popover and markuphooks/use-history-item.ts:useHistoryItemchat-history-item.tsxkeeps its hover tracking and markuphooks/use-settings-renderer.ts:useSettingsRenderersettingsRendererlifecyclechat-settings.tsxHooks and pure helpers only; nothing new in apollo-wind. The chat state gains
settingsAnchorElementbesidehistoryAnchorElement(focus return for the settings). One new string:autopilot-chat.history.loading-more("Loading more chats", the load-more spinner's label).Not matched on purpose
inert.role="button"element containing the buttons, witharia-pressed, and tracks the pointer on the document.aria-expanded; the history button alsoaria-haspopup="dialog".Gaps for W-10
Searchhard-codes its clear button's label ("Clear"), so it is off here (Material has no clear button either).EmptyStateis a page-level block (xl heading); the panel uses plain text for its empty states.PopoverContentdoes not passforceMountto its portal, so popover content cannot stay mounted while closed. The history keeps its list state outside the content instead.Storybook
pnpm storybook:design, then Apollo React / Chat / Playground (Embedded, Full Screen, Compare renderers):disableRenameChatoff) and delete. WithpreHookson, every pre-hook confirms in a native<dialog>on the host page: confirm a delete with the history open. Press Escape while renaming, then outside the field.OpenConversation,RenameConversationandDeleteConversation, and seeds the bucketed history. The Material maintenance stories keep their fixtures.Tests
vitest --run src/chat src/material/components/ap-chat src/material/components/ap-tool-call: 61 files, 358 tests pass (thefixcommit on its own: 55 files, 312 tests). New tests cover:HistorySearchonce, only for a filtered host, no skeleton), load more once at a time until done, a short first page loading more, a host done before mount not asked again, the scroll position on append, no load more without pagination, a new chat when the open conversation is deleted;newChatclearing the active conversation, an empty page stopping the load-more indicator;aria-current, Escape and focus return, rename and delete (Escape in the field keeps the history open), a host dialog from the delete pre-hook keeping it usable, a click elsewhere closing it without moving focus, the header button closing it,renameChat, paginated search and load more, the search reset on close, the host's done state across openings;inert, theToggleSettingspre-hook from the X and the header button, Escape inside the chat only with focus return, a held or repeated Escape during the pre-hook closing once, IME composition, the FullScreen place, disabled settings;ToggleSettingspre-hook, the wrapping settings content;tsc --noEmit -p packages/apollo-react: clean.biome checkon touched files: no new diagnostics.Stack
Jira: MST-16568
🤖 Generated with Claude Code