Skip to content

fix(native-chat): import Claude auth env vars from their moved module - #41312

Merged
AmoabaKelvin merged 1 commit into
mainfrom
fix-usage-limit-env-import
Nov 12, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
fix-usage-limit-env-import

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Main doesn't build. A file imports a module from a path it moved away from. This points the import at the module's current location.

Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 0

What Changed

usage-limit-account-usage.ts (added in #40412) imported CLAUDE_AUTH_ENV_VARS from claude-accounts/environment. That module now lives at claude-accounts/runtime-auth/environment. The import now uses the new path; nothing else changes.

Why

Since #40412 merged (7a44471), pnpm dev and the main build fail with UNRESOLVED_IMPORT ... Could not resolve '../../../claude-accounts/environment'. #40412's own checks ran against a base that still had the old path.

Linked Issue

None. This repairs main after #40412.

Visual Proof

N/A: an import path fix with no visible change.

Testing

  • pnpm dev on main failed with the unresolved import; this fixes that line.

  • I checked every relative import in fix(native-chat): hold an automatic continue until the chat's account has usage again #40412's files against the tree on main; this was the only missing one.

  • pnpm check:changed passes, and so do the focused tests in src/main/runtime/agent-session/installation.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below (no test: an import path)

  • Every added test fails without this change and avoids the test anti-patterns

Risk

None beyond the build: it is the same export from its current module. Back out with a plain revert.

Level: Low

AI Disclosure

Review

One-line import fix; no review loop.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance. Not applicable to an import path.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

#40412 imported claude-accounts/environment, which moved to
claude-accounts/runtime-auth/environment, so main no longer builds.
@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 CLAUDE_AUTH_ENV_VARS import now comes from claude-accounts/runtime-auth/environment instead of claude-accounts/environment. No runtime logic changes are shown.

Merge Risk: Minimal · up to 6dd22

This fixes a stale import path so the main branch can build again. No remaining merge risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Claude auth env vars import is updated to the module's new location, and the title's fix(native-chat) scope matches the import repair the author describes. The tit…
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.
Description check Passed The description follows the repository template and covers the required sections. It has an ELI5, a What Changed section, a Why section with the failure mode and the commit reference, Testing steps, a…
Full details: Title check

Explanation

The title names the main change: the Claude auth env vars import is updated to the module's new location, and the title's fix(native-chat) scope matches the import repair the author describes. The title is specific and short, and it matches the one-line import change in usage-limit-account-usage.ts. The raw summary and objectives both describe this import-path change as the core of the PR.

Full details: Description check

Explanation

The description follows the repository template and covers the required sections. It has an ELI5, a What Changed section, a Why section with the failure mode and the commit reference, Testing steps, a Risk section with level and rollback, and completed checklists. Visual Proof is correctly marked N/A with a reason. The Linked Issue section says 'None' and explains that the PR repairs main after #40412. The template says outside contributors must link an issue, but this author describes a maintainer-style repair, so the missing link is a minor gap rather than a failure. The AI Disclosure section is blank, which the template allows for internal contributors.

  • 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: f19c41ad-1b5c-4e78-a80d-fa9e7f9a1f20
Commits

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

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; 4 remain after this review.

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