Skip to content

fix(console): hover preview swaps rows immediately on cache miss#24

Open
alob-mtc wants to merge 1 commit into
mainfrom
fix/console-hover-preview-row-swap
Open

fix(console): hover preview swaps rows immediately on cache miss#24
alob-mtc wants to merge 1 commit into
mainfrom
fix/console-hover-preview-row-swap

Conversation

@alob-mtc

Copy link
Copy Markdown
Owner

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:

  • Cache hit → render with cached result.
  • Cache miss → render with `result: null` (popup briefly shows "No result yet" 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.

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

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>
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@alob-mtc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 13 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 305105d1-a566-40c1-95ab-be7b497971d6

📥 Commits

Reviewing files that changed from the base of the PR and between 1d560e3 and abd2794.

📒 Files selected for processing (1)
  • observability/ui/runnerq-console.html
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/console-hover-preview-row-swap

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the fix label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant