Skip to content

feat(syntax-highlighter): add exact Octane binding - #546

Closed
jonkwheeler wants to merge 42 commits into
octanejs:mainfrom
jonkwheeler:jon/react-syntax-highlighter-binding
Closed

jonkwheeler wants to merge 42 commits into
octanejs:mainfrom
jonkwheeler:jon/react-syntax-highlighter-binding

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Published as @octanejs/syntax-highlighter (packages/syntax-highlighter).

Octane applications can now migrate from [email protected] package-for-package, including all eight component variants, registration and renderer APIs, and the complete published language/style/build deep-import surface, without carrying React in the runtime graph.

The binding retains the upstream highlighting engines and generated data while replacing only React-owned rendering and asynchronous lifecycle seams. Its fail-closed parity contract pins the npm artifact and source commit, executes all 19 upstream suites and 51 test identities, and rejects stale, missing, extra, renamed, or colliding generated evidence.

The public surface contains 658 paths per ESM/CJS family and 2,634 exports. Paired React/Octane evidence covers runtime output, types, SSR, hydration adoption, async races and retry behavior, custom renderers, and real Chromium/Firefox layout and selection behavior.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests:
    • package fail-closed surface, adapted-suite, entrypoint, upstream, and parity-audit checks
    • 19 adapted suites / 51 upstream identities, plus async-race and mutation-negative-control suites
    • paired pristine/adapted public type programs
    • all eight required parity lanes: pristine, adapted, conformance, SSR, differential, browser, pristine types, and adapted types
    • Chromium and Firefox React-vs-Octane browser oracle
    • live playground render and Source/Result interaction with no console warnings or errors
    • CI=true pnpm packages:pack:check — 70 tarballs and 580 raw TSRX consumers; external client/server builds and executed SSR passed without React
    • targeted Prettier check and git diff --check

Risk / follow-ups

  • TSRX consumers pass source through children={source} because nested component children compile to an opaque renderer block rather than inspectable source text.
  • Native tags and Octane function components are supported for PreTag / CodeTag; React class components require a function adapter.
  • Published dist/cjs/* specifiers are preserved as package paths, while module-format execution claims remain limited to the executable import/require evidence recorded by the parity and packed-consumer gates.

Provenance

  • An agent produced this diff (agent-authored)

Compound Engineering


Note

Medium Risk
Large new public surface (thousands of exports) with SSR, hydration, and async race behavior; risk is mitigated by fail-closed parity lanes and packed-consumer checks, but regressions would affect migration paths from the React package.

Overview
Introduces @octanejs/syntax-highlighter (0.1.0) as a drop-in Octane port of [email protected], including default/Light/Prism sync and async variants, registration APIs, custom renderers/tags, and 2,634 generated deep-import paths (languages, styles, ESM/CJS aliases).

The binding keeps upstream highlighting data and replaces only React rendering and async lifecycle. Documented Octane deltas: children={source} in .tsrx for inspectable code text, and PreTag/CodeTag limited to native tags or function components (no React class components without an adapter). Sync paths SSR without DOM globals; async variants use a deterministic fallback then hydrate by adopting existing markup.

Repo wiring adds a patch changeset, generated binding/inventory docs (61 bindings), CLI catalog + react-syntax-highlighter → @octanejs/syntax-highlighter mapping, MCP bridge rewrite, an implementation plan, and lockfile hash bumps in shared parity audit metadata where the workspace lockfile changed.

Reviewed by Cursor Bugbot for commit 4196abc. 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 Ready Ready Preview Aug 3, 2026 5:11pm
octane-website-mcp Ready Ready Preview Aug 3, 2026 5:11pm

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 17:10 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 17:11 Inactive
@jonkwheeler
jonkwheeler marked this pull request as ready for review August 7, 2026 18:24
jonkwheeler and others added 4 commits August 7, 2026 15:26
Resolve inventory, eval manifest, hook-form parity lockfile, and root
package scripts while keeping react-syntax-highlighter coverage.

Co-authored-by: Cursor <[email protected]>
Regenerate lockfile hashes and inventory for react-syntax-highlighter.

Co-authored-by: Cursor <[email protected]>
Resolve inventory, eval manifest, hook-form parity lockfile, and root
package scripts while keeping react-syntax-highlighter coverage.

Co-authored-by: Cursor <[email protected]>
Regenerate lockfile hashes and inventory for react-syntax-highlighter.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler
jonkwheeler marked this pull request as draft August 7, 2026 19:49
domgan-oai and others added 4 commits August 7, 2026 23:00
* perf: skip unchanged conditional keyed rows

* fix: exclude Activity boundaries from keyed row memoization
Resolve inventory and root scripts while keeping react-syntax-highlighter coverage.
@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

REVIEW WITHDRAWN

Withdrawing ready signal pending package rename per maintainer feedback: drop redundant react from @octanejs/* package/folder names (e.g. @octanejs/react-popper → @octanejs/popper). Will re-signal after the rename lands on this branch.

jonkwheeler and others added 2 commits August 10, 2026 12:36
…hter

Drop the redundant react segment from the Octane package id and folder under
the @octanejs namespace; keep upstream react-syntax-highlighter dependency names.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler jonkwheeler changed the title feat(react-syntax-highlighter): add exact Octane binding feat(syntax-highlighter): add exact Octane binding Aug 10, 2026

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

Point adapted/differential/browser parity lanes at the renamed
syntax-highlighter* Vitest projects so fail-closed inventory generation
and harness list --project lookups resolve.

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

Copy link
Copy Markdown
Contributor Author

Renamed @octanejs/react-syntax-highlighter → @octanejs/syntax-highlighter (packages/syntax-highlighter), merged/updated onto current main, and cleared the Bugbot Vitest project-name finding.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Restoring currency after main moved (mergeStateStatus DIRTY). Will re-signal when CLEAN + Bugbot clear.

Resolve evals manifest conflict via pnpm sync after main moved.

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

Copy link
Copy Markdown
Contributor Author

Currency pass complete: merged latest origin/main (no rebase). Resolved evals manifest conflict via pnpm sync. Merge is CLEAN; Cursor Bugbot succeeded on head 984d5ab with no unresolved findings.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Restoring currency after main moved again (Version Packages #682). Will re-signal when CLEAN + Bugbot clear.

Absorb Version Packages (octanejs#682) and resolve generated inventory/evals
conflicts via pnpm sync.

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

Copy link
Copy Markdown
Contributor Author

Currency pass complete: merged latest origin/main (Version Packages #682, no rebase). Resolved generated conflicts via pnpm sync. Merge is CLEAN; Cursor Bugbot succeeded on head 4196abc with no unresolved findings.

READY FOR REVIEW

@leonidaz

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! This pull request was incorporated into main as commit a4c02065ee01 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 READY FOR REVIEW REVIEW COMPLETE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants