ui/docs/SOURCE_OF_TRUTH.md
This document defines where the authoritative guidance for ui/ lives.
../index.html: the only runtime implementation file for the Workbench demo.../README.md: top-level orientation and folder map.../AGENTS.md: Codex / OpenAI-style agent workflow notes.../CLAUDE.md: Claude Code workflow notes.PRD.md: product behavior and information architecture.STYLE_GUIDE.md: visual and interaction direction.../references/*: non-runtime visual references used by the style guide.Workbench should follow the Fern-generated OpenAPI schema at:
../../fern/openapi/openapi.json
Do not maintain a duplicated UI-local OpenAPI snapshot.
docs/PRD.md.docs/STYLE_GUIDE.md.AGENTS.md and CLAUDE.md.references/.index.html.If a change affects behavior, visuals, persistence, security posture, or API request/response handling, update the relevant docs in the same change.
These are things not obvious from reading index.html that future agents should know:
state.context.documents.defaultCollection is the single global collection name used by all document and chat operations.state.onboarding controls the first-run overlay, its current step, and the last live verification result. The overlay is shown whenever state.onboarding.completed !== true.state.uiAppearance drives copy, feature visibility, and CSS custom properties through applyAppearance(). Settings and onboarding write into the same structure.POST /v1/messages, parsed as JSON, then written back into the same appearance form fields the user can edit manually.hidden: true) carry API history only and are never rendered.<select>. It uses #modelSelectBtn + #modelDropdown. The renderModelSelect() function populates it.syncHash() / restoreFromHash() keep the URL in sync with the active view and context tab. Format: #context/{tab}, #chat/{id}, #settings, #apiDebugger..chat-list-wrap and .messages both use mask-image with --fade-top-stop/--fade-bot-stop custom properties updated on scroll by updateChatListFade() and updateMessagesFade().input[type="checkbox"] elements are styled as custom CSS pill toggles with no native appearance..modal-card, .menu-panel, and .model-dropdown override the shared glass group with a near-solid dark background (rgba(10,12,22,0.82–0.94)), blur(72px) saturate(1.4), and a to bottom gradient (lighter at top, denser at bottom) for readability and visual grounding.