Skip to content

fix(resolution): retain JSX render links after child text - #509

Merged
bompus merged 1 commit into
fork/consolidatedfrom
fix/jsx-text-render-edges
Oct 15, 2026
Merged

bompus merged 1 commit into
fork/consolidatedfrom
fix/jsx-text-render-edges

Conversation

@bompus

@bompus bompus commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

JSX child components now keep their render links when plain text or a newline comes before the tag, such as <p>Sign in <Link /></p>.

The existing JSX lexer blanks child text while preserving offsets and line breaks. The tag classifier therefore no longer mistakes the preceding word for a type name. Type arguments, comments and quoted examples retain their existing false-positive controls.

The known-failure case becomes passing text/newline regressions, and the backtick fixture uses its natural Press `Ctrl` and <Kbd> text again. README, the framework guide, coverage notes and changelog describe the corrected behavior.

Validation: both new cases failed on the pre-fix source. The focused JSX, React Router import and kernel-golden suites passed 57/57; golden dumps unchanged. Svelte precision retained its known-absent edge (1/1). Test floor, agent-doc and whitespace guards passed. Full Node 24 suite passed: 726/726 files, 9,120 passed and 39 skipped. TypeScript/assets/viewer build and kernel-rule guard passed.

README “About this fork” rows checked: parsing/languages behavior updated; no language inventory or historical timing number changed. Related earlier JSX work: #501 and #504; this fixes the remaining plain-text child-tag case.


Summary by cubic

JSX child components now keep their render links when plain text or a newline precedes the tag, such as <p>Sign in <Link /></p>. Previously the word before the tag was misread as a type name or comparison, so the render link was dropped.

The JSX lexer now blanks child text while preserving offsets and line breaks, so the tag classifier recognizes the tag correctly. Type arguments, comments, and quoted examples keep their existing false-positive controls, and the previous known-failure test now passes with the natural backtick text.

Written for commit c78b1b0. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Bug Fixes
    • JSX child components now retain render links when preceded by plain text, spaces, or line breaks.
    • JSX text, type arguments, comments, and quoted examples do not create unintended render links.
  • Documentation
    • Updated the guides and coverage notes to describe JSX child render-link behavior.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aac54ea9-e7d6-4c7f-8e64-9a5a571652bd
📥 Commits

Reviewing files that changed from the base of the PR and between 4c5b8b8 and c78b1b0.

📒 Files selected for processing: 6
  • CHANGELOG.md
  • README.md
  • __tests__/jsx-child-disambiguation.test.ts
  • docs/design/framework-coverage.md
  • site/src/content/docs/guides/framework-routes.md
  • src/resolution/jsx-code.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The change replaces a known-failing JSX child-disambiguation test with cases for a space and newline before a child tag. It updates source comments and documentation to describe JSX text handling and render-link behavior.

Changes: JSX child render links

Layer / File(s) Summary
Disambiguation and coverage
src/resolution/jsx-code.ts, __tests__/jsx-child-disambiguation.test.ts, CHANGELOG.md, README.md, docs/design/framework-coverage.md, site/src/content/docs/guides/framework-routes.md
Source comments describe blanking JSX text while preserving source positions. Tests cover a space and newline before a child tag, and update a JSX fixture. Documentation describes child render-link behavior and exclusions.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c78b1

The change directly tests the documented child-render behavior and preserves the existing false-positive controls. No material merge-blocking risk remains.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: retaining JSX render links after child text.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Suppressions Explained Passed The pull request adds no lint, type-check, compiler-suppression, or ignore directives. The changed lines contain documentation, test cases, and JSX lexer comments only.
User-Visible Changes Documented Passed The diff does not add, remove, or rename a CLI command/flag, MCP tool/argument, supported language/framework, agent target, or config key. It changes JSX resolution behavior and related tests/comments…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 LanguageTool
CHANGELOG.md

LanguageTool checks are incomplete because the per-file request limit of 5 was reached. Remaining text was skipped; findings from completed checks are retained.

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 6 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@bompus
bompus merged commit d763ee0 into fork/consolidated Oct 15, 2026
2 checks passed
@bompus
bompus deleted the fix/jsx-text-render-edges branch October 15, 2026 22:17
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