Continue an active Today session across devices #1022

Closed
opened 2026-08-17 12:23:20 +00:00 by timmy · 0 comments
Owner

Evidence

The ordered Today plan is server-synchronized, but the active checkpoint (frontend/my-work.js, stackchain.today-session.v1) and elapsed timer (frontend/today-timer.js) are localStorage-only. A signed-in operator who moves from desktop to phone sees the plan but cannot safely resume the active item or elapsed time; two devices can independently count the same session.

No eligible open issue is assigned to timmy or unassigned. Historical issue-title and recent-commit review found only local interruption recovery and plan sync (#357, #395, #577, #599), not active-session handoff.

User flow

  1. Device A starts a Today item and publishes a bounded, revisioned active-session lease.
  2. Device B sees a Continue here handoff with the current item and elapsed time.
  3. B claims the lease atomically; its timer continues from server elapsed time.
  4. A detects the new lease owner, pauses locally, and cannot continue accruing time.
  5. Pause/complete/end clears or updates shared state without double counting.

Acceptance

  • Session state is account-scoped, bounded, revisioned, and durable.
  • Exactly one device can own a running session; stale revision claims conflict.
  • A second-device controller exposes the remote item/elapsed time and atomically claims it.
  • The former owner pauses when it observes a transferred lease.
  • Offline/local timer behavior remains usable when session sync is unavailable.
  • Behavioral tests cover persistence, account isolation, claim conflicts, controller handoff, and failure fallback.
  • Full test suite and Gitea Actions pass.
## Evidence The ordered Today plan is server-synchronized, but the active checkpoint (`frontend/my-work.js`, `stackchain.today-session.v1`) and elapsed timer (`frontend/today-timer.js`) are localStorage-only. A signed-in operator who moves from desktop to phone sees the plan but cannot safely resume the active item or elapsed time; two devices can independently count the same session. No eligible open issue is assigned to `timmy` or unassigned. Historical issue-title and recent-commit review found only local interruption recovery and plan sync (#357, #395, #577, #599), not active-session handoff. ## User flow 1. Device A starts a Today item and publishes a bounded, revisioned active-session lease. 2. Device B sees a **Continue here** handoff with the current item and elapsed time. 3. B claims the lease atomically; its timer continues from server elapsed time. 4. A detects the new lease owner, pauses locally, and cannot continue accruing time. 5. Pause/complete/end clears or updates shared state without double counting. ## Acceptance - [ ] Session state is account-scoped, bounded, revisioned, and durable. - [ ] Exactly one device can own a running session; stale revision claims conflict. - [ ] A second-device controller exposes the remote item/elapsed time and atomically claims it. - [ ] The former owner pauses when it observes a transferred lease. - [ ] Offline/local timer behavior remains usable when session sync is unavailable. - [ ] Behavioral tests cover persistence, account isolation, claim conflicts, controller handoff, and failure fallback. - [ ] Full test suite and Gitea Actions pass.
timmy self-assigned this 2026-08-17 12:23:20 +00:00
timmy closed this issue 2026-08-17 12:51:51 +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#1022
No description provided.