Skip to content

fix: remove broken throttle from VirtualGrid scroll tracking - #12781

Merged
mattmillerai merged 2 commits into
mainfrom
matt/fe-990-fe-virtualgrid-is-scroll-blind-to-discrete-mouse-wheel
Jun 11, 2026
Merged

mattmillerai merged 2 commits into
mainfrom
matt/fe-990-fe-virtualgrid-is-scroll-blind-to-discrete-mouse-wheel

Conversation

@mattmillerai

Copy link
Copy Markdown
Member

Summary

Every VirtualGrid consumer (assets sidebar, manager dialog, widget select dropdown) is blind to discrete mouse-wheel scrolling: useScroll's throttle: 64 never reports scroll position, so the virtualization window stays frozen — users see blank space below the first viewport of items and approach-end (infinite scroll) never fires. Trackpad scrolling masks the bug by emitting events faster than the throttle window.

Changes

  • What: drop the throttle option from useScroll in VirtualGrid and remove the scrollThrottle prop (no consumer passes it). Scroll events are frame-aligned and the handler is cheap, so the throttle bought nothing even when it worked.
  • Root cause: VueUse ≥14 throttleFilter with leading=false (what useScroll uses) marks spaced-out events as executed without executing them — each event re-arms an isLeading restore timer that makes the next event skip its invoke, and the trailing branch is unreachable when elapsed > duration. Regression of vueuse#2390; still present on vueuse main.

Review Focus

  • Verified live against staging: with the throttle, sidebar scrolled to scrollTop 1250 while scrollY stayed 0 and the render window stayed at [0..3) of 27 (blank viewport); with this fix, scrollY tracks 1:1 and the window advances. Bare-vs-throttled useScroll compared side-by-side on the same element to isolate the cause.

  • Unblocks wheel-scroll for feat(assets): wire infinite scroll to the flat-output provider in the widget select dropdown #12780's dropdown infinite scroll with no changes there.

  • Fixes FE-990

🤖 Generated with Claude Code

VueUse >=14 throttleFilter drops events spaced wider than the throttle
window when leading=false (regression of vueuse#2390), so useScroll with
throttle: 64 froze scrollY for discrete mouse-wheel input. Every
VirtualGrid consumer (assets sidebar, manager dialog, widget select
dropdown) rendered a blank viewport on wheel scroll and never fired
approach-end. Trackpad scrolling masked the bug by emitting events
faster than the window.

Scroll events are frame-aligned and the handler is cheap; drop the
throttle and the unused scrollThrottle prop.
@mattmillerai
mattmillerai requested a review from a team June 11, 2026 01:30
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@mattmillerai, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 minute and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 51df3b15-9005-4dd8-867d-533f86229287

📥 Commits

Reviewing files that changed from the base of the PR and between bf41984 and c803765.

📒 Files selected for processing (1)
  • src/components/common/VirtualGrid.vue
📝 Walkthrough

Walkthrough

VirtualGrid.vue removes the scrollThrottle prop and its associated throttling behavior. The component no longer accepts or defaults a scroll throttle parameter, and the useScroll listener no longer applies throttling, relying instead on native VueUse ≥14 behavior.

Changes

Remove scrollThrottle prop and scroll throttling

Layer / File(s) Summary
Remove scrollThrottle prop and throttling config
src/components/common/VirtualGrid.vue
Prop type definition, destructuring defaults, and useScroll throttle option are all updated together to remove the scrollThrottle feature and its configuration, with comments explaining that VueUse ≥14 makes throttling unnecessary.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

core/1.44

Suggested reviewers

  • marawan206
  • DrJKL
  • pythongosssss

Poem

A throttle removed from the scroll, so clean,
No prop to confound the machine,
VueUse now leads the way,
With passive events at play,
The grid scrolls smooth as ever seen! 🐰✨


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (1 error)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❌ Error PR title "fix: remove broken throttle..." uses bug-fix language; changes src/components/common/VirtualGrid.vue but no files under browser_tests/; commit message lacks explanation for missing E2E re... Add or update a Playwright regression test under browser_tests/ to verify discrete mouse-wheel scroll behavior in VirtualGrid, or add a concrete explanation in the PR description of why an end-to-end test is not practical.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing broken throttle behavior from VirtualGrid scroll tracking.
Description check ✅ Passed The description includes Summary and Changes sections as required, with detailed explanations of the problem, root cause, and verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Adr Compliance For Entity/Litegraph Changes ✅ Passed ADR compliance check applies only to changes in src/lib/litegraph/, src/ecs/, or graph entity files. This PR modifies only src/components/common/VirtualGrid.vue, which is outside these scopes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/fe-990-fe-virtualgrid-is-scroll-blind-to-discrete-mouse-wheel

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

@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 06/11/2026, 03:13:28 AM UTC

Links

@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1668 passed, 0 failed

📊 Browser Reports
  • chromium: View Report (✅ 1647 / ❌ 0 / ⚠️ 0 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@codecov

codecov Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff             @@
##             main   #12781       +/-   ##
===========================================
- Coverage   75.36%   61.59%   -13.78%     
===========================================
  Files        1565     1454      -111     
  Lines       91360    75060    -16300     
  Branches    23977    21192     -2785     
===========================================
- Hits        68851    46231    -22620     
- Misses      21779    28475     +6696     
+ Partials      730      354      -376     
Flag Coverage Δ
e2e ?
unit 61.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/components/common/VirtualGrid.vue 84.31% <ø> (-15.69%) ⬇️

... and 1133 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

AustinMroz
AustinMroz previously approved these changes Jun 11, 2026
Comment thread src/components/common/VirtualGrid.vue Resolved
@mattmillerai
mattmillerai enabled auto-merge June 11, 2026 03:12
@mattmillerai
mattmillerai added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit aa68573 Jun 11, 2026
49 checks passed
@mattmillerai
mattmillerai deleted the matt/fe-990-fe-virtualgrid-is-scroll-blind-to-discrete-mouse-wheel branch June 11, 2026 03:44
DrJKL pushed a commit that referenced this pull request Jul 6, 2026
## Summary

Every `VirtualGrid` consumer (assets sidebar, manager dialog, widget
select dropdown) is blind to discrete mouse-wheel scrolling:
`useScroll`'s `throttle: 64` never reports scroll position, so the
virtualization window stays frozen — users see blank space below the
first viewport of items and `approach-end` (infinite scroll) never
fires. Trackpad scrolling masks the bug by emitting events faster than
the throttle window.

## Changes

- **What**: drop the `throttle` option from `useScroll` in `VirtualGrid`
and remove the `scrollThrottle` prop (no consumer passes it). Scroll
events are frame-aligned and the handler is cheap, so the throttle
bought nothing even when it worked.
- **Root cause**: VueUse ≥14 `throttleFilter` with `leading=false` (what
`useScroll` uses) marks spaced-out events as executed without executing
them — each event re-arms an `isLeading` restore timer that makes the
next event skip its invoke, and the trailing branch is unreachable when
`elapsed > duration`. Regression of vueuse#2390; still present on vueuse
`main`.

## Review Focus

- Verified live against staging: with the throttle, sidebar scrolled to
`scrollTop` 1250 while `scrollY` stayed 0 and the render window stayed
at `[0..3)` of 27 (blank viewport); with this fix, `scrollY` tracks 1:1
and the window advances. Bare-vs-throttled `useScroll` compared
side-by-side on the same element to isolate the cause.
- Unblocks wheel-scroll for #12780's dropdown infinite scroll with no
changes there.

- Fixes FE-990

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dante01yoon pushed a commit that referenced this pull request Jul 27, 2026
## Summary

Every `VirtualGrid` consumer (assets sidebar, manager dialog, widget
select dropdown) is blind to discrete mouse-wheel scrolling:
`useScroll`'s `throttle: 64` never reports scroll position, so the
virtualization window stays frozen — users see blank space below the
first viewport of items and `approach-end` (infinite scroll) never
fires. Trackpad scrolling masks the bug by emitting events faster than
the throttle window.

## Changes

- **What**: drop the `throttle` option from `useScroll` in `VirtualGrid`
and remove the `scrollThrottle` prop (no consumer passes it). Scroll
events are frame-aligned and the handler is cheap, so the throttle
bought nothing even when it worked.
- **Root cause**: VueUse ≥14 `throttleFilter` with `leading=false` (what
`useScroll` uses) marks spaced-out events as executed without executing
them — each event re-arms an `isLeading` restore timer that makes the
next event skip its invoke, and the trailing branch is unreachable when
`elapsed > duration`. Regression of vueuse#2390; still present on vueuse
`main`.

## Review Focus

- Verified live against staging: with the throttle, sidebar scrolled to
`scrollTop` 1250 while `scrollY` stayed 0 and the render window stayed
at `[0..3)` of 27 (blank viewport); with this fix, `scrollY` tracks 1:1
and the window advances. Bare-vs-throttled `useScroll` compared
side-by-side on the same element to isolate the cause.
- Unblocks wheel-scroll for #12780's dropdown infinite scroll with no
changes there.

- Fixes FE-990

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants