Web GUI: dark-mode fixes, composer KB picker, and robust agentic trail#25
Merged
Conversation
Frontend (web GUI): - Dark mode: route on-surface CNRS-blue text through --text-body so page titles, KB names, and stat values are legible instead of dark-on-dark (~67 sites / 18 files). Blue-on-light-chip text (yellow/green badges) is preserved. - Hover states: add a dark-adaptive --surface-hover token so buttons no longer flash near-white (with now-invisible light text) in dark mode. Migrate 31 hover backgrounds + 17 hover-text colours; fix 8 buttons that were invisible at rest. Set color-scheme on the theme so native <select> dropdowns and scrollbars follow dark/light. - Composer KB picker: a corpus selector beside the mode pills (No KB / Auto / each KB with paper counts) that overrides the Settings default per conversation and sends kb_name in /api/chat. Add the same "Auto" option to Settings -> Default knowledge base. Backend: - Auto-route (kb_name="auto"): when the BM25 router surfaces KBs across embedding models, narrow to the running server's embedding family instead of failing with an embedding-compat error. Emit a clear error only when none of the matched KBs are compatible. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Markdown: wrap ReactMarkdown in an error boundary that falls back to raw answer text. A SyntaxError thrown from inside react-markdown (pure JS, no eval) means a dependency chunk failed to parse — a Turbopack dev-mode hiccup when the page is open across a server restart — and shouldn't crash the whole chat view. A reload restores formatting. - Agentic trail: mark every phase done on a successfully completed run (!running && !errored). The status previously keyed off the last phase with a matching step event, but Basic mode emits steps only for retrieval, leaving "Screen for relevance" / "Generate answer" stranded as "planned" after the answer finished. Errored/cancelled runs keep progressive status so the trail never falsely claims success. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
parseFrame ignored type:"status" SSE frames, so the backend's live phase
signals ("Retrieving documents…", "Generating response…") were dropped
and the agentic trail couldn't advance its active phase while the answer
streamed — it only resolved at completion. Convert status frames to trail
steps so the phases light up in real time as tokens arrive.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the default Next.js favicon with the app's CNRS-yellow "sun" (solid #ffeb6e disc + soft corona on deep navy), matching the hero and sidebar logo. app/icon.svg drives modern browsers; app/favicon.ico is regenerated to match (16–256px) as the legacy fallback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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
A batch of web-GUI fixes plus one feature, all surfaced while testing the local instance in dark mode.
Dark mode
--text-bodyso page titles, KB names, and stat values are legible instead of dark-on-dark (~67 sites / 18 files). Blue-on-light-chip text (yellow/green badges) is preserved.--surface-hovertoken so buttons no longer flash near-white (with now-invisible light text) on hover. Migrate 31 hover backgrounds + 17 hover-text colours; fix 8 buttons that were invisible at rest.color-schemeon the theme so native<select>dropdowns and scrollbars follow dark/light.Composer KB picker (feature)
kb_namein/api/chat;Autolets the backend similarity-route. SameAutooption added to Settings → Default knowledge base.Agentic trail robustness
type:"status"SSE frames inparseFrame— they carry the live phase text ("Retrieving documents…", "Generating response…") and were being dropped, so the trail couldn't advance while the answer streamed.ReactMarkdownin an error boundary that falls back to raw text, so a transient Turbopack dev chunk-parse error can't crash the whole chat view.Backend
kb_name="auto"routing surfaces KBs across embedding models (legacy all-MiniLM + current text-embedding-3-large), narrow to the running server's embedding family instead of erroring. Clear error only when none are compatible.Verification
statusframes now drive live trail updates.Note: the local OpenAI provider switch lives in the git-ignored
config.ymland is intentionally not part of this PR.🤖 Generated with Claude Code