Description
The editor has an autoSaveStatus state ("saved" | "saving" | "idle"), but setAutoSaveStatus is only ever called with "idle". It is never set to "saving" or "saved". The StatusBar displays "Auto-save on" but no HTTP-based save mechanism triggers. Content only persists via the Yjs WebSocket connection, which itself lacks error handling (see related bug about WebSocket errors).
Locations
frontend/src/app/projects/[projectId]/page.tsx:63 — state declaration, initial "idle"
frontend/src/app/projects/[projectId]/page.tsx:105 — reset to "idle" on file change
frontend/src/components/StatusBar.tsx:34-49 — displays the (never-changing) status
Expected Behavior
- A debounced save function should fire when editor content changes
- Content should be sent to
POST /projects/:projectId/files (which supports upsert)
autoSaveStatus should cycle through "saving" → "saved" on success, or show an error on failure
Difficulty: Medium
Description
The editor has an
autoSaveStatusstate ("saved" | "saving" | "idle"), butsetAutoSaveStatusis only ever called with"idle". It is never set to"saving"or"saved". The StatusBar displays "Auto-save on" but no HTTP-based save mechanism triggers. Content only persists via the Yjs WebSocket connection, which itself lacks error handling (see related bug about WebSocket errors).Locations
frontend/src/app/projects/[projectId]/page.tsx:63— state declaration, initial"idle"frontend/src/app/projects/[projectId]/page.tsx:105— reset to"idle"on file changefrontend/src/components/StatusBar.tsx:34-49— displays the (never-changing) statusExpected Behavior
POST /projects/:projectId/files(which supports upsert)autoSaveStatusshould cycle through"saving"→"saved"on success, or show an error on failureDifficulty: Medium