Skip to content

feat(octane): add inspectable descriptor children - #555

Closed
jonkwheeler wants to merge 35 commits into
octanejs:mainfrom
jonkwheeler:jon/descriptor-children
Closed

jonkwheeler wants to merge 35 commits into
octanejs:mainfrom
jonkwheeler:jon/descriptor-children

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add descriptorChildren(component) as an identity-preserving compiler marker
  • lower ordinary TSЯX children to inspectable descriptors for marked local and imported bindings
  • carry the contract through direct, default, aliased, and TypeScript barrel exports in Vite client and SSR graphs

Why

  • React bindings such as react-draggable inspect and clone their single child
  • Octane template children are normally render blocks, so faithful bindings otherwise require call-site wrappers or non-parity APIs
  • the marker keeps ordinary components on the existing render-block path and lets binding packages opt into descriptor semantics at their export boundary

Changes

  • add symmetric client/server compiler lowering and public runtime exports
  • add Vite module-graph metadata proof with grouped module loads, fail-loud malformed/error handling, and .ts barrel propagation
  • add runtime, SSR/compiler, Vite graph, neighboring-unmarked, default-export, alias, barrel, positional-sibling, and operation-count regressions
  • add an octane patch changeset

Validation

  • pnpm sync
  • scoped formatting check for all changed files
  • targeted Vitest: 6 files, 646 tests passed across octane and octane-prod
  • focused typecheck:files for the public runtime surface and TSЯX fixture
  • git diff --check
  • full pnpm format:check
  • full pnpm typecheck
  • full pnpm test

Risk / follow-ups

  • metadata specialization is intentionally production-build scoped; dev/watch keeps ordinary children semantics to avoid stale importer proof
  • namespace/member component imports are not specialized by this marker path
  • deterministic load-count assertions cover graph fan-out; no wall-clock compiler benchmark was used because disk pressure made timing comparisons unreliable
  • this prerequisite unblocks the standard <Draggable><div /></Draggable> authoring shape in the separate @octanejs/react-draggable binding PR

Provenance

  • An agent produced this diff (agent-authored)

Note

Medium Risk
Changes core children lowering and Vite transform metadata for both client and SSR; incorrect graph proof or lowering could break clone/inspect bindings or hydration parity, though coverage is extensive.

Overview
Adds descriptorChildren(component) as a compile-time marker so bindings can inspect and clone ordinary TSЯX children (e.g. Children.only / cloneElement) instead of only receiving compiled children render blocks.

For marked local or imported components, client and server lowering now pass element descriptors (including @if / @for under marked slots and positional siblings via positionalChildren), while unmarked components keep the existing markChildrenBlock path.

Vite discovers marked exports/imports, attaches octane:descriptor-children-exports metadata (with barrel re-export propagation, grouped loads, filesystem fallback, and fail-loud errors), and feeds isDescriptorChildrenImport into the compiler on client and SSR transforms.

Also adds runtime exports, fixtures, and broad compiler/Vite/runtime tests; trims some nested keyed-list projection coverage; and includes separate octane patch changesets for unrelated runtime optimizations bundled in the diff.

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

@vercel

vercel Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
octane-website Error Error Aug 4, 2026 12:59am
octane-website-mcp Ready Ready Preview Aug 4, 2026 12:59am

Request Review

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Aug 3, 2026
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 23:00 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 23:02 Inactive
Comment thread packages/octane/src/compiler/vite.js Resolved
Comment thread packages/octane/src/compiler/compile.js Resolved
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 23:10 Inactive
Comment thread packages/octane/src/compiler/vite.js Resolved
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 23:38 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 4, 2026 00:14 Inactive
Comment thread packages/octane/src/compiler/vite.js Resolved
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 4, 2026 00:59 Inactive
Comment thread packages/octane/src/compiler/bundler.js Resolved
Comment thread packages/octane/src/compiler/bundler.js Resolved

@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 9fad17d. Configure here.

Comment thread packages/octane/src/compiler/bundler.js Resolved
Align import scanning with void-component discovery so Identifier-tagged
Element nodes are proven the same way JSXOpeningElement tags already were.

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

Copy link
Copy Markdown
Contributor Author

Addressed Cursor Bugbot finding on TSRX Element tag import scanning (bfbfbdd). Waiting for Bugbot on the new head before re-signaling ready.

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

Restore autoMemo LocalHazards from main (dropped by earlier merges) while
keeping descriptorChildren bindings/lowering, and take octanejs#684 returned-JSX
wall-B memoization.

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

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Currency update-branch completed onto current main. Prior ready signal no longer holds until Cursor Bugbot finishes on the new head.

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Currency restored via update-branch onto current main. Merge CLEAN, Cursor Bugbot completed on head 26f0dd8 with no unresolved findings, threads clear.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is BEHIND main again (new commits landed after prior update-branch). Withdrawing ready signal while updating currency.

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Currency restored via update-branch onto current main. Merge state CLEAN, Cursor Bugbot completed on head ef3151f with no unresolved findings, threads clear.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is BEHIND main; updating via update-branch before re-checking readiness.

REVIEW WITHDRAWN

@leonidaz

Copy link
Copy Markdown
Collaborator

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

@leonidaz leonidaz closed this Aug 12, 2026
kotarotaniguchi0523 pushed a commit to kotarotaniguchi0523/octane that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability REVIEW COMPLETE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants