P0 — add shared conversation models and full chat event rendering #85

Closed
opened 2026-08-12 14:41:48 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-12 14:41:48 +00:00 (Migrated from github.com)

Motivation

Zara Desktop needs a persistent full conversation surface, but the UI must remain a projection of runtime events rather than a second agent implementation. The same model will later back Quick Copilot.

Scope

  • Add desktop conversation/message models keyed by stable conversation and turn IDs.
  • Persist conversations/messages through the existing SQLite DatabaseManager migration system.
  • Build the first full-chat PySide6 window with composer, message list, stop/cancel, provider/model status, and compact errors.
  • Render assistant start/delta/complete events from #82.
  • Render deterministic fake streaming immediately.
  • Until real runtime provider streaming lands, adapt buffered responses honestly as a single delta + completion; do not claim token streaming.
  • Add native Markdown/rich-text and fenced-code presentation with copy support; prefer QTextDocument/native widgets and QSyntaxHighlighter over whole-app WebEngine.
  • Support conversation history loading, rename, and basic search/persistence hooks.

Architecture

Quick/full surfaces will eventually share a ConversationModel/service. This issue implements the shared model and full view first.

Acceptance criteria

  • Full chat is driven by RuntimeHost commands and runtime events only.
  • Messages and conversation metadata persist in the existing SQLite database.
  • Assistant deltas append incrementally without rebuilding the whole conversation widget tree unnecessarily.
  • Stop/cancel routes to canonical turn cancellation.
  • Markdown and fenced code render legibly with code-copy action.
  • Errors/tool placeholders are structured rather than raw log dumps.
  • Conversation rename/history retrieval work from durable storage.
  • Current buffered runtime behavior is represented accurately until #28 supplies real streaming.

Testing requirements

  • Unit tests for conversation/message state reducers and persistence migrations.
  • Qt tests for submit, Enter, Shift+Enter, cancellation, fake streaming, code copy, rename/history reload and failure rendering.
  • Runtime integration tests with deterministic fake providers.
  • Full repository/Nix suite.

Dependencies

  • #82 runtime event contract.
  • #83 RuntimeHost.
  • #84 desktop shell for final window integration.
  • #28 is the existing backend real-LLM-streaming dependency; do not duplicate it.
  • Design: #81.

Explicit non-goals

  • No desktop-only LLM/provider client.
  • No Quick Copilot window yet.
  • No tool approval/details UI beyond placeholders required for later issue.
  • No WebEngine-based full application shell.
  • No silent context acquisition.
## Motivation Zara Desktop needs a persistent full conversation surface, but the UI must remain a projection of runtime events rather than a second agent implementation. The same model will later back Quick Copilot. ## Scope - Add desktop conversation/message models keyed by stable conversation and turn IDs. - Persist conversations/messages through the existing SQLite `DatabaseManager` migration system. - Build the first full-chat PySide6 window with composer, message list, stop/cancel, provider/model status, and compact errors. - Render assistant start/delta/complete events from #82. - Render deterministic fake streaming immediately. - Until real runtime provider streaming lands, adapt buffered responses honestly as a single delta + completion; do not claim token streaming. - Add native Markdown/rich-text and fenced-code presentation with copy support; prefer `QTextDocument`/native widgets and `QSyntaxHighlighter` over whole-app WebEngine. - Support conversation history loading, rename, and basic search/persistence hooks. ## Architecture Quick/full surfaces will eventually share a `ConversationModel`/service. This issue implements the shared model and full view first. ## Acceptance criteria - [ ] Full chat is driven by RuntimeHost commands and runtime events only. - [ ] Messages and conversation metadata persist in the existing SQLite database. - [ ] Assistant deltas append incrementally without rebuilding the whole conversation widget tree unnecessarily. - [ ] Stop/cancel routes to canonical turn cancellation. - [ ] Markdown and fenced code render legibly with code-copy action. - [ ] Errors/tool placeholders are structured rather than raw log dumps. - [ ] Conversation rename/history retrieval work from durable storage. - [ ] Current buffered runtime behavior is represented accurately until #28 supplies real streaming. ## Testing requirements - Unit tests for conversation/message state reducers and persistence migrations. - Qt tests for submit, `Enter`, `Shift+Enter`, cancellation, fake streaming, code copy, rename/history reload and failure rendering. - Runtime integration tests with deterministic fake providers. - Full repository/Nix suite. ## Dependencies - #82 runtime event contract. - #83 RuntimeHost. - #84 desktop shell for final window integration. - #28 is the existing backend real-LLM-streaming dependency; do not duplicate it. - Design: #81. ## Explicit non-goals - No desktop-only LLM/provider client. - No Quick Copilot window yet. - No tool approval/details UI beyond placeholders required for later issue. - No WebEngine-based full application shell. - No silent context acquisition.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara#85
No description provided.