Skip to content

Port tanstack.com's shell to Octane (bench Phase 2c) + the octane fixes it surfaced - #214

Merged
trueadm merged 5 commits into
mainfrom
claude/tanstack-com-octane-port
Jul 21, 2026
Merged

trueadm merged 5 commits into
mainfrom
claude/tanstack-com-octane-port

Conversation

@trueadm

@trueadm trueadm commented Jul 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

The third flavor of benchmarks/tanstack-com (Phase 2a/2b): the full tanstack.com shell — ~140 files: Navbar (1.4k lines), LibraryLayout (1.4k), the 15-file markdown subsystem, homepage, blog, docs chain, router landing, ApplicationStarter (1.2k) + application-builder — ported from React to Octane on @octanejs/tanstack-start, by a fleet of port agents under a shared dialect-rules contract with byte-fidelity checks on class strings/copy/test-ids.

Status: the flavor builds end-to-end (client + ssr + nitro) and serves its route surface 200 on the same deterministic env knobs as the react/redact flavors. Known issue (Phase 2c follow-up): homepage SSR renders short vs react (~15KB vs ~309KB) — content-parity debugging is the next arc, then the 3-way compare gate + perf suite (Phase 2d).

Octane fixes the port surfaced (all at the source, all red/green-tested)

octane compiler

  • Multi-line JSX string attributes (Tailwind multi-line class strings) emitted invalid JS through three paths — hostValue/spread bindings, the createElement de-opt, and SSR warm-child plans. All re-derive the literal from its cooked value. (multiline-string-attrs.test.ts)
  • TS this parameters survived type-erasure as real parameter names → SyntaxError. (compile-nested-type-statements.test.ts)
  • Warm-child plans printed aria-*/data-* prop keys unquoted.
  • Direct calls to octane's lazy now emit /* @__PURE__ */ (module-scope, shadow-safe, via an esrap getLeadingComments wire-through) so unused lazy declarations tree-shake like React.lazy. (pure-lazy-annotation.test.ts)
  • The vite plugin adds .tsrx to resolve.extensions — extensionless imports resolve like .tsx.

@octanejs/tanstack-start

  • New partial-hydration surface: Hydrate + visible/idle/load/never/media/condition/interaction via ./hydration, delegating to @tanstack/start-client-core exactly as upstream. One documented structural adaptation: octane components can't be bare-called server-side, so strategy renderers run one component level down. (hydrate.test.ts, 4 behavioral tests)
  • <ClientOnly> children are stripped from server compiles — the octane analogue of start-compiler's handleClientOnlyJSX (which can never see .tsrx JSX). This is load-bearing: client-only subtrees reference *.client.* modules, and import-protection verifies post-tree-shake that none stay server-reachable. (client-only-server-strip.test.ts)
  • Import-protection's transform filter used a hand-rolled react-only extension regex, silently skipping .tsrx importers; now uses the shared TRANSFORM_ID_REGEX.

@octanejs/tanstack-router: the route-generator masker fed plain .ts server routes (rss[.]xml.ts) to the TSRX parser; now .tsrx-only. (generator-plugin-mask.test.ts)

New packages (registered: bindings catalog → 38, KNOWN_BINDINGS, llms.txt)

Package Surface
@octanejs/tanstack-router-ssr-query Router ⇄ Query SSR integration (29-line port over router-ssr-query-core)
@octanejs/tanstack-hotkeys Full @tanstack/[email protected] surface over hotkeys-core
@octanejs/tanstack-pacer Full @tanstack/[email protected] surface (all 11 hook families) over @tanstack/pacer

Plus: @octanejs/zustand exports UseBoundStore (upstream parity); @octanejs/sonner uses export type for type-only names.

Upstream bugs found (for separate filing — @tsrx lives in the ripple monorepo)

  • @tsrx/core: / in JSX text nested inside an expression container tokenizes as a regex (one file carries a marked template-literal spelling until fixed).
  • @tsrx/prettier-plugin: drops parens around as casts; drops definite-assignment !; not single-pass idempotent.

Verification

  • Full suite 12,002/12,002 (both vitest projects), typecheck clean, format:check clean, evals corpus + bindings status regenerated.
  • Octane flavor: production build exit 0; /​, /blog, /libraries, /router/latest, /ethos all 200 under node with pinned content.

🤖 Generated with Claude Code


Note

Medium Risk
Touches the core Octane compiler and TanStack Start server build pipeline (ClientOnly strip, import protection), which affects every consumer; mitigated by a large red/green test suite, but the benchmark port is huge and SSR parity is not complete yet.

Overview
Adds the Phase 2c Octane flavor under benchmarks/tanstack-com/octane: the full tanstack.com shell (~140 ported modules — nav, layouts, markdown, blog/docs/home, application builder) on @octanejs/tanstack-start, with content-collections wiring, expanded workspace deps (@octanejs/radix, hotkeys, pacer, visx, markdown/highlight, etc.), and generated blog fixtures so the bench builds and serves its route surface.

Octane compiler fixes driven by the port: multi-line JSX string attributes emit valid JS; TypeScript this parameters are erased; SSR warm-child plans quote aria-*/data-* keys; lazy() calls get /* @__PURE__ */; Vite resolves extensionless imports via .tsrx.

@octanejs/tanstack-start gains partial hydration (Hydrate + ./hydration strategies), compile-time stripping of <ClientOnly> children on the server (so import-protection can tree-shake *.client.* modules), and import-protection transforms that include .tsrx importers.

@octanejs/tanstack-router skips plain .ts/.tsx route files in the TSRX masker. New binding packages router-ssr-query, hotkeys, and pacer; small zustand/sonner export fixes.

Known follow-up: homepage SSR HTML is still much smaller than the React flavor (content parity / Phase 2d compare gate).

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

…es it surfaced

The third flavor of benchmarks/tanstack-com: the full tanstack.com shell
(~140 files — Navbar, LibraryLayout, the markdown subsystem, homepage,
blog, docs chain, router landing, ApplicationStarter) ported from React
to Octane on @octanejs/tanstack-start. The flavor builds end-to-end
(client + ssr + nitro) and serves its route surface 200 on the same
deterministic env knobs as the react/redact flavors. Known issue: the
homepage SSR renders short vs react (~15KB vs ~309KB) — content-parity
debugging continues in Phase 2c follow-up.

Per the bench's octane-issue policy, every octane defect the port
exposed is fixed at the source with tests:

octane (compiler):
- Multi-line JSX string attributes emitted invalid JS via three paths
  (printExpr/hostValue, createElement de-opt, SSR warm-child); all now
  re-derive the printable literal from the cooked value.
- TS `this` parameters survived type-erasure as real parameter names.
- Warm-child plans printed non-identifier prop keys (aria-*/data-*) bare.
- Direct calls to octane's `lazy` now emit /* @__PURE__ */ (module-
  scope, shadow-safe; esrap getLeadingComments wire-through) so unused
  lazy declarations tree-shake like React.lazy.
- The vite plugin adds .tsrx to resolve.extensions (extensionless
  imports resolve like .tsx).

@octanejs/tanstack-start:
- New partial-hydration surface: Hydrate + visible/idle/load/never/
  media/condition/interaction via ./hydration (Suspense/use gating over
  @tanstack/start-client-core; renderers run one component level down —
  octane components cannot be bare-called server-side).
- <ClientOnly> children are stripped from server compiles (octane
  analogue of start-compiler handleClientOnlyJSX) so *.client.* modules
  drop out of the server graph before import-protection's tree-shake
  verification.
- Import-protection's transform filter now uses the .tsrx-aware
  TRANSFORM_ID_REGEX instead of a hand-rolled react-only regex.

@octanejs/tanstack-router: the route-generator masker passes plain
.ts/.tsx route files through untouched (the TSRX parser rejected valid
TS server routes like rss[.]xml.ts).

New packages: @octanejs/tanstack-router-ssr-query (Router ⇄ Query SSR
integration), @octanejs/tanstack-hotkeys (full react-hotkeys 0.10.0
surface), @octanejs/tanstack-pacer (full react-pacer 0.22.1 surface) —
registered in the bindings catalog (38 bindings), KNOWN_BINDINGS, and
llms.txt.

Also: @octanejs/zustand exports UseBoundStore; @octanejs/sonner uses
export type for type-only names; both flavors' content-collections
configs import from the dependency-free ids module (the config runs
under plain node).

Full suite 12,002 green; typecheck + format:check clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
octane-website Skipped Skipped Jul 21, 2026 11:19am
octane-website-mcp Skipped Skipped Jul 21, 2026 11:19am

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 21, 2026 10:43 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 21, 2026 10:44 Inactive
…e-compat excludes

- packages/tanstack-router-ssr-query gains the publish contract the
  inventory validator requires (engines.node >=22, publishConfig.access
  public, repository.directory, license/files/author) — this was the root
  cause of both the lint and validate-publishable-packages failures.
- The three-compat CI lane's CLI --exclude flags silently stopped applying
  after the lane's `pnpm add --lockfile=false three@<matrix>` re-keyed the
  workspace's vitest instances (branch-dependent: main's resolution kept
  them working, this branch's new packages tipped it). The differential/
  browser exclusion now lives in vitest.config.js on the three project
  itself, gated on OCTANE_THREE_COMPAT_VERSION — instance-proof. Verified:
  swapped-three compat lane collects 17 files / 108 tests green; the normal
  lane still runs the full 24 / 130.

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 21, 2026 11:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 21, 2026 11:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 21, 2026 11:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 21, 2026 11:05 Inactive
Every generated-artifact check in the lint job now passes locally
(rules, changesets, markers, parity gaps, error codes, packages
inventory, binding parity, bindings status, lucide, react-parity).

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 21, 2026 11:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 21, 2026 11:09 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 21, 2026 11:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 21, 2026 11:19 Inactive
@trueadm
trueadm merged commit 5974429 into main Jul 21, 2026
22 checks passed
@trueadm
trueadm deleted the claude/tanstack-com-octane-port branch July 21, 2026 11:48
mrdiyorbek-juraev added a commit to mrdiyorbek-juraev/octane that referenced this pull request Jul 21, 2026
Brings in 5 upstream commits: the safe inline-script content contract
(octanejs#215), the tanstack.com shell port (octanejs#214), the TSRX directive arm output
docs (octanejs#213), the inline hook-memo tier (octanejs#208), and the website menu /
scroll-spy work (octanejs#209). Upstream added three bindings
(tanstack-router-ssr-query, tanstack-hotkeys, tanstack-pacer), taking the
table to 39.

Six conflicts, all resolved as unions so neither side lost content:

- website/src/content/bindings.json — @octanejs/cmdk listed alongside
  upstream's three new bindings; the "UI and interaction" description
  keeps command menus and gains keyboard shortcuts and event pacing.
- website/public/llms.txt — same union in prose form.
- docs/bindings-status.md, docs/packages.md, docs/binding-parity-gaps.md
  and the evals user-apps-v1 manifest are generated, so they were taken
  from upstream and regenerated (39 bindings, 48 publishable packages,
  0 parity pins, 19 eval tasks).

packages/cmdk is byte-identical to its pre-merge state; upstream's
compiler changes do not perturb it. Verified: 32/32 cmdk and cmdk-ssr
tests including both differential parity checks against [email protected],
tsrx-tsc and tsgo clean, prettier clean, and all five freshness gates
current.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

This branch was previously deployed

2 inactive deployments
Preview – octane-website — 412b9bf0 Deployed Jul 21, 2026 by vercel[bot]
Preview – octane-website-mcp — 412b9bf0 Deployed Jul 21, 2026 by vercel[bot]
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