Keep Tomorrow plans across offline saves and reconnects #1160

Closed
opened 2026-08-20 01:59:05 +00:00 by rockachopa · 0 comments
Member

Product evidence

The mobile Tomorrow planner currently sends its PUT directly from frontend/tomorrow-plan.js; frontend/dashboard.js closes the planner immediately and tells the operator to reopen and reconstruct the plan when the request fails. The server already supplies revisioned snapshots and HTTP 409 server truth, but the browser has no account-bound pending plan.

User outcome

A phone operator can save Tomorrow while offline or on an unreliable connection. The exact ordered plan, capacity, estimates, next local date, timezone, and base revision are admitted durably for the confirmed account, shown as sync pending, and delivered once after reconnect. A revision conflict preserves both the local pending plan and server truth rather than silently overwriting either.

Acceptance tests

  • Saving writes an account-bound pending record before any network request and does not modify Today.
  • Reloading offline restores the pending Tomorrow summary and values for the same confirmed account only.
  • Online/foreground retries are single-flight; successful PUT adopts the server revision and removes the pending record.
  • HTTP 409 preserves the pending plan and exposes the authoritative server snapshot for explicit conflict recovery.
  • Storage admission failure keeps the planner open and reports an actionable error.
  • Existing Tomorrow promotion and full test suite remain green.
## Product evidence The mobile Tomorrow planner currently sends its PUT directly from `frontend/tomorrow-plan.js`; `frontend/dashboard.js` closes the planner immediately and tells the operator to reopen and reconstruct the plan when the request fails. The server already supplies revisioned snapshots and HTTP 409 server truth, but the browser has no account-bound pending plan. ## User outcome A phone operator can save Tomorrow while offline or on an unreliable connection. The exact ordered plan, capacity, estimates, next local date, timezone, and base revision are admitted durably for the confirmed account, shown as sync pending, and delivered once after reconnect. A revision conflict preserves both the local pending plan and server truth rather than silently overwriting either. ## Acceptance tests - Saving writes an account-bound pending record before any network request and does not modify Today. - Reloading offline restores the pending Tomorrow summary and values for the same confirmed account only. - Online/foreground retries are single-flight; successful PUT adopts the server revision and removes the pending record. - HTTP 409 preserves the pending plan and exposes the authoritative server snapshot for explicit conflict recovery. - Storage admission failure keeps the planner open and reports an actionable error. - Existing Tomorrow promotion and full test suite remain green.
timmy was assigned by rockachopa 2026-08-20 01:59:05 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1160
No description provided.