Usage ボタンを設定で非表示にできるようにし、未インストール CLI の起動を防止 - #44
Merged
Conversation
- sandbox.config.json showUsage (default true) disables the top-bar Usage button; it is also hidden automatically when claude is not installed. - resolveApp returns a found flag; installedApps() exposes per-app install state via GET /dirs/home (availableApps) so the launch modal greys out uninstalled CLIs and corrects a stale default app. - createSession refuses uninstalled agents with a clear error instead of opaque execvp/ENOENT; /usage capture fails fast when claude is missing.
…fault app - chooseApp now refuses uninstalled apps (like chooseSandbox's forceSandbox guard), so the disabled row can no longer move the checkmark / launch button label to an app that cannot start. - The default-app availability correction evaluated a stale appDefault: the server's defaultApp seeding runs in the same effect tick, so a server default pointing at an uninstalled CLI was never corrected.
…t combo role defaults for missing CLIs - App.jsx: !availableApps?.claude hid the Usage button whenever the /dirs/home fetch was pending/failed or the key was absent (older server), contradicting the 'absent keys keep the button shown' intent. Auto-hide now only when the server actually reports claude missing. - DirectoryBrowser: combo roles (workerA/workerB/orchestrator) kept a default pointing at an uninstalled CLI as selected-active, so コンボ起動 advertised and fired a launch the server refuses. Correct them to the first available combo app (claude/opencode only) when availableApps arrives, mirroring the single-launch default correction.
…sionManager/usage capture)
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.
概要
2 つの要件を実装:
sandbox.config.jsonのshowUsage: false(既定true) でタブバー右端の Usage ボタン (Claude Code/usage) を非表示にできる。加えて claude がサーバーにインストールされていない環境では設定に関わらず自動的に非表示になる (/api/usageが恒久的に失敗するため)。resolveApp) にfoundフラグを追加し、installedApps()を新設。GET /dirs/homeのavailableAppsとして公開し、起動モーダル (シングル・コンボ両方) で未インストールの CLI をグレーアウト + 既定アプリの自動補正。createSessionは未インストールのアプリ指定を明示エラーで拒否し、従来の execvp/ENOENT 失敗を全起動経路 (WS・予約プロンプト・オーケストレーター再起動) で根絶。変更内容
server/ws/sandbox.jsloadSandboxConfigにshowUsage/resolveAppにfound/installedApps()新設server/routes/dirs.js/dirs/homeにshowUsage・availableAppsを追加 (後方互換)server/ws/sessionManager.jsserver/usage.jsclient/src/App.jsx/dirs/homeを取得しusageHiddenにshowUsage・claude 不在を反映client/src/components/DirectoryBrowser.jsxserver/sandbox.config.example.json/README.mdテスト
npm test(server): 344 pass / 1 skip (インストール状況依存)npm run build --workspace=client: 成功レビュー経緯