feat(wave3): missing actions + error visibility#14
Merged
Conversation
Wave 3 of 5 from .gstack/qa-reports/PLAN.md. With Waves 1 and 2 in, the product no longer corrupts data and its signature feature renders — but you still can't rename a notebook, can't delete a document, can't see errors once a toast vanishes, and the AI-model-crashed case is a blank stare. This wave closes those gaps. ## Actions that didn't exist - **Rename notebook.** Backend PATCH /notebooks/:id + notebook_store rename_notebook(). Frontend: context menu → inline edit (same pattern as conversations). New notebook creation drops you directly into rename mode so "Untitled notebook" doesn't stick around. - **Delete document.** Backend DELETE /documents?notebook_id=&source_path= removes the chunks from the chroma collection, the summary row, the uploaded file (scoped to the notebook's uploads_dir with the same Path.relative_to guard as preview), and decrements the notebook's source_count/chunk_count via a new clamp-at-zero adjust_counts helper. Frontend: overflow menu on each document card with confirmation. - **Create empty notebook.** "+ New" now calls POST /notebooks/ directly instead of opening a file picker — users can shape a notebook before adding documents. The welcome + upload paths still create a notebook implicitly. - **Zotero is discoverable.** Button lives next to "+ Add" in the Documents section. It was previously only reachable via the command palette. ## Error visibility - **Notification center.** Bell icon in the sidebar footer with an unread badge; opens a slide-over panel listing the last 50 errors, successes, and warnings with relative+absolute timestamps. Toast.tsx now mirrors non-info toasts into this log so "Upload failed" at second 3 is still recoverable at second 30. role="alert" on error toasts so screen readers announce immediately. - **Human error messages.** New utils/errorMessages.ts translates common failure modes — "Request failed with status 422" -> "We couldn't process that. The file may be empty, scanned without OCR, or corrupt." Network errors, 413 size, 415 MIME, 403 scope, 500 server, Ollama-down all get specific copy. Unknown errors fall through to the raw message (truncated). Wired into Sidebar upload/delete/rename + AppShell drop. - **AppShell drop handler no longer aborts the whole batch.** Each file upload is now its own try/catch — file 2 failing doesn't swallow the report on file 1, and the error message names which file failed. ## Reliability nudges - **ConnectionBanner monitors Ollama too.** Previously checked only the backend, so a model crash mid-session was invisible until the chat failed. Now it watches both and shows a distinct amber warn-banner when Ollama is unreachable: "AI model (Ollama) isn't reachable. Start Ollama, then try your message again." - **Banner runs its check on mount**, not only after the first 30s interval tick. And the interval is 15s now, not 30s. ## Verified - cd apps/desktop && npm run build — clean (272 modules, 847ms) - cd backend && uv run ruff check . — clean - cd backend && uv run pytest -q — 33 passed (3 new: rename happy path, rename-missing returns None, adjust_counts clamps to zero) ## Intentionally not in this PR - 3.3 duplicate upload detection — needs ingestion-layer change; punted to Wave 4 alongside other vector_store work - 3.4 real upload progress bar — requires an XHR refactor of the upload path; kept as a separate PR for review surface - 3.6 wizard model selection wiring — needs a backend-side model override API; scoped out for this wave Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Wave 3 of 5 from PLAN.md. Wave 1 (#12) stopped the bleeding; Wave 2 (#13) resurrected the citation layer. This one closes table-stakes gaps: rename, delete-document, empty-notebook creation, error persistence, and Ollama health monitoring.
Actions that didn't exist
Error visibility
Reliability
Verified
Intentionally not in this PR (punted to Wave 3b or Wave 4)
🤖 Generated with Claude Code