From dc39a56293cffeb40995d413b6130d38f84e26a8 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 4 Mar 2026 20:32:56 -0500 Subject: [PATCH] Per-conv streaming state, immediate message_count commit, auto-new-chat on open stores/chat.ts: - Replace 7 global stream refs with convStreams: Record - Each conversation tracks its own stream state; 7 names become computed getters - Add isStreamingConv(id) public helper - Increment message_count +2 immediately after POST 202 (not at done) so the cleanup watcher never deletes a mid-generation conversation - SSE reconnect retries now run for background conversations regardless of which conv is currently viewed - error toasts only shown when the erroring conv is currently viewed - deleteConversation cleans up orphaned stream state ChatView.vue: - Remove invalid write to store.lastContextMeta (now a read-only computed) - Add !store.isStreamingConv(newId) guard to watch(convId) fetch so navigating back to a generating conversation shows accumulated content without stale refetch - Add startNewConversation() helper; opening /chat with no ID auto-creates a new conversation and redirects to it (on mount and on navigation) - Deleting a conversation also auto-creates a new one Also committing previous-session changes (keyboard nav + task routing): - App.vue: e shortcut only on note-view (not task-view, which is removed) - TaskCard.vue: route directly to /tasks/:id (viewer), remove View buttons - router/index.ts: remove task-view route; /tasks/:id now maps to TaskEditorView - TasksListView.vue: Enter key pushes to /tasks/:id Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.vue | 2 +- frontend/src/components/TaskCard.vue | 41 +------ frontend/src/router/index.ts | 5 - frontend/src/stores/chat.ts | 159 +++++++++++++++++---------- frontend/src/views/ChatView.vue | 25 +++-- frontend/src/views/TasksListView.vue | 2 +- summary.md | 8 +- 7 files changed, 125 insertions(+), 117 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index e041d5f..b9b9cfe 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -97,7 +97,7 @@ function onGlobalKeydown(e: KeyboardEvent) { break; case "e": { const name = router.currentRoute.value.name; - if (name === "note-view" || name === "task-view") { + if (name === "note-view") { router.push(router.currentRoute.value.path + "/edit"); } break; diff --git a/frontend/src/components/TaskCard.vue b/frontend/src/components/TaskCard.vue index a6365ba..a8136ba 100644 --- a/frontend/src/components/TaskCard.vue +++ b/frontend/src/components/TaskCard.vue @@ -1,5 +1,4 @@