Skip to content

fix(native-chat): resolve Claude auth import after module move - #41309

Closed
gentslava wants to merge 1 commit into
stablyai:mainfrom
gentslava:fix/usage-limit-account-auth-import
Closed

gentslava wants to merge 1 commit into
stablyai:mainfrom
gentslava:fix/usage-limit-account-auth-import

Conversation

@gentslava

Copy link
Copy Markdown
Contributor

ELI5

The project stopped typechecking because automatic usage-limit recovery imported a module from its old location. This points the import at the existing module.

What Changed

Updates only CLAUDE_AUTH_ENV_VARS in usage-limit-account-usage.ts to import from claude-accounts/runtime-auth/environment.

Why

The former claude-accounts/environment path no longer exists on main; TypeScript reports TS2307 in both Node and pane-launch test projects.

Linked Issue

Fixes #41308

Visual Proof

N/A — module resolution only; no UI or interaction change.

Testing

  • pnpm tc passes on macOS after the one-line fix.
  • Changed-file oxlint and oxfmt checks pass.
  • The existing compiler check fails without this change. No redundant test added for an import path.
  • No packaged or device acceptance is claimed; CI covers the remaining platforms.

Risk

Level: Low. The same constant comes from its current module owner. No saved data, protocol, account selection, permissions or platform-specific execution changes. A plain revert restores the broken import.

AI Disclosure

Prepared and checked with OpenAI Codex assistance.

Review

Confirmed the missing former path and existing export on the stated main revision, then ran the full typecheck in a clean upstream checkout with this single change.

Agent skill upstream boundary

  • Not applicable; no skill-installer source or documentation is copied.

Notes

The module is used by the host for local and remote chats. Mobile wire compatibility is unchanged.

Checklist

  • One atomic import repair
  • Problem, mechanism, risk and rollback described
  • Visual proof N/A with reason
  • Self-reviewed and cross-platform/remote impact considered
  • Full local typecheck and changed-file lint/format pass; CI covers the remaining checks

@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The account usage module now imports CLAUDE_AUTH_ENV_VARS from the Claude runtime-auth environment module. The linked issue reports that the former path caused a TypeScript module resolution error during typechecking.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 70635

This restores the typecheck by pointing an import at the module that now owns the Claude auth environment variable list. It makes no behavior change and carries no known merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and its scope: it repairs the Claude auth import in the native chat area after a module move. The only change in the changeset is a one-line import path update in usage-limit-a…
Description check Passed The description follows the repository template and covers the key sections. It gives an ELI5 summary, a what-changed section, a why section, a linked issue (Fixes #41308), a visual proof N/A with rea…
Linked Issues check Passed Issue #41308 requires the import of CLAUDE_AUTH_ENV_VARS in usage-limit-account-usage.ts to point to ../../../claude-accounts/runtime-auth/environment. At the reviewed head, line 9 of src/main/runtime…
Out of Scope Changes check Passed The PR description, PR summary, and AI-generated raw summary all describe a single-line import change (+1/-1) in usage-limit-account-usage.ts. The head file shows the changed import as the only stated…
Full details: Title check

Explanation

The title names the fix and its scope: it repairs the Claude auth import in the native chat area after a module move. The only change in the changeset is a one-line import path update in usage-limit-account-usage.ts, which matches the title. The title does not name the file, and the scope tag "native-chat" does not clearly match the agent-session installation path touched by the diff, but the title still describes the primary change.

Full details: Description check

Explanation

The description follows the repository template and covers the key sections. It gives an ELI5 summary, a what-changed section, a why section, a linked issue (Fixes #41308), a visual proof N/A with reason, testing notes, a risk level with rollback, an AI disclosure, and a checklist. The Testing section lists checks run on macOS only and does not list Linux, Windows, or SSH verification, which the template asks for. The Review and Notes sections are present but brief. These gaps are minor, so the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #41308 requires the import of CLAUDE_AUTH_ENV_VARS in usage-limit-account-usage.ts to point to ../../../claude-accounts/runtime-auth/environment. At the reviewed head, line 9 of src/main/runtime/agent-session/installation/usage-limit-account-usage.ts imports CLAUDE_AUTH_ENV_VARS from '../../../claude-accounts/runtime-auth/environment'. That path resolves from the file location to src/main/claude-accounts/runtime-auth/environment.ts, which exists at head and exports CLAUDE_AUTH_ENV_VARS as a const array. The issue requires no behavior or visual change, and the PR description and raw summary both state that the change is only this import. The whole-PR text diff could not be read because changed blobs were missing from the checkout, so the one-line scope rests on the PR summary and the head file content. The issue's only coding requirement is met. The automated typecheck result is not independently run here; the author reports pnpm tc passes.

Full details: Out of Scope Changes check

Explanation

The PR description, PR summary, and AI-generated raw summary all describe a single-line import change (+1/-1) in usage-limit-account-usage.ts. The head file shows the changed import as the only stated modification, and it directly serves issue #41308. No other changed files are reported. The whole-PR text diff was unavailable, so this verdict depends on the supplied summaries and the head file content rather than a direct diff read; no unrelated change was identified.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 82ad1273-3478-47d4-ad9b-bbd66b8cdaaa
Commits

Reviewing files that changed from the base of the PR and between 890ad4d and 7063598.

Files selected for processing: 1

  • src/main/runtime/agent-session/installation/usage-limit-account-usage.ts

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

@gentslava

Copy link
Copy Markdown
Contributor Author

Superseded by #41312 (97e255e). The fixed file on main 0415860 is byte-identical to this one-line correction, so this PR is redundant.

@gentslava gentslava closed this Nov 12, 2026
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.

Typecheck fails: usage-limit account hold imports the removed Claude auth path

1 participant