Skip to content

edit_prediction: Skip type definition lookup for intrinsic TSX/JSX tags#54666

Merged
probably-neb merged 1 commit intomainfrom
ts-cannot-find-name
Apr 23, 2026
Merged

edit_prediction: Skip type definition lookup for intrinsic TSX/JSX tags#54666
probably-neb merged 1 commit intomainfrom
ts-cannot-find-name

Conversation

@gaauwe
Copy link
Copy Markdown
Contributor

@gaauwe gaauwe commented Apr 23, 2026

Skip intrinsic TSX/JSX tag names when gathering identifiers for edit prediction context.

I bisected a TypeScript regression to #49748. That change caused edit prediction context to query definition / typeDefinition for lowercase JSX tags like p, which could trigger incorrect unversioned TypeScript diagnostics, such as Cannot find name 'p'.

This change filters those intrinsic tag names out while still keeping user-defined component tags like Component.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #51316

Release Notes:

  • Fixed a TypeScript issue that could show incorrect diagnostics caused by edit prediction context lookups.

Co-authored-by: Ben Kunkle <ben@zed.dev>
@gaauwe gaauwe requested a review from probably-neb April 23, 2026 14:14
@gaauwe gaauwe self-assigned this Apr 23, 2026
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 23, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Apr 23, 2026
@probably-neb probably-neb added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit f85cf72 Apr 23, 2026
41 checks passed
@probably-neb probably-neb deleted the ts-cannot-find-name branch April 23, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect LSP errors for JSX

2 participants