Repository navigation
Description
When migrating one native component, the codemod can verify its Strong output and update a retained React SSR import without reporting that the hosted component immediately enters an unsupported reverse island. Reproduced on Octane main c34035d7d1474b266127382bb0c6bebc22bb6fc6 using published Octane 0.17.0 and React/React DOM 19.2.7.
App.server.tsx
import { OctaneCompat } from 'octane/react/server';
import { Leaf } from './Leaf.tsx';
export function App() {
return <OctaneCompat component={Leaf} />;
}Leaf.tsx
/** @jsxImportSource octane */
import { ReactCompat } from 'octane/react';
import { Child } from './Child.js';
export function Leaf() {
return <ReactCompat component={Child} />;
}Child.js
import { createElement } from 'react';
export const Child = () => createElement('b', null, 'React child');Run octane-codemod Leaf.tsx --strong --dry-run --json from the fixture root with TypeScript's automatic React JSX runtime and bundler module resolution. Select only Leaf.tsx so the host stays React-owned. The report marks Leaf.tsrx as strong: true with empty notes and diagnostics. It also changes the retained host import to ./Leaf.tsrx without a finding.
Compiling the exact emitted leaf for the server and calling React DOM's renderToString(createElement(App)) in production throws:
<ReactCompat> server rendering requires an owned Octane render request. Nesting it inside React-hosted <OctaneCompat> on the server is not supported.
The same emitted leaf renders its React child under standalone Octane prerender. The runtime failure is the documented SSR nesting limit.
Expected codemod behavior is an error on the explicit server host edge when it can resolve the genuine OctaneCompat, the direct local component import, and the component's immediate return of genuine ReactCompat or ReactCompatInline. This lets the preview flag the unsupported server composition while allowing the same leaf under a standalone Octane request or a client-only host. An already-authored .tsrx file selected by itself has no migration result, so the diagnostic belongs on the known server edge.
Related #2497 covered React Intl callback context and resource placement. This fixture uses a plain React child and reaches the explicit request-ownership check.
Codex task · Host com-79386
Activity