Skip to content

fix(ui): ignore stale repo-picker fetch responses - #7874

Closed
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:fix/repo-picker-stale-response-7784
Closed

fix(ui): ignore stale repo-picker fetch responses#7874
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:fix/repo-picker-stale-response-7784

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Add the audit-feed requestGenerationRef guard to the four free-text repo-picker panels so an earlier keystroke fetch cannot overwrite state after a newer one.
  • Cover all five load sites: AMS miner cohort, AI review settings, activation preview, maintainer settings, and FocusManifestEditor.
  • Add a regression test that resolves an older AMS cohort response after a newer repo load and asserts the stale payload is ignored.

Closes #7784

Test plan

  • npx vitest run src/components/site/app-panels/ams-miner-cohort-card.test.tsx in apps/loopover-ui (after @loopover/ui-kit build)
  • CI green (changes, validate-code, validate-tests, codecov)

Made with Cursor

Bump a request generation on each load so out-of-order resolutions from free-text keystrokes cannot overwrite the repo the user finished typing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 21, 2026 15:37
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 21, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

1 similar comment
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-21 15:45:34 UTC

5 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 4 non-blocking
  • In `maintainer-settings.tsx:163` the early-return guard is placed correctly, but note `save()` in the same file has no equivalent generation guard for its own in-flight PUT — out of scope here since save isn't a race the issue describes, but worth a follow-up if double-clicking save is possible.
  • The `requestGenerationRef` comment duplicated near-verbatim across all five files could be extracted to a shared hook (e.g. `useRequestGeneration`) to avoid the five near-identical copies, per DRY.
  • Consider factoring the `requestGenerationRef`/`generation` bump-and-compare pattern into a small shared hook in `apps/loopover-ui/src/lib` given it's now duplicated five times.
  • Add a similarly-shaped regression test for at least one of the other four sites (e.g. `ai-review-settings.test.tsx`) to raise confidence the pattern is exercised beyond the AMS panel.

CI checks failing

  • validate
  • validate-code
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7784
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 64 registered-repo PR(s), 21 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 64 PR(s), 7 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff adds a requestGenerationRef stale-response guard (matching the audit-feed pattern referenced in the issue) to all 5 required load sites across the 4 components, including both MaintainerSettings and FocusManifestEditor, and includes a regression test simulating an out-of-order response resolution.

Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 64 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This pull request changes UI/visual code but its screenshot evidence is incomplete. Every required viewport × theme combination needs its own before/after image pair in a labeled table row (e.g. "Desktop · Light | before | after"). Still missing: Desktop · Dark, Tablet · Dark, Mobile · Dark.

Please resubmit with the remaining rows filled in.

See https://github.com/JSONbored/loopover/blob/main/.claude/skills/contributing-to-loopover/SKILL.md for the exact format and examples. This is an automated maintenance action.

@loopover-orb loopover-orb Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 repo-picker panels have no stale-response guard - free-text keystrokes race each other

1 participant