fix(ui): drop stale repo-picker panel responses on keystroke races (#7784) - #7904
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…SONbored#7784) Co-authored-by: Cursor <cursoragent@cursor.com>
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-21 16:59:31 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|


Summary
Four maintainer repo-picker panels (AMS cohort, AI review settings, activation preview, maintainer settings + focus-manifest editor) load on every free-text
repoFullNamekeystroke with no stale-response guard, so a slower response for an older slug can overwrite the newer one (#7784).This PR adds the same cancelled-flag pattern already used elsewhere (
use-polled-fetch/ audit-feed generation guards): each effect owns acancelledboolean, and post-awaitsetStateis skipped when the effect has been superseded. Retry/refresh still callload()without a cancel token (manual retries are out of the keystroke-race scope).Visual note: this is a fetch-ordering fix only — layout/CSS/copy are unchanged. Before and after screenshots are therefore pixel-identical by design; the highlighted repo picker is the surface the race affects.
Closes #7784
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lint(eslint on the five touched panel files)npm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
apps/loopover-ui(Codecov apps ignore / no src 99% patch gate). Ran package-local prettier + eslint +vitest run src/components/site/app-panels/ams-miner-cohort-card.test.tsx(9/9 pass, including the out-of-order fetch regression). Roottest:coverage/ workers / MCP / OpenAPI are unrelated to this UI race fix.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
AMS miner cohort card repo picker (
/app/maintainer), dark theme only (loopover-ui has no light theme). Annotated mint outline marks the free-textowner/repoinput whose keystrokes previously raced. Before and after are pixel-identical — the fix only drops superseded fetch responses; nothing rendered changes at rest.Notes