Skip to content

Require pointer rest before opening activity hover cards - #25931

Merged
AmethystLiang merged 2 commits into
mainfrom
no-hover-popover-on-agent-status
Oct 11, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
no-hover-popover-on-agent-status

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​219 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​219
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​233 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​228

Problem

Activity hover cards open too eagerly on simple pointer hover passes, causing distracting popup windows and accidental card triggers when users are just moving through the activity list.

Solution

Hover cards now only open after the pointer rests (stops moving) for 550ms on an activity item. A progress indicator fills during the 150ms–550ms window to show the card is loading. When a card was recently visible, the rest requirement drops to 120ms to allow quick row-switching. Scrolling cancels pending opens and closes open cards. Keyboard focus still opens cards immediately.

What Changed

  • New hook useActivityThreadHoverCardIntent captures pointer and scroll intent, replacing Radix's open-on-enter with open-on-rest.
  • New progress bar in ActivityThreadRow animates while the pointer rests.
  • Test suite covers rest timing, warm-open optimization, scroll cancellation, keyboard focus, and accidental hover from scrolled rows sliding under a still pointer.

Why

Pointer hover is noisy—users pass through rows on their way to another target. Requiring rest before opening keeps the UI quiet without disabling hover entirely. Warm-opening after recent cards preserves quick re-checking. Scroll cancellation prevents cards from staying open mid-scroll. The progress indicator sets expectations and provides visual feedback that hovering is intentional.

Visual Proof

N/A – Behavior change: hover cards now require pointer rest; visual indicator added for progress. Not user-facing during normal interaction, only when intentionally hovering.

Testing

  • Automated tests added: comprehensive test suite in activity-thread-hover-card-intent.test.tsx covering rest timing, warm rest, scroll cancellation, keyboard focus, and edge cases
  • I manually tested these changes locally

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md

Notes

No cross-platform, SSH, mobile, or performance impact. Pointer event behavior is uniform; keyboard focus is platform-independent.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 132bcfd0-bdea-4853-8fd6-a22600c54519

📥 Commits

Reviewing files that changed from the base of the PR and between 842c6c6 and c57b05b.


📒 Files selected for processing (4)
  • src/renderer/src/components/activity/activity-thread-hover-card-intent.test.tsx
  • src/renderer/src/components/activity/activity-thread-hover-card-intent.ts
  • src/renderer/src/components/activity/activity-thread-hover-card.tsx
  • src/renderer/src/components/activity/activity-thread-row.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

A new hook controls when activity-thread hover cards open based on pointer rest, scrolling, and keyboard focus. The hover-card trigger uses the hook’s handlers and resting state. The row displays a progress indicator while the pointer rests. Tests cover timing and pointer, scroll, click, and keyboard interactions.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c57b0

The hover-rest behavior has no identified merge-blocking defect. Run the normal checks before merging; manual testing was not reported as complete.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: activity hover cards require pointer rest before opening.
Description check ✅ Passed The description explains the problem, solution, rationale, changes, and automated tests. It does not include a linked issue, and its N/A visual-proof note conflicts with the added progress indicator. …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch no-hover-popover-on-agent-status

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@AmethystLiang
AmethystLiang force-pushed the no-hover-popover-on-agent-status branch 2 times, most recently from de0952c to 75c80bc Compare October 10, 2026 01:06
Defer hover card open until pointer stops moving, preventing accidental
popover display on rapid mouse movement. Add progress indicator showing
rest duration. Keyboard focus still opens the card immediately.
@AmethystLiang
AmethystLiang force-pushed the no-hover-popover-on-agent-status branch from 75c80bc to 84c670b Compare October 10, 2026 05:27
@AmethystLiang
AmethystLiang merged commit 3aaa6a8 into main Oct 11, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant