Skip to content

Bind JSX scroll listeners to their target node - #1

Merged
dogukani merged 1 commit into
mainfrom
fix/non-bubbling-scroll-listeners
Sep 24, 2026
Merged

dogukani merged 1 commit into
mainfrom
fix/non-bubbling-scroll-listeners

Conversation

@dogukani

@dogukani dogukani commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

JSX onScroll listeners are delegated to Document::body(), but UI scroll events do not bubble. The native view scrolls while the Virtual List recycler and its scroll display remain stale.

Change

Bind JSX scroll listeners to their target node. Keep delegation for bubbling events and the existing document-level routes.

Verification

  • Built the Virtual List Windows app using this compiler branch together with Dispatch virtual list scroll events core#57, Synchronize native scroll state with the UI tree windows#5, and Refresh virtual list rows after native scrolling examples#1. The previously broken build showed stale scroll state; the rebuilt app was manually retested and appears fixed.
  • Compiler architecture, TypeScript, runtime-header syntax (native and 16-bit wchar_t), binding-composition, global-host-mutations, deferred-intrinsic-protocols, recursive-native-carriers, dynamic-value-metadata, value-contracts, and declaration-overlays checks passed.
  • npm run gate remains red on this Windows checkout with broad emitted-baseline drift (157 corpus entries moved); the change is confined to the runtime header, which is included by emitted units rather than copied into their generated source. The drift has not been attributed to this patch, so the gate is not claimed as passing.
  • test:hot-path-shapes cannot run with Windows Clang because the allocation-profile path requires <execinfo.h>.

The manually triggered Linux CI run passed: full compiler build, Hono C++ compilation, and byte-for-byte verification of both routes. Review and the emitted-gate baseline question remain before merge.

macOS and iOS

Summary by CodeRabbit

  • Bug Fixes
    • Scroll event listeners now attach directly to their target, while other bubbling events continue to use BODY delegation.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6969ecea-b835-452c-a96d-900ef9624654

📥 Commits

Reviewing files that changed from the base of the PR and between e1ba2d5 and 869eb86.

📒 Files selected for processing (1)
  • src/targets/cpp/runtime/gea_runtime.h

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

bindNodeListener now registers scroll listeners on their target and returns before BODY delegation. The comment clarifies that bubbling events are delegated to BODY, while scroll events stay on their target.

Changes

Scroll Listener Targeting

Layer / File(s) Summary
Listener registration behavior
src/targets/cpp/runtime/gea_runtime.h
The comment distinguishes bubbling events delegated to BODY from scroll events. For scroll, bindNodeListener registers the listener on the target and returns.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: dashersw

Merge Risk: ⚪ Minimal · up to 869eb

Scroll handlers now attach to their target so non-bubbling scroll events can be received. No concrete merge-blocking regression is established; engine-side listener cleanup could not be verified.

🚥 Pre-merge checks | ✅ 5

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: binding JSX scroll listeners to their target nodes.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@dogukani
dogukani marked this pull request as ready for review September 24, 2026 12:24
@dogukani
dogukani merged commit 1c82ebb into main Sep 24, 2026
4 checks passed
@dogukani
dogukani deleted the fix/non-bubbling-scroll-listeners branch September 24, 2026 18:55
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant