Skip to content

Auto-save status displays but never actually persists content to server #2

Description

@coderanik

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

  1. A debounced save function should fire when editor content changes
  2. Content should be sent to POST /projects/:projectId/files (which supports upsert)
  3. autoSaveStatus should cycle through "saving""saved" on success, or show an error on failure

Difficulty: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions