Make live refresh self-healing when browser requests stall #303

Closed
opened 2026-08-08 13:09:55 +00:00 by rockachopa · 0 comments
Member

Problem

The unified live-data poller can remain permanently wedged when a browser fetch never settles. context-poller.js retains the unresolved single-flight promise and schedules the next poll only in finally; manual refresh, reconnect, and tab resume then join the same stalled request. Mobile network transitions and captive portals can therefore freeze live work until a page reload.

Vertical slice

Add a deadline-bounded, abortable refresh lifecycle that retires stale generations, preserves the last good snapshot with delayed-update guidance, retries automatically, and lets explicit refresh/reconnect supersede a stalled request.

Acceptance tests

  • A never-settling context request is aborted at a configurable deadline, reports the retained-snapshot error state, clears single-flight state, and schedules a retry.
  • The retry can render a successful fresh snapshot.
  • A late completion from a timed-out generation cannot overwrite newer data.
  • Explicit user refresh/reconnect can supersede a stalled generation immediately.
  • Healthy concurrent callers remain single-flight.
  • Focused and full automated suites pass.

This behavior was checked against all historical issue titles and recent main commits; existing timeout and refresh issues cover server-side endpoint deadlines or rejected requests, not browser promises that remain pending.

## Problem The unified live-data poller can remain permanently wedged when a browser fetch never settles. `context-poller.js` retains the unresolved single-flight promise and schedules the next poll only in `finally`; manual refresh, reconnect, and tab resume then join the same stalled request. Mobile network transitions and captive portals can therefore freeze live work until a page reload. ## Vertical slice Add a deadline-bounded, abortable refresh lifecycle that retires stale generations, preserves the last good snapshot with delayed-update guidance, retries automatically, and lets explicit refresh/reconnect supersede a stalled request. ## Acceptance tests - A never-settling context request is aborted at a configurable deadline, reports the retained-snapshot error state, clears single-flight state, and schedules a retry. - The retry can render a successful fresh snapshot. - A late completion from a timed-out generation cannot overwrite newer data. - Explicit user refresh/reconnect can supersede a stalled generation immediately. - Healthy concurrent callers remain single-flight. - Focused and full automated suites pass. This behavior was checked against all historical issue titles and recent main commits; existing timeout and refresh issues cover server-side endpoint deadlines or rejected requests, not browser promises that remain pending.
timmy was assigned by rockachopa 2026-08-08 13:09:55 +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#303
No description provided.