fix(update): npx 起動時に GUI アップデートが誤動作するのを防ぐ (#1394)#1396
Merged
Conversation
npx で起動したサーバは isGlobalInstall() が true を返す(Issue #1195 の 意図的挙動)ため、GUI の update-check / update route が npx を global と 誤認していた。結果「今すぐアップデート」ボタンが表示され、押下すると 202 started を返すが実体は no-op(spawn した commandmate update が #1319 の npx ゲートで即終了)で、バナーは 5 分 timeout に陥っていた。CLI (#1319) の ガードが GUI 経路に未反映だった。 - GET /api/app/update-check: isNpxExecution() を isGlobalInstall() より先に 判定し installType: 'npx' を新設。updateCommand は 'global' ゲート済みで npx では null を維持。 - POST /api/app/update: lock/spawn 前に npx ゲートを追加し 400 code:'npx' で 拒否。検知失敗時は fail-safe で既存 not_global ゲートにフォールバック。 - UpdateNotificationBanner: installType 'npx' で更新ボタンを出さず、正しい コマンド `npx commandmate@latest` の案内ブロックを表示。 - i18n: update.npxTitle / update.npxDescription を locales/{en,ja} に追加。 - InstallType union を 'global' | 'local' | 'npx' | 'unknown' に拡張 (route / api-client / banner props)。 npx でのその場更新の実装は本 Issue のスコープ外(#1395 で別途対応)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqhdEu33W6t3ing8ksA6J3
This was referenced Jul 18, 2026
Merged
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.
概要
npx commandmateで起動したサーバの GUI アップデート機能が npx を「グローバルインストール」と誤認し、「今すぐアップデート」ボタンが202 startedを返すのに実体は no-op → 5 分 timeout に陥る不具合を修正します。CLI (#1319) にあった npx ガードが GUI 経路(update-check / update route)に未反映でした。Closes #1394
変更内容
isNpxExecution()をisGlobalInstall()より先に判定しinstallType: 'npx'を新設。updateCommandは=== 'global'ゲート済みで npx では null 維持。400 code:'npx'で拒否。検知失敗時は fail-safe で既存not_globalゲートにフォールバック。installType: 'npx'で更新ボタンを出さず、正しいコマンドnpx commandmate@latestの案内ブロックを表示。update.npxTitle/update.npxDescriptionをlocales/{en,ja}に追加。InstallTypeunion を'global' | 'local' | 'npx' | 'unknown'に拡張(route / api-client / banner props)。受け入れ条件
POST /api/app/updateが npx 実行時に spawn せず400 code:'npx'を返すcommandmate updateではなくnpx commandmate@latest)検証
npx tsc --noEmit: exit 0npm run lint: 0 errorsスコープ外
npx 起動サーバの「その場更新」実装は本 PR のスコープ外。別 Issue #1395 (feature) で対応します。
🤖 Generated with Claude Code
https://claude.ai/code/session_01AqhdEu33W6t3ing8ksA6J3