Skip to content

perf: dashboard Suspense streaming + async cache warming#152

Merged
neonwatty merged 5 commits intomainfrom
fix/async-high-impact
Apr 19, 2026
Merged

perf: dashboard Suspense streaming + async cache warming#152
neonwatty merged 5 commits intomainfrom
fix/async-high-impact

Conversation

@neonwatty
Copy link
Copy Markdown
Collaborator

Summary

  • Dashboard Suspense streaming: Split the List component into a shell (tabs, nav, filters, FAB) that renders instantly and a DashboardContent async Server Component that streams data via <Suspense>. The shell shows · placeholder counts that update via ListCountContext when data arrives. This eliminates the 2-6 second blank screen while GitHub API calls resolve.
  • Fire-and-forget cache warming: addRepo no longer blocks the response while warming caches (issues, PRs, labels). The DB write returns immediately; cache warming runs in the background.
  • CDN cache-busting for Octokit: Adds cache: "no-store" + a _nc query parameter to GET requests to bypass both Next.js Data Cache and GitHub's CDN, ensuring our SQLite cache is the single source of freshness truth.
  • E2E test hardening: Migrated test DB setup to initSchema/runMigrations, added process group cleanup, stderr ring buffer, and fixed selectors for the ConfirmDialog two-step flow.

Test plan

  • Typecheck passes (pnpm turbo typecheck)
  • Lint passes (pre-commit hook)
  • Dashboard loads with shell appearing before data (verify skeleton → content transition)
  • Tab counts update from · to real numbers after data streams in
  • Issues tab and PRs tab both render correctly
  • Adding a repo returns immediately (no spinner during cache warming)
  • Dashboard shows data for newly added repo on next visit
  • Error state: if GitHub token expires, shell survives and shows inline error
  • E2E tests pass: pnpm --filter @issuectl/web test:e2e

Closes #134

Previously the outer catch discarded the error silently — transient
revalidation failures were invisible unless both attempts failed.
Now logs at console.debug so operators can spot intermittent issues.
ESLint only allows console.warn and console.error — console.debug
is not in the allowed list.
Client-first queue with server-side replay, designed for remote
access via Cloudflare Tunnel. Covers IndexedDB operation queue,
three-tier action classification, sync-on-reconnect, and UI
indicators.
18 tasks covering: health endpoint, IndexedDB queue, tryOrQueue
helper, sync replay, offline-aware hooks, enhanced UI indicators,
Tier 2/3 action wrapping, CacheAge badge, E2E tests, and quality
gates.
)

Split the dashboard into a shell (tabs, nav, filters) that renders
instantly and a Suspense-wrapped async Server Component that streams
data in. The shell shows placeholder counts ("·") that update via
React context when data arrives.

Also converts add-repo cache warming to fire-and-forget so the
response returns immediately after the DB write, and adds CDN
cache-busting to Octokit fetches.
@neonwatty neonwatty added this pull request to the merge queue Apr 19, 2026
Merged via the queue into main with commit 833feca Apr 19, 2026
5 checks passed
@neonwatty neonwatty deleted the fix/async-high-impact branch April 19, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant