Files
Project-SDE-WP-Suite/docs/waves/decisions-2026-10-17.md
Matt Mabrey 40827d5371 T14.2 (D27): the offline sign-in window follows the server
/api/auth/me returns session_expires_at (the session token exp, UTC). The browser
keeps it and never extends it: the fixed 12 hours and the sliding reset are gone.
Offline before that time the app opens as normal. Offline after it the app opens in
read-and-queue mode: no redirect, one mode line, changes are queued and held until
a page load gets a good answer from the server. wpCacheAuth refreshes the cached
user without moving the end time.

D26 and D27 recorded as Accepted. tests/session_expiry_check.py (22 checks) fails
against the old 12 hour rule.
2026-10-17 14:18:53 -07:00

36 lines
2.1 KiB
Markdown

# Decisions: October 17, 2026
Status key: **Proposed** means the text is a recommendation. It needs Matt's OK before any build starts.
**Accepted** means Matt approved it and the work may start.
Matt accepted D26 and D27 as written on 2026-10-17 (open questions 1, 2 and 3 in `wave-14.md`: hold the changes of
another person, the offline window ends with the session and then works in read-and-queue mode, and a full device
keeps the change in memory and tells the person). The idle time (question 4) was not decided. It belongs to `T13.1`.
## D26: a sign-in problem never destroys a queued change (Accepted)
**Why:** The outbox (`html/project-data.js`) marks any `4xx` answer except `429` as dead. A `401` means the session ended, and it
gets the same treatment. With a session limit (D25, 8 hours) or an idle timeout (T13.1), a crew that works offline past the limit
comes back online and every queued change is rejected for good. The outbox also hides a full device store, and it sends a queued
change under whoever is signed in, not under the person who made it.
**Proposal:**
- `401` holds the queue. It does not mark anything dead and does not count as a try. The queue sends after a good sign-in.
- `403` stays a permanent refusal, with a clear reason.
- A full device store is reported. The change is never dropped silently.
- Each queued change has an owner. It is sent only when that person is signed in.
**Tasks:** `T14.1`, `T14.3`. **Needs Matt:** open questions 1 and 3 in `wave-14.md`.
## D27: the offline sign-in window follows the server (Accepted)
**Why:** `auth-guard.js` allows the app to open offline for a fixed 12 hours after the last good check, and every page load resets that
time. The server session lasts 8 hours (D25). The two do not agree.
**Proposal:** `/api/auth/me` returns `session_expires_at`. The browser stores it and does not extend it. Offline, the app opens until
that time. After that time, offline, it works in read-and-queue mode and does not redirect. Online, a `401` goes to sign-in and the
queue is kept. The 7 day offline window (`BL-062`) is a later wave.
**Task:** `T14.2`. **Needs Matt:** open question 2 in `wave-14.md`.