Per-conv streaming state, immediate message_count commit, auto-new-chat on open
stores/chat.ts: - Replace 7 global stream refs with convStreams: Record<number, ConvStreamState> - 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 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -12,7 +12,13 @@
|
||||
> Include file-level details in the commit body when the change is non-trivial.
|
||||
|
||||
## Last Updated
|
||||
2026-03-04 — Keyboard navigation overhaul: `e` to edit on viewer pages; `/` to focus search bar (custom event dispatch); `c` to focus chat on home / navigate to chat elsewhere; `j`/`k` vim-style list navigation with visual highlight in Notes and Tasks flat views; `Enter` opens selected item; `a:focus-visible` CSS rule added so router-link cards show visible focus outlines; `SearchBar.vue` exposes `focus()` via `defineExpose`; shortcuts panel updated with Lists and Chat sections. Also in this session: Task cards route directly to edit view; TaskViewerView added sub-task list with progress bar and inline status cycling; NoteViewerView shows project/milestone/parent breadcrumb; Dashboard shows Active Projects in tasks column (2-per-row), 50/50 column layout, overflow fixed with `overflow-x: clip` + `min-width: 0` on all page containers.
|
||||
2026-03-04 — Per-conversation streaming state + auto-new-chat on open.
|
||||
|
||||
**Chat store refactor (`stores/chat.ts`):** Replaced 7 global stream refs (`streaming`, `streamingContent`, `streamingThinking`, `streamingToolCalls`, `streamingStatus`, `streamingPendingTool`, `lastContextMeta`) with a single `convStreams: Record<number, ConvStreamState>` map. Each conversation now tracks its own stream state independently. Public API is unchanged — the 7 names are now computed getters derived from the current conversation's slot. Added `isStreamingConv(id)` helper. Key behaviour changes: `message_count` is incremented by 2 immediately after POST 202 (not at `done`) so the cleanup watcher never deletes a conversation that is mid-generation; SSE reconnect retries now run regardless of which conversation is currently viewed (background streams persist); `error` toasts only shown when viewing that conversation; `deleteConversation` cleans up orphaned stream state.
|
||||
|
||||
**ChatView.vue:** Removed invalid write to `store.lastContextMeta` (now a read-only computed). Added `!store.isStreamingConv(newId)` guard to the `watch(convId)` fetch so navigating back to a generating conversation shows accumulated content without a stale refetch. Added `startNewConversation()` helper; opening `/chat` with no ID now automatically creates a new conversation and redirects to it (both on mount and when navigating to `/chat` from elsewhere). Deleting a conversation also auto-creates a new one.
|
||||
|
||||
**Previous session (same date):** Keyboard navigation overhaul: `e` to edit on viewer pages; `/` to focus search bar; `c` to focus chat on home / navigate to chat elsewhere; `j`/`k` vim-style list navigation; `Enter` opens selected item; `a:focus-visible` focus-ring rule. Task cards route directly to `/tasks/:id` (edit view); `task-view` route removed; `TasksListView` `Enter` key updated accordingly. `TaskViewerView` sub-task list with progress bar and inline status cycling; `NoteViewerView` project/milestone/parent breadcrumb; Dashboard Active Projects, 50/50 layout, overflow fixes.
|
||||
|
||||
## Project Overview
|
||||
Fabled Assistant is a self-hosted note-taking and task-tracking application with
|
||||
|
||||
Reference in New Issue
Block a user