fix(console): hover preview swaps rows immediately on cache miss#24
fix(console): hover preview swaps rows immediately on cache miss#24alob-mtc wants to merge 1 commit into
Conversation
Bug: hovering a different row while the popup was already showing left the OLD row's content visible until the 2s timer fired and the new row's fetch resolved. Worst case ~2s + network — the popup looked broken (showing data unrelated to the row the cursor was on). Cause: the swap path only updated the popup state when the new row's result was already in the cache. Cache miss fell through to the "schedule a 2s timer" branch — the popup didn't change in the meantime. Fix: on row swap, always update the popup's row + input immediately. Use the cached result if there is one; otherwise render with result=null (popup shows "No result yet" briefly while the activity loads) and patch in the actual result when the background fetch returns. Seq guard ensures a slow fetch can't override a row the user already moved past. Also guards re-entry into the same row: cancels the show timer but doesn't tear down or replace the existing popup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bug: hovering a different row while the popup was already showing left the OLD row's content visible until the standard 2s timer fired AND the new row's fetch resolved. Worst case ~2s + network — the popup looked broken (showing data unrelated to the row the cursor was on).
Cause
The swap path in `onRowMouseEnter` only updated the popup state when the new row's result was already cached. Cache miss fell through to the cold-path "schedule a 2s timer" branch — the popup didn't change in the meantime.
Fix
On row swap, always update the popup's row + input immediately:
Seq guard ensures a slow fetch can't override a row the user already moved past.
Also guards re-entry into the same row: cancels the show timer but doesn't tear down or replace the existing popup.
Note on history
This change was originally pushed directly to `main` as commit `abd2794` by mistake. Force-pushed main back to `1d560e3` and re-applied here as a proper PR.
🤖 Generated with Claude Code