Skip to content

Open doors for method calls on receivers typed as repository classes - #37

Merged
valuecodes merged 3 commits into
mainfrom
feat/typed-receiver-calls
Oct 12, 2026
Merged

valuecodes merged 3 commits into
mainfrom
feat/typed-receiver-calls

Conversation

@valuecodes

Copy link
Copy Markdown
Owner

What

  • Calls like runner.run() showed as closed doors even when runner is clearly one of the repository's own classes, so class-heavy code read as "the tool doesn't understand my code". The parser now types receivers syntactically: const x = new X(), annotations x: X / X<T> / X | null, constructor parameter properties, class fields (this.x.m(), this.#x.m()), and classes imported as values or with import type, including through barrels and type-only re-exports.
  • It still never guesses. Overrides in subclasses (in the same file or other files) make the call ambiguous, listing every candidate. Members inherited across files are followed. A class inferred only from new is dropped once the module writes that name or field. Interfaces, unions, arrays and untyped receivers keep today's result.
  • Measured on local repos, resolved calls rose 71 % on cli-agent-sandbox, 8 % on react-3d and 6 % on jev-on-air, with no growth in ambiguous calls.
  • Type-only imports stay off ModuleNode.imports, so module links (area connections) are unchanged. ImportVia gains an optional instance flag. The bundled service example now reaches UserService.load from main, so its class lobby is gone; the lobby HUD test moved to the repo example's Session lobby.

How to test

pnpm typecheck
pnpm lint
pnpm knip
pnpm test
pnpm build
pnpm --filter web dev   # open ?code=service: main has a door to UserService.load

Security review

No security-impacting changes.

🤖 Generated with Claude Code

valuecodes and others added 2 commits October 12, 2026 16:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 12, 2026 18:45

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T18:48:59.009846Z 27f0207 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27f0207e8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/parser/src/resolve.ts Outdated
Comment thread packages/parser/src/resolve.ts Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@valuecodes
valuecodes merged commit 2bfd50c into main Oct 12, 2026
10 checks passed
@valuecodes
valuecodes deleted the feat/typed-receiver-calls branch October 12, 2026 18:58
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.

2 participants