Keep browser data useful during slow or lost connections #24

Open
opened 2026-11-01 20:11:42 +00:00 by viacheslavshuka · 0 comments

Outcome

Users need previously loaded information during connection problems without mistaking stale state for a confirmed booking. Add shared TanStack Query behavior over the generated client.

Acceptance criteria

  • Relevant session and notification data polls every 15 seconds while its page is visible. Returning to the page refreshes it.
  • One resource has one polling owner. Query keys include the account and relevant filters. Request cancellation reaches the API client.
  • Own-action results update the displayed state immediately after server confirmation. A stale query response cannot overwrite a newer confirmed mutation result.
  • During failed reads, previously loaded information stays visible with a stale or offline indication. Empty, loading, and failed states remain distinguishable.
  • Booking, approval, and offer-acceptance actions show immediate progress, but success requires server confirmation.
  • Connectivity loss does not queue booking writes for automatic replay. An uncertain result does not display a fabricated confirmed state.
  • Logout or an account change clears private query state. Delayed responses from the prior account cannot populate the new account's views.
  • Conditional reads preserve the current representation on a valid 304 response without parsing an empty JSON body.
  • No persistent offline storage or service worker is introduced by this behavior.
  • Production measurements cover cold and warm navigation under controlled network and CPU conditions. Reports do not impose an arbitrary numeric performance gate.

Validation design

Control response order, visibility, reconnect events, and latency. Expose duplicate polling with two mounted consumers. Race a confirmed write against an older read. Switch accounts while a request is pending and assert no private-data reuse. Disconnect during a seat request, restore connectivity, and assert no delayed automatic submission.

Dependencies

## Outcome Users need previously loaded information during connection problems without mistaking stale state for a confirmed booking. Add shared TanStack Query behavior over the generated client. ## Acceptance criteria - Relevant session and notification data polls every 15 seconds while its page is visible. Returning to the page refreshes it. - One resource has one polling owner. Query keys include the account and relevant filters. Request cancellation reaches the API client. - Own-action results update the displayed state immediately after server confirmation. A stale query response cannot overwrite a newer confirmed mutation result. - During failed reads, previously loaded information stays visible with a stale or offline indication. Empty, loading, and failed states remain distinguishable. - Booking, approval, and offer-acceptance actions show immediate progress, but success requires server confirmation. - Connectivity loss does not queue booking writes for automatic replay. An uncertain result does not display a fabricated confirmed state. - Logout or an account change clears private query state. Delayed responses from the prior account cannot populate the new account's views. - Conditional reads preserve the current representation on a valid 304 response without parsing an empty JSON body. - No persistent offline storage or service worker is introduced by this behavior. - Production measurements cover cold and warm navigation under controlled network and CPU conditions. Reports do not impose an arbitrary numeric performance gate. ## Validation design Control response order, visibility, reconnect events, and latency. Expose duplicate polling with two mounted consumers. Race a confirmed write against an older read. Switch accounts while a request is pending and assert no private-data reuse. Disconnect during a seat request, restore connectivity, and assert no delayed automatic submission. ## Dependencies - [#7: Create the React application with locked frontend tooling](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/7). Provides the browser application where shared server-state behavior runs. - [#10: Generate and verify OpenAPI and the TypeScript client](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/10). Supplies the typed API client and response contracts. - [#14: Authenticate Telegram users through protected Quorum sessions](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/14). Supplies account identity and logout transitions. ## Related work - [#60: Revalidate private API reads without weakening permissions](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/60) - [#54: Open Quorum on a filtered list of upcoming tests](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/54) - [#59: Browse tests in month, week, and agenda views](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/59) - [#22: Keep a durable notification inbox with current action status](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/22) - [#25: Preserve unsaved form input during reauthentication](https://code.viacheslavshuka.com/viacheslavshuka/quorum/issues/25)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
viacheslavshuka/quorum#24
No description provided.