Repository navigation
Chat redesign: streaming, citation seals, sources panel, sidebar, themes - #41
Merged
Merged
Conversation
Pinned: lucide-react 1.48.0, motion 13.4.4, react-markdown 10.1.0, remark-gfm 4.0.1.
…umbered plan table
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.
Problem
The chat read like a prototype:
[Source: …]/[Plan: …]markers;This PR is Part B of the approved chat redesign (spec
docs/superpowers/specs/2026-09-26-chat-redesign-design.md, plandocs/superpowers/plans/2026-09-26-chat-redesign.md, mockupsdocs/design/chat-redesign/). It builds on the backend merged in #40.Implementation
fetchplus a hand-written SSE parser (services/sse.js), sinceEventSourcecan't POST with a Bearer token;resethandling, anddonereplacing the draft with the saved answer;react-markdown+remark-gfm, with no raw HTML, https-only links, and images shown as their alt text;[Source: …]markers become numbered brass seals, which stamp in only on an answer that just finished;[Plan: …]markers become plan links that scroll to and flash their row;unverified,changedandmissingstates./to type, Esc to stop or close.lucide-react1.48.0,motion13.4.4,react-markdown10.1.0 andremark-gfm4.0.1.npm audit --omit=devfinds 0 vulnerabilities.Validation
npm run lintpasses.npm test: 430 tests in 62 files pass (188 before).npm run buildpasses.The branch is rebased on
main8dcf2fe. The SSE event names and payload fields were checked against the mergedsrc/api/routes/chat.py.Playwright pass against the local stack (real API, real OpenAI calls, a local test account with ZIP 92101):
scrollWidth === clientWidth(390), and the Sources sheet worked;Screenshots were taken locally (
.playwright-mcp/e2e/, gitignored).An independent code review found no critical issues, and confirmed the security points: no
dangerouslySetInnerHTMLorrehype-raw, https-only URLs,rel="noopener noreferrer"on every new-tab link, and only the theme and the sidebar flag in localStorage.Security, DB and API impact
Follow-ups (known, deliberately not in this PR)
Important:
donemessage lists sources in saved order, and a reload lists them by relevance. Fix: sort sources by relevance in_save_answer(backend).apiStream.done.Minor:
noticesfield would be sturdier.