Merge upstream/main (eec9288a) into fork/consolidated

Merged
BO
3d ago
+1346-41

fork/consolidated now contains upstream main through eec9288a (three commits), so a JSX tag imported from the project renders what its module exports (#2563), a .jsx component links to the file-scope values it reads as .js and .tsx do (#2561), and a tag written in a comment or string renders no JSX child (#2564).

Conflicts. Four files conflicted, because upstream wrote its fixes against the regex-based JavaScript resolver and the fork reads the kernel's binding rows. Nothing brings the regexes back.

FileResolution
__tests__/kernel-tsjs-parity.test.tsStays deleted (the fork removed it with the WebAssembly parser). Upstream's new .jsx assertion is covered by value-reference-edges.test.ts, which merged cleanly.
codegraph-kernel/src/tsjs/mod.rsFork's version kept. #2561's change is applied in the fork's tsjs/fnref.rs: the .jsx exclusion in capture_value_ref_scope and flush_value_refs is gone; tree-sitter.ts adds jsx to VALUE_REF_LANGS.
src/resolution/frameworks/react.tsUpstream's held-binding step (const Avatar = AvatarWithHoverCard; export { Avatar } exports the held component), reading binding rows through exportsBinding(bindings, local) instead of a source-text check.
src/resolution/callback-synthesizer.tsFork's imports kept plus exportedComponent and jsxCode. Upstream's input-file list (collectInputs, JSX_INPUT_FILE, importedTagModules) is not taken: the fork re-runs synthesis in full on a sync that changes a file.

Checks, on this head. Upstream's four new or changed test files pass (jsx-child-disambiguation 39, react-router-lazy-barrel 10, sync-jsx-import-forwarding 5, value-reference-edges 30). Full suite 725 files / 9,115 tests pass (39 skipped); tsc --noEmit and check:agent-docs clean; golden dumps unchanged; kernel builds. Precision gate (eval:precision): vite absent 6/6 and present 2/2 held, vitest absent 1/1 held.

Upstream sync failure not inherited. Upstream since d0bb9be5 fails codegraph sync with "FOREIGN KEY constraint failed" when a changed file declares a lazy value that loads a workspace package (dynamic(() => import('icons').then(...))), because it records the package directory as a synthesis input. This branch syncs the same small project (a pnpm workspace plus one such file) with exit 0, since the fork does not take collectInputs.

README. The "About this fork" merge point now names eec9288a. Rows checked and left as they were: React Router, getHref, framework mode, Solid, inferred links kept current on sync, fork-vs-upstream benchmark (refresh is a separate change).

Fixtures edited. In __tests__/jsx-child-disambiguation.test.ts a backtick case writes Press `Ctrl` + <Kbd> where upstream writes and <Kbd>, for the same reason as the earlier Sign in: <LoginPage /> edit: the fork's tag detector (opensTag) reads a word before < as a comparison. Assertions are unchanged; the it.fails for upstream's 'Sign in ' case stays.

Not covered. Sync cost with the new "redraw when only the file that passes the component on changes" behavior was not measured. scripts/changelog-reconcile.mjs would also add six older upstream changelog entries the fork lacks; only the three entries from these commits were added. Land as a merge commit so eec9288a stays a parent.


Summary by cubic

Merges upstream main through eec9288a into fork/consolidated: a JSX tag imported from the project now renders what its module exports, .jsx components link to the file-scope values they read, and a tag written in a comment or string renders no JSX child.

Four files conflicted; the fork keeps its kernel-binding-rows approach. Upstream's collectInputs synthesis input list is not taken, so the upstream FOREIGN KEY constraint failed sync failure is not inherited. __tests__/kernel-tsjs-parity.test.ts stays deleted (its .jsx case is covered by value-reference-edges.test.ts), and one fixture writes + <Kbd> where upstream writes and <Kbd> because opensTag reads a word before < as a comparison.

The value-reference design docs list jsx among the supported languages, keep the original rollout list, note that jsx was added in 2026-10, and drop the parity-test note. All 9,115 tests pass, tsc --noEmit and docs checks are clean, and the precision gate holds with and without vite.

Merge choices.

  • exportedComponent reads the kernel's binding rows; upstream's held-binding step (const Avatar = AvatarWithHoverCard; export { Avatar }) is ported on top of them and now also resolves a wrapper's bodyless component node (memo(Blurhash)).
  • The .jsx value-reference change is made in the fork's Rust walker (tsjs/fnref.rs): the jsx exclusions in capture_value_ref_scope and flush_value_refs are dropped, and VALUE_REF_LANGS in tree-sitter.ts gains jsx.
  • importedTagModules, JSX_INPUT_FILE and the collectInputs addition are not taken; the fork re-runs synthesis in full on a sync, which makes sync-jsx-import-forwarding.test.ts pass.
  • CHANGELOG.md takes only the three entries these upstream commits add, and README.md names eec9288a as the merge point.

Summary by CodeRabbit

  • New Features
    • Impact analysis now includes top-level constants and variables in .jsx files, with value-reference tracking also available for JSX and Pascal.
    • React component links now follow project exports through barrels, aliases, and wrappers. Sync and file watching refresh links when forwarding files change.
  • Bug Fixes
    • JSX tags found only in comments, strings, templates, or non-JSX TypeScript files no longer appear as renders; real JSX tags remain recognized.