Frontend flow contracts
The MVP supports owner editing and anonymous link viewing. A Shared or Public board has the same access behavior: anyone with its link can view, only its owner can edit. Private boards and their uploaded images require the owner’s session. The permanent URL remains unchanged across edits and visibility changes, including after writing it to NFC.
Creation and returning users
- Guests can decorate a wall before creating an account. Their work must remain intact during signup, login failure, retry, and successful account save.
- My Boards lists owned boards; selecting a board restores its content, room settings, and images.
- Renaming changes the board’s display name without changing its ID or URL.
- Deletion requires confirmation, removes that board’s content, and leads to another owned board or a clear empty state. Cancelling has no effect.
- Email/password accounts need an account recovery flow with visible request, success, invalid/expired link, and retry states.
Editor behavior
- Changes autosave. Show Saving while pending, Saved only after persistence succeeds, and an actionable failure message otherwise.
- Undo/redo applies to content, adding/removing items, resize, ordering, and room changes. A pointer drag is one undo step. History resets when opening another board.
- Ctrl/Command Z undoes; Ctrl/Command Shift Z or Ctrl Y redoes. Native text-field undo remains available while typing.
- Removing a wall item, page, or replacing uploaded content requires confirmation. Undo can restore ordinary editing changes. Board deletion is irreversible.
- Size controls and the resize handle preserve aspect ratio and keep items inside the 1200 × 800 wall.
- Back/Front moves an item one position in the ordered stack, including when items previously shared the same layer number.
- Viewers cannot activate editing through buttons, keyboard shortcuts, imports, catalog actions, or stale inspector controls.
Uploads
The server-backed editor accepts static JPEG, PNG, or WebP files up to 10 MB and displays processing, success, or failure. SVG is intentionally excluded. Server-backed uploads must also validate file contents and dimensions. Failed upload or board switching while an upload is pending must not replace another board’s content.
Mobile
The same 1200 × 800 coordinates apply on every device; viewport changes never rewrite positions. Mobile supports viewing, adding items, changing text/style, moving, resizing, ordering, and removing items. The board may pan or scale to the viewport; all wall content must remain reachable. The page itself must not overflow horizontally. Controls and dialogs must remain reachable at 390 × 844.
Loading and failure states
- Loading account and board data is explicit; never briefly display another board’s private content.
- Missing, unauthorized, and network failures have distinct explanatory messages and a route back to My Boards or login.
- A wall with no account stays labeled Not saved. A copy can remain on this device so a refresh does not wipe it, but that copy is not presented as saved. Saved means the wall belongs to an account.
- Offline remote edits remain visibly unsynced until a confirmed server save. Retry must not silently overwrite a newer revision from another device.
- Storage quota errors leave the editor usable and offer export as a recovery path.
Verification
tests/e2e/frontend-flows.spec.ts exercises account-backed board rename/reopen/delete, undo/redo, drag grouping, visit-mode history restrictions, upload rejection, and mobile editing. The original editor tests use a PNG fixture and verify WebP persistence. Eight additional account-backed frontend acceptance tests now pass against the real server with an isolated database. They cover shared/private/missing boards, permanent URLs after editing, and offline retry in addition to editing and board management. Guest signup retention and native Supabase recovery are now implemented, with seven unit/handler tests passing. Guest signup retention now passes browser tests; three recovery UI contract tests also pass. Real Supabase email verification remains pending; see SUPABASE_AUTH.md. Run npx playwright test --config tests/frontend.playwright.config.ts to verify the frontend suites without sharing a test database with other work.