Autosave must not run until a load succeeded #28

Closed
opened 2026-10-07 16:47:16 +00:00 by jknapp · 1 comment
Owner

Tier: Fix first · Order: 1 of 35 · Effort: S · Impact: high

What

If the editor can't load your site, it must never silently save a blank canvas over it. Show a blocking “Couldn't load site — Retry” screen and keep autosave off until a load completes.

Why

Confirmed by code read: TopBar.tsx:51-58 only console.warns on load failure; the 30s autosave (TopBar.tsx:61-81) runs anyway; save() would ship the default empty page; handleSave (site-builder.php:625-756) writes project.json unconditionally with no backup. A brief 5xx or network blip on load can wipe a site 30 seconds later.

Today

Load failure = console.warn; autosave timer independent of load result; backend accepts any payload.

Design notes

Frontend: a loadedOk flag gates autosave and manual save. Backend backstop: refuse a save where every page is empty while the existing project.json has content, unless force=true (sent only after an explicit “Start over” confirm).

Depends on

None


From the 2026-10-07 site-builder research (competitor review, user sentiment, code audit, Fable prioritization). Roadmap: https://claude.ai/artifact/QpQcSCk21z6SN7LPSm8tKE · id autosave-load-guard

**Tier:** Fix first · **Order:** 1 of 35 · **Effort:** S · **Impact:** high ## What If the editor can't load your site, it must never silently save a blank canvas over it. Show a blocking “Couldn't load site — Retry” screen and keep autosave off until a load completes. ## Why Confirmed by code read: TopBar.tsx:51-58 only console.warns on load failure; the 30s autosave (TopBar.tsx:61-81) runs anyway; save() would ship the default empty page; handleSave (site-builder.php:625-756) writes project.json unconditionally with no backup. A brief 5xx or network blip on load can wipe a site 30 seconds later. ## Today Load failure = console.warn; autosave timer independent of load result; backend accepts any payload. ## Design notes Frontend: a loadedOk flag gates autosave and manual save. Backend backstop: refuse a save where every page is empty while the existing project.json has content, unless force=true (sent only after an explicit “Start over” confirm). ## Depends on None --- From the 2026-10-07 site-builder research (competitor review, user sentiment, code audit, Fable prioritization). Roadmap: https://claude.ai/artifact/QpQcSCk21z6SN7LPSm8tKE · id `autosave-load-guard`
jknapp added the tier: fix-firsteffort: Simpact: high labels 2026-10-07 16:47:16 +00:00
Author
Owner

Shipped in WHP release 2026.10.3 (site-builder main bdb4789, deployed fleet-wide 2026-10-07). Implemented, reviewed and verified as part of the editor-polish batch.

Shipped in WHP release **2026.10.3** (site-builder `main` bdb4789, deployed fleet-wide 2026-10-07). Implemented, reviewed and verified as part of the editor-polish batch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cloud-hosting-platform/site-builder#28