fix/spa-reconnect-no-demo-data #1

Merged
Erik merged 2 commits from fix/spa-reconnect-no-demo-data into main 2026-07-09 10:57:31 +00:00
Owner
No description provided.
Erik added 2 commits 2026-07-09 10:57:01 +00:00
On a failed fetch the store keeps the last real payload (stale > fake) and
flags `disconnected` instead of falling back to bundled demo carts — an
operator must never book a reject against a fabricated entry. Sample data and
sample reason codes are gated behind import.meta.env.DEV, so `vite build`
tree-shakes them out entirely (verified: no sample strings in dist).

- cold start / no data: centered reconnect spinner that keeps retrying
- data present + drop: stale carts stay, header shows amber "reconnecting"
- reasons no longer seed sample codes in production
- polling retries faster (5s) while disconnected, recovers automatically

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- _good_parts_map: collapse the per-press 3-query loop (3xN) into 3 grouped
  queries across all presses; semantics preserved (Joborder JSON/substring
  matching, per-press scoping, whole-map degrade-to-{} on error).
- _press_list + /reasons: served from the kernel cached_select() TTL cache.

Part of the gateway connection-pool-saturation fix
(see fastAPI/agent_docs/db-pool-relief.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Erik merged commit 0696f16458 into main 2026-07-09 10:57:31 +00:00
Erik deleted branch fix/spa-reconnect-no-demo-data 2026-07-09 10:57:31 +00:00
Sign in to join this conversation.
No reviewers
No Label
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: Erik/SPA_AfterTemperRejection#1
No description provided.