Skip to content

fix(claude): install managed CLI directly from source card - #16

Merged
figassis merged 5 commits into
mainfrom
fix/claude-managed-install
Oct 3, 2026
Merged

figassis merged 5 commits into
mainfrom
fix/claude-managed-install

Conversation

@figassis

@figassis figassis commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

  • Add Install latest directly to Claude's Jean-managed source card, available while System PATH is selected. Reuse the existing latest-stable installer and progress events; select Jean only after successful installation.
  • Preserve explicit Claude/Codex/OpenCode source preferences. Track managed installation independently of effective fallback availability, so Settings does not display the wrong copy or hide a usable backend elsewhere.
  • Reject concurrent installations across Settings navigation and installer entry points. Refresh status even when installation succeeds but saving the source fails.

Verification

  • bun run check:all in a Docker Rust/Bun quality container.
  • Built jean:dev from the final production changes.
  • Reproduced old-image preference reset, then verified new-image persistence over the real WebSocket API.
  • Agent-browser desktop visual check and Playwright mobile 390px installation smoke test, including pending progress, success-only source switch, action removal, managed version/path, and no horizontal overflow.
  • Actual latest installation resolved Claude 2.1.287; the system Claude 2.1.186 stayed unchanged.

Test-suite repairs

Separate test-only changes fix pre-existing async status races and remove live CDN dependency from model-picker tests. Behavior assertions remain intact.

Manual smoke test

  1. Start Jean using the rebuilt image and open Settings → Claude.
  2. With System PATH selected and no managed copy, click Install latest on the managed card.
  3. Confirm progress, then Jean-managed selection with the installed version/path. Reload and confirm selection persists.
  4. At mobile width, confirm the action stacks inside its card and remains tappable.

The Dockerfile's CLI pin is intentionally unchanged. No user preferences or running user containers were changed during verification.

Summary by CodeRabbit

  • New Features

    • Added an option in Claude settings to install the latest Jean-managed CLI, with progress feedback and protection against simultaneous installations.
    • The selected CLI source changes to Jean-managed only after installation succeeds.
    • Claude’s displayed status now reflects the selected source, including when that installation is unavailable.
  • Bug Fixes

    • Automatic CLI source selection now preserves explicitly saved preferences.
    • Updated Codex model-selection expectations to GPT 5.6 Sol.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dae5f43e-1df3-4ee6-babf-a62a46d9b08f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8537b453-aa1f-416b-90fc-7e6c2e91e1dc

📥 Commits

Reviewing files that changed from the base of the PR and between 514b134 and 41847a2.

📒 Files selected for processing (16)
  • .ai/lessons.md
  • .ai/todo.md
  • docs/developer/architecture-guide.md
  • jean-core/src/claude_cli/commands.rs
  • jean-core/src/lib.rs
  • src/components/chat/toolbar/BackendModelPickerContent.test.tsx
  • src/components/chat/toolbar/DesktopBackendModelPicker.test.tsx
  • src/components/preferences/BackendCliSourceCards.tsx
  • src/components/preferences/ClaudeManagedInstallButton.test.tsx
  • src/components/preferences/ClaudeManagedInstallButton.tsx
  • src/components/preferences/panes/GeneralPane.tsx
  • src/components/preferences/panes/OpinionatedPane.test.tsx
  • src/components/preferences/panes/WebAccessPane.test.tsx
  • src/lib/claude-cli-status.test.ts
  • src/lib/claude-cli-status.ts
  • src/types/claude-cli.ts

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


Walkthrough

The changes preserve explicit CLI source selections, report whether Claude’s managed installation exists, and add a settings action to install it. They also update model-picker tests and make preferences tests wait for asynchronously rendered elements.

Changes

Managed Claude installation

Layer / File(s) Summary
Preserve explicit CLI source preferences
jean-core/src/lib.rs, docs/developer/architecture-guide.md
Automatic source selection for Claude, Codex, and OpenCode now applies only when the raw preferences omit the source field. Tests cover absent fields and explicit values.
Report managed installation status and serialize installs
src/types/claude-cli.ts, jean-core/src/claude_cli/commands.rs
Claude status includes managed_installed in native and WSL results. A nonblocking mutex rejects overlapping CLI installations.
Reconcile source status and install from settings
src/lib/claude-cli-status.ts, src/lib/claude-cli-status.test.ts, src/components/preferences/BackendCliSourceCards.tsx, src/components/preferences/ClaudeManagedInstallButton.tsx, src/components/preferences/ClaudeManagedInstallButton.test.tsx, src/components/preferences/panes/GeneralPane.tsx, docs/developer/architecture-guide.md, .ai/lessons.md, .ai/todo.md
Settings derives status for the selected Claude source and displays an install action when the managed copy is absent. The action installs first, then selects the managed source, reports errors, and invalidates related queries. The documentation and notes record the associated behavior and work.

Codex model picker tests

Layer / File(s) Summary
Use fallback catalog data and update Codex selections
src/components/chat/toolbar/BackendModelPickerContent.test.tsx, src/components/chat/toolbar/DesktopBackendModelPicker.test.tsx, .ai/lessons.md
Both test files mock the catalog hook to return undefined data and update Codex selection expectations to gpt-5.6-sol.

Asynchronous preferences tests

Layer / File(s) Summary
Wait for asynchronous preferences UI
src/components/preferences/panes/OpinionatedPane.test.tsx, src/components/preferences/panes/WebAccessPane.test.tsx
Tests wait for rendered status, controls, and token values. The load_preferences mock formatting changes without changing its behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ClaudeManagedInstallButton
  participant install_claude_cli
  participant Preferences
  User->>ClaudeManagedInstallButton: Click install
  ClaudeManagedInstallButton->>install_claude_cli: Install latest version
  install_claude_cli-->>ClaudeManagedInstallButton: Return installation result
  ClaudeManagedInstallButton->>Preferences: Set claude_cli_source to jean after success
  ClaudeManagedInstallButton-->>User: Report result and installation progress
Loading

Suggested reviewers: andrasbacsai

Merge Risk: ⚪ Minimal · up to 41847

The managed-install flow has no identified issue requiring a fix before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 13 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
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: adding direct installation of the managed Claude CLI from the source card.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 13 files. (3 skipped: 3 unsupported.)


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

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

@figassis
figassis merged commit e31c0fe into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant