fix(extension): guard overlay refresh against out-of-order pull-context responses#7489
Conversation
…xt responses mountOverlay's refresh button called load() with no request-ordering guard, so two rapid clicks issued two independent pull-context round-trips and whichever resolved last won. Under network jitter the older click's response could resolve after the newer one, silently leaving the overlay showing stale data. Move load() into a per-overlay-instance createOverlayLoader closure that stamps each invocation with a monotonically incrementing ticket and discards any resolved response whose ticket is no longer the latest, so the rendered state always reflects the most recently initiated request. Single-click behavior (loading text, error and success rendering) is unchanged. Closes JSONbored#7463
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7489 +/- ##
==========================================
- Coverage 91.41% 91.39% -0.02%
==========================================
Files 717 717
Lines 73032 73032
Branches 21636 21635 -1
==========================================
- Hits 66762 66751 -11
- Misses 5227 5234 +7
- Partials 1043 1047 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-20 12:48:35 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed 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.
|

fix(extension): guard overlay refresh against out-of-order pull-context responses
mountOverlay's refresh button called load() with no request-ordering
guard, so two rapid clicks issued two independent pull-context round-trips
and whichever resolved last won. Under network jitter the older click's
response could resolve after the newer one, silently leaving the overlay
showing stale data.
Move load() into a per-overlay-instance createOverlayLoader closure that
stamps each invocation with a monotonically incrementing ticket and
discards any resolved response whose ticket is no longer the latest, so
the rendered state always reflects the most recently initiated request.
Single-click behavior (loading text, error and success rendering) is
unchanged.
Closes #7463