Skip to content

fix(dashboard): reuse cached API reads - #1180

Merged
dcramer merged 6 commits into
mainfrom
codex/dashboard-query-cache
Aug 1, 2026
Merged

fix(dashboard): reuse cached API reads#1180
dcramer merged 6 commits into
mainfrom
codex/dashboard-query-cache

Conversation

@dcramer

@dcramer dcramer commented Aug 1, 2026

Copy link
Copy Markdown
Member

Dashboard routes now reuse a shared TanStack Query cache instead of treating each mount as a fresh read. Shell identity and configuration have one owner, slower-changing metadata stays fresh for five minutes, reporting reads use the shared 30-second default, and request-backed queries consume Query's cancellation signal. Fresh conversation feeds no longer refetch merely because the window regains focus.

Personal API token reads and writes now use the query and mutation caches without storing the one-time token secret. Cache updates cancel stale reads before applying results, rapid create clicks cannot start duplicate mutations, and plugin record actions are serialized so rapid clicks cannot issue duplicate deletes. Query keys now include every input used by conversation, plugin-page, and highlighted-code fetches, while conversation detail consumers subscribe only to the fields they use.

The dashboard now runs TanStack Query's recommended lint rules through Oxlint in both the root lint task and pre-commit checks. ESLint is present only because the TanStack plugin requires its runtime as a peer; Oxlint remains the configured runner. Browser regression coverage exercises single /api/me ownership, route-level token cache reuse and mutation races, fresh versus stale focus behavior, and duplicate plugin actions.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 1, 2026 7:53pm

Request Review

@dcramer
dcramer marked this pull request as ready for review August 1, 2026 18:20
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 1, 2026
Comment thread packages/junior-dashboard/src/client/pages/PersonalTokensPage.tsx
Comment thread packages/junior-dashboard/src/client/pages/PersonalTokensPage.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 07120ce. Configure here.

Comment thread packages/junior-dashboard/src/client/pages/PersonalTokensPage.tsx Outdated
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: medium PR risk score: medium labels Aug 1, 2026
@dcramer
dcramer merged commit ca25a85 into main Aug 1, 2026
31 checks passed
@dcramer
dcramer deleted the codex/dashboard-query-cache branch August 1, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant