25e674badd83a79158dae4d193bda4d231f1bc88
buildSavePayload matched the active page by page.id === activePageId, but activePageId defaults to the hardcoded 'home' and load() never updated it. Deleting the original Home page (its replacement gets id page_<ts>), reloading, editing, and saving would then match no page -- the live edit only reached the legacy top-level craft_state, while the authoritative pages[]/pages_craft_state[0] for index.html fell back to stale state. Belt-and-suspenders fix: - buildSavePayload now falls back to pages[0] as the effective active page when a real page is active but activePageId matches nothing. - useWhpApi's load() now points activePageId at the freshly restored first page via a new PageContext setActivePageIdDirect setter (bookkeeping only -- no re-serialize/deserialize), so activePageId stays valid after every load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
Visual drag-and-drop website builder using GrapesJS
Languages
TypeScript
61.2%
HTML
17.1%
JavaScript
17%
CSS
3.6%
PHP
0.8%
Other
0.3%