Skip to content

feat(frontend): model conversation turn narration with Statig - #350

Draft
sandersonstabo wants to merge 8 commits into
agent/frontend-conversation-view-port-eddef784from
agent/frontend-conversation-turn-port-427d5262
Draft

feat(frontend): model conversation turn narration with Statig#350
sandersonstabo wants to merge 8 commits into
agent/frontend-conversation-view-port-eddef784from
agent/frontend-conversation-turn-port-427d5262

Conversation

@sandersonstabo

@sandersonstabo sandersonstabo commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Depends on #349.

Scope:

  • add the Rust Statig per-turn narration state machine
  • model provider wait, compaction, thinking, work, streaming suppression, background wait, Worked/Thought terminal copy, interruption, failure, and cancellation
  • enforce monotonic timestamps/revisions, resumable interruption, sealed terminal idempotence, and a single renderer-facing narration
  • register focused Bazel/Cargo coverage

Excludes:

  • no TypeScript, Svelte, or JavaScript changes
  • no scene composition, GPUI rendering, or host wiring (stacked follow-up leaves)

Verification:

  • guarded jobs=1 focused build and behavior test pass
  • fresh production and test Clippy pass
  • whole-repository Rust format gate passes
  • locked/offline Cargo metadata passes
  • guarded hashes/status stable; Bazel shutdown exit 0

Evidence: D:/artisan-editor-worker-logs/frontend-conversation-turn-vp-gate-20260830/forward4/receipt.json


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Introduces a Statig state machine that models conversation turn narration in Rust, replacing scattered thinking/compacting/streaming booleans with a single authoritative chart that derives exactly one renderer label per state.

  • Covers provider wait, compaction, thinking, work, streaming suppression, background wait, and the terminal Worked/Thought/Failed/Stopped/Cancelled labels.
  • Enforces monotonic timestamps and revisions, rejects new events on sealed terminal states, and allows only Interrupted to resume.
  • Adds a ConversationTurnController per turn id with a closed TurnNarration enum so two simultaneous labels are unrepresentable.
  • Registers focused Bazel/Cargo coverage and adds black-box behavior tests for narration, atomic refusals, idempotent duplicates, and extreme elapsed arithmetic.
  • Includes no TypeScript, Svelte, GPUI, or host wiring; that remains for stacked follow-up leaves.

Written for commit 36ac01d. Summary will update on new commits.

Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant