Persistent CareerVector Assistant Chat
Outcome
Vendor AI is present wherever the person works without replacing the workspace. Browser and Tauri desktop project chat as a persistent right rail beside the active page; on a narrow browser it is a full-screen conversation with an explicit route back. The terminal TUI projects the same product role as its existing hideable chat pane beside the editor and document preview.
Layout and state
- Desktop uses a two-column application body: the active workspace consumes the remaining width; the chat rail has a bounded minimum/maximum width and a keyboard-operable resize separator.
- Collapse state and preferred width are per-device presentation preferences. They do not enter workspace collaboration state or a prompt.
- Below the product's narrow breakpoint, chat is a full-screen layer/route, not a squeezed side column. Browser back, Escape where appropriate, and a labelled close control return to the same workspace route and selection.
- A collapsed surface does not cancel a turn; explicit Stop issues the connector's cancellation operation.
- The target conversation/thread is workspace-scoped and persistent. Refresh, route change, another link-holding device, or connector reconnect resumes it from a durable event cursor. The current TUI chat session is as-built but not yet the canonical persistent transcript.
Context contract
Each turn may include a bounded context descriptor: link-authorized workspace, active route/surface, selected job, document pane, selection identifiers, and canonical clocks. Context follows the UI but is never authorization. The CareerVector host re-resolves link scope and every selected object. Private content is fetched through scoped tools or an explicitly described bounded projection; the browser does not assemble an unbounded workspace dump into every prompt.
Event presentation
The rail renders a versioned sequence of user messages, assistant messages, authorization/limit states, tool intents, tool results, recovery events, and terminal turn state. Streaming deltas are announced without flooding assistive technology; the final message becomes the durable readable event. Tool cards show what was read or changed, affected workspace paths, provenance, outcome, and Undo when the receipt is still safely reversible.
Errors distinguish workspace-link failure, provider authorization, provider plan limits, connector availability, tool conflict, invalid tool request, and general turn failure. The UI never turns these into a generic spinner or an API-key/provider-selection prompt.
Accessibility and safety
- Chat is fully keyboard operable with a real landmark, labelled transcript, focus restoration, visible focus, and logical reading order independent of rail width.
- New streaming content does not steal focus. Screen readers receive bounded status summaries and the final message, not every token.
- The composer retains unsent text across collapse, route changes, and recoverable disconnects, but clears it on explicit discard or local-data cleanup.
- Markdown and tool payloads are rendered as untrusted content with no raw HTML execution.
- The UI does not imply that a suggested or failed action changed canonical state; only a durable successful receipt does.
Failure and recovery
On network loss, the rail keeps durable history and the unsent draft, marks the stream interrupted, and reconnects from the last acknowledged cursor with bounded backoff. Duplicate events collapse by event ID. If a turn completed while the browser was absent, its final assistant message and tool receipts appear after replay. If recovery cannot prove terminal state, the UI offers Retry as a new turn and does not duplicate the old mutation.
Acceptance evidence
- browser tests at desktop widths for open, collapse, resize bounds, reload persistence, active context updates, running-while-collapsed, cancellation, and tool receipt/undo;
- browser tests at 390px for full-screen chat, focus containment/restoration, browser-back return, draft preservation, and no horizontal workspace crushing;
- stream fixture tests for replay, duplicate suppression, late delta after cancel, reconnect after completion, authorization expiry, plan limit, tool conflict, and connector outage;
- accessibility checks for landmarks, transcript announcements, separator keyboard control, focus order, contrast, reduced motion, and sanitized message rendering;
- a TUI proof for connector cancellation, bounded changes, undo, and document rerender; and
- two-device proof that holders of the same workspace link resume the intended thread while an unrelated link cannot observe its history or stream.