Fix claude availability detection; remember combo role app picks - #45
Merged
Merged
Conversation
…bo role app picks - which(): a path-form command (configured claudeBin) must exist and be executable; a stale pin at a removed CLI no longer reads found: true, so the launch-modal grey-out, Usage auto-hide, and server-side launch refusal all work again - combo role app picks (workerA/workerB/orchestrator) are remembered in localStorage (ccserver-combo-apps) and restored on the next combo launch, with the availableApps correction written through - tests: deterministic path-form claudeBin missing test (server), combo pick persistence across reload (e2e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ホストから claude CLI を削除した後も、起動モーダルで Claude Code が選択可能なまま表示され、Usage ボタンが自動非表示にならない不具合と、コンボ起動のロール別アプリ選択が記憶されない不具合を修正します。
変更内容
1. claude 不在の検出を正しくする (
server/ws/sandbox.js)which()が/を含むパス形コマンドを存在チェックなしでそのまま返していたのを修正。statSync+ 実行可能ビットで実在を確認し、なければ null を返す。claudeBin(例: 削除済み/usr/bin/claudeへのピン) がfound: trueを生んでいた経路が断たれ、
installedApps().claudeが正しくfalseになる。サーバー側拒否、
/usageキャプチャの fail-fast) がそのまま正しく働くようになる。sandbox-resolve.test.jsに「存在しないパス形 claudeBin は found: false」のテストを追加。(本ホストで従来失敗していた
sandbox-resolve.test.js:64も green に戻る)2. コンボ起動のロール別アプリ選択を localStorage に記憶 (
client/src/components/DirectoryBrowser.jsx)ccserver-combo-apps({ workerA, workerB, orchestrator })。chooseComboApp(role, app)で選択変更時に保存。ccserver-app-defaultとは独立 (README の「コンボには defaultApp 非適用」と整合)。3. ドキュメント・e2e
defaultAppの説明を実態 (ワーカーB の初期値は opencode) と整合するよう修正。
tests/launch-modal.spec.js: 全ロールを opencode に変えてモーダルを閉じ、reload 後も選択が保持される e2e を追加。
検証
npm test: 343 pass / 0 fail (修正前は sandbox-resolve.test.js:64 が 1 件失敗)npm run build --workspace=client: greennpm run test:e2e: 本変更に関連する spec (launch-modal 3 件含む) は全て green。opencode TUI を実際に操作する 4 件 (mobile-scroll / sandbox-resume / scroll-buttons) は
master でも失敗する既存の環境依存問題で、本変更とは無関係。
installedApps()が{ claude: false, opencode: true, copilot: true }を返すことを確認。