Skip to content

feat(bindings): add intersection observer - #431

Closed
jonkwheeler wants to merge 63 commits into
octanejs:mainfrom
jonkwheeler:jon/intersection-observer-binding
Closed

jonkwheeler wants to merge 63 commits into
octanejs:mainfrom
jonkwheeler:jon/intersection-observer-binding

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • port react-intersection-observer 10.1.0 to Octane as @octanejs/intersection-observer
  • preserve pooled observation, thresholds, triggerOnce, fallback behavior, useInView/useOnInView, InView, and test utilities
  • add central playground coverage, package metadata, generated inventories, and a changeset

Verification

  • focused Vitest project: 5 tests passed
  • tsrx-tsc package typecheck passed
  • central Octane playground production build passed (6,789 modules)
  • package inventory, binding status, parity-gap, CLI data, changeset, formatting, and diff checks passed

Draft policy

Keep this PR in draft until all required GitHub checks are green and the branch is up to date with main.


Note

Medium Risk
Large new binding with documented behavioral divergences around unsupported IntersectionObserver and fallback edge cases; browser parity lanes add CI dependency on Playwright Chromium.

Overview
Introduces @octanejs/intersection-observer, a new framework binding that ports react-intersection-observer 10.1.0 to Octane. The public surface matches upstream: useInView, useOnInView, InView, pooled observe, defaultFallbackInView, and @octanejs/intersection-observer/test-utils, implemented with Octane hooks/components and framework-neutral observer pooling in observe.ts.

Parity and CI wire the package into the repo’s react-parity story: vendored upstream sources, one-for-one adapted Vitest suites, pristine React oracle runs (jsdom + Vitest browser/Playwright for browser.test.tsx), type probes, and audit/react-parity.json with two documented runtime divergences (unsupported-false onChange suppression, unsupported IO errors in effects vs sync throw). CI installs Playwright Chromium once for binding browser lanes; bindings:typecheck and generated inventories/status docs count 61 bindings.

Consumer notes (called out in status/UPSTREAM): TSRX InView render props via children={...}; test utils require explicit setupIntersectionMocking / resetIntersectionMocking; SSR uses initialInView until client observation starts in an effect.

Reviewed by Cursor Bugbot for commit 8298b79. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octane-website Ready Ready Preview Aug 2, 2026 3:05pm
octane-website-mcp Ready Ready Preview Aug 2, 2026 3:05pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 18:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 18:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 20:05 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 20:06 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 20:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 20:20 Inactive
…rver-binding

# Conflicts:
#	package.json
#	packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 20:38 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 20:39 Inactive
…rver-binding

# Conflicts:
#	packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 21:03 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 21:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 21:38 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 21:38 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 21:49 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 21:49 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 22:01 Inactive
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Updating branch onto latest main (BEHIND); will re-signal when CLEAN + Bugbot clear.

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Currency re-pass complete: updated branch onto latest main via update-branch. Bugbot SUCCESS on head 0271002, no unresolved threads, merge state CLEAN.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Merging origin/main to clear DIRTY conflicts; prior ready signal is void until Bugbot and checklist pass on the new head.

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is DIRTY against main; withdrawing ready signal while restoring merge currency.

REVIEW WITHDRAWN

jonkwheeler and others added 2 commits August 10, 2026 13:36
Resolve user-apps-v1 corpus digest conflict after main moved.

Co-authored-by: Cursor <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 4aadbb8. Configure here.

Hooks live in .tsrx and need compiler-assigned slots, not a manual skip.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merge currency restored; Bugbot clean on current head; no unresolved threads.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is DIRTY against main after the last ready signal. Withdrawing while restoring merge currency.

REVIEW WITHDRAWN

Resolve generated inventory and evals corpus conflicts via pnpm sync
after main moved (octanejs#682 version packages).

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merged origin/main to clear DIRTY conflicts (#682 version packages). Bugbot SUCCESS on head 06322d0, no unresolved threads, merge state CLEAN.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is BEHIND main after the last ready signal. Withdrawing while updating branch onto latest main.

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Currency pass complete: updated branch onto latest main via update-branch. Bugbot SUCCESS on head 8298b79, no unresolved threads, merge state CLEAN.

READY FOR REVIEW

@leonidaz

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! This pull request was incorporated into main as commit a2feb4efd207 through consolidated PR #699.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat PR: new feature or capability READY FOR REVIEW REVIEW COMPLETE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants