feat(ui): Add session history sidebar to default chat UI#49
Merged
ericchansen merged 2 commits intomainfrom Mar 10, 2026
Merged
feat(ui): Add session history sidebar to default chat UI#49ericchansen merged 2 commits intomainfrom
ericchansen merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a local, localStorage-backed session history drawer to Wingman’s built-in “default chat UI” (the HTML/CSS/JS page served when no custom frontend is provided), enabling users to persist and restore conversations across reloads.
Changes:
- Introduces a collapsible “Chat History” sidebar + overlay, with “New chat” and per-session delete controls.
- Persists sessions (messages + server
sessionId) intolocalStoragewith a max session cap and recency ordering. - Restores a prior session by re-rendering saved messages (assistant messages via the existing markdown-lite renderer) and reusing the stored
sessionId.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bc80954 to
f098abb
Compare
Add localStorage-backed conversation history as a persistent left sidebar in the built-in chat interface (like ChatGPT/Claude). Sessions auto-save after each message exchange and persist across page reloads. Features: - Always-visible left sidebar (260px) showing conversation history - Auto-save with title derived from first user message - Click to restore past conversations with full message history - New Chat button to start fresh sessions - Delete individual sessions with hover-reveal x button - Max 50 sessions with oldest evicted - Responsive: collapses to top panel on mobile (<640px) Closes #39 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f098abb to
bb85616
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix XSS: replace innerHTML string concat with DOM APIs in renderSessionList() - Fix accessibility: add pointer-events:none + :focus-visible on delete buttons - Fix bug: wrap saveCurrentSession() in try/catch in finally block - Harden localStorage: add Array.isArray check in loadSessions(), try/catch in saveSessions() - Add type=button to new-chat-btn to prevent accidental form submission - Remove redundant renderSessionList() call (startNewChat already calls it) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Add a persistent session history sidebar to the default chat UI, and change the default theme to dark. Closes #39.
Changes
DEFAULT_CONFIG.ui.themefrom'system'to'dark'serverSessionIdfor context continuityFiles Changed
packages/wingman/src/default-ui.tspackages/wingman/src/config.ts'system'→'dark'packages/wingman/src/__tests__/config.test.tsTesting
npx turbo build test— 6 tasks successful)