Unify live dashboard polling with a pooled Gitea snapshot #131

Closed
opened 2026-08-06 19:22:19 +00:00 by rockachopa · 0 comments
Member

Evidence

The dashboard currently polls context every 8 seconds and activity every 5 seconds. Each route repeats current-user work and GiteaProxy creates a fresh httpx.AsyncClient for every upstream call, preventing connection reuse. Assigned and review-requested pull searches also run sequentially. At current cadence this is roughly 19.5 browser and 61.5 upstream requests per visible tab per minute. No historical issue, PR, release, or recent commit covers unified polling, pooled transport, or in-flight snapshot coalescing.

Product slice

Deliver one visibility-aware live snapshot that returns My Work and activity together, preserves section-level degraded states, coalesces only simultaneous requests, and uses an application-lifetime pooled Gitea transport. Keep responses no-store; do not cache completed payloads.

Acceptance

  • Visible clients make one immediate snapshot request and then one every 8 seconds; hidden clients pause and resume with exactly one immediate refresh.
  • A snapshot resolves current user once and loads independent work/activity concurrently.
  • Simultaneous snapshot calls share one in-flight task, while later calls always fetch fresh data.
  • Failure of activity preserves fresh work and reports activity degradation; failure of work can still return fresh activity.
  • Gitea HTTP client is reused and closed during application shutdown.
  • Snapshot responses remain Cache-Control: no-store; legacy endpoints remain compatible.
  • Focused behavioral tests and the full suite pass.
## Evidence The dashboard currently polls context every 8 seconds and activity every 5 seconds. Each route repeats current-user work and `GiteaProxy` creates a fresh `httpx.AsyncClient` for every upstream call, preventing connection reuse. Assigned and review-requested pull searches also run sequentially. At current cadence this is roughly 19.5 browser and 61.5 upstream requests per visible tab per minute. No historical issue, PR, release, or recent commit covers unified polling, pooled transport, or in-flight snapshot coalescing. ## Product slice Deliver one visibility-aware live snapshot that returns My Work and activity together, preserves section-level degraded states, coalesces only simultaneous requests, and uses an application-lifetime pooled Gitea transport. Keep responses `no-store`; do not cache completed payloads. ## Acceptance - Visible clients make one immediate snapshot request and then one every 8 seconds; hidden clients pause and resume with exactly one immediate refresh. - A snapshot resolves current user once and loads independent work/activity concurrently. - Simultaneous snapshot calls share one in-flight task, while later calls always fetch fresh data. - Failure of activity preserves fresh work and reports activity degradation; failure of work can still return fresh activity. - Gitea HTTP client is reused and closed during application shutdown. - Snapshot responses remain `Cache-Control: no-store`; legacy endpoints remain compatible. - Focused behavioral tests and the full suite pass.
timmy was assigned by rockachopa 2026-08-06 19:22:19 +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#131
No description provided.