Repository navigation
feat: add phase-aware HUD controls (#770) - #782
Conversation
Expose preparation and debrief HUD actions through LoopPhase-aware buttons, add load/save/claim feedback, and cover the action matrix with DOM tests.
Preview URLPreview removed (PR #782 closed). |
TEST_VERDICT:
result: FAIL
mergeable: MERGEABLE
merge_state_status: CLEAN
branch_behind_main: false
baseline_only: false
verification_commands_pass: 12
verification_commands_fail: 1
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: 'rg -n "Start sortie|Claim reward|Next sortie|Quick Load" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:53-57'
- ac: AC2
command: 'rg -n "Preparation|Sortie running|Debrief: reward pending|Debrief: reward claimed" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:116-125'
- ac: AC3
command: 'rg -n ''preparation.*Start sortie.*Quick Save.*Quick Load|debrief_pending_reward.*Claim reward|debrief_reward_claimed.*Next sortie'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:140-152'
- ac: AC4
command: 'rg -n ''running.*button\\.disabled|button\\.disabled.*running|toBeDisabled'' tests/hud-controller.test.ts'
exit_code: 1
status: fail
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'no matches in tests/hud-controller.test.ts for the exact AC4 regex'
- ac: AC5
command: 'rg -n ''Reset sortie.*destructive boundary|destructive boundary.*Reset sortie|preparation.*Reset sortie|Reset sortie.*preparation'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:51'
- ac: AC6
command: 'rg -n "Reward claimed for this session|Persistence will be handled|already claimed|No pending reward" src/ui/HudController.ts src/main.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:76-90; tests/hud-controller.test.ts:166-176'
- ac: AC7
command: 'rg -n ''Quick Save failed|Quick Load failed|state unchanged|current state unchanged'' src/main.ts src/ui/HudController.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:90,93,113,126,133,139'
- ac: AC8
command: 'rg -n ''toHaveBeenCalledTimes\\(0\\)|not\\.toHaveBeenCalled|click\\(\\)'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:183-195'
- ac: AC9
command: 'pnpm test -- tests/hud-controller.test.ts tests/sortie-system.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC10
command: 'pnpm typecheck'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'TypeScript: No errors found'
- ac: AC11
command: 'pnpm lint'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'eslint . completed successfully'
- ac: AC12
command: 'pnpm test'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC13
command: 'pnpm build'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'vite build succeeded'検証結果レポート
総合判定
FAIL 詳細
|
検証結果レポート
総合判定
|
TEST_VERDICT:
result: PARTIAL
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 13
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: 'rg -n "Start sortie|Claim reward|Next sortie|Quick Load" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:53-57'
- ac: AC2
command: 'rg -n "Preparation|Sortie running|Debrief: reward pending|Debrief: reward claimed" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:116-125'
- ac: AC3
command: 'rg -n ''preparation.*Start sortie.*Quick Save.*Quick Load|debrief_pending_reward.*Claim reward|debrief_reward_claimed.*Next sortie'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:140-152'
- ac: AC4
command: 'rg -n ''running.*button\\.disabled|button\\.disabled.*running|toBeDisabled'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:128'
- ac: AC5
command: 'rg -n ''Reset sortie.*destructive boundary|destructive boundary.*Reset sortie|preparation.*Reset sortie|Reset sortie.*preparation'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:51'
- ac: AC6
command: 'rg -n "Reward claimed for this session|Persistence will be handled|already claimed|No pending reward" src/ui/HudController.ts src/main.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:76-90; tests/hud-controller.test.ts:166-176'
- ac: AC7
command: 'rg -n ''Quick Save failed|Quick Load failed|state unchanged|current state unchanged'' src/main.ts src/ui/HudController.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:90,93,113,126,133,139'
- ac: AC8
command: 'rg -n ''toHaveBeenCalledTimes\\(0\\)|not\\.toHaveBeenCalled|click\\(\\)'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:183-195'
- ac: AC9
command: 'pnpm test -- tests/hud-controller.test.ts tests/sortie-system.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC10
command: 'pnpm typecheck'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'TypeScript: No errors found'
- ac: AC11
command: 'pnpm lint'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'eslint . completed successfully'
- ac: AC12
command: 'pnpm test'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC13
command: 'pnpm build'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'vite build succeeded'検証結果レポート
総合判定
|
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: CLEAN
branch_behind_main: false
baseline_only: false
verification_commands_pass: 13
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results:
- ac: AC1
command: 'rg -n "Start sortie|Claim reward|Next sortie|Quick Load" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:53-57'
- ac: AC2
command: 'rg -n "Preparation|Sortie running|Debrief: reward pending|Debrief: reward claimed" src/ui/HudController.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/ui/HudController.ts:116-125'
- ac: AC3
command: 'rg -n ''preparation.*Start sortie.*Quick Save.*Quick Load|debrief_pending_reward.*Claim reward|debrief_reward_claimed.*Next sortie'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:140-152'
- ac: AC4
command: 'rg -n ''running.*button\\.disabled|button\\.disabled.*running|toBeDisabled'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:128'
- ac: AC5
command: 'rg -n ''Reset sortie.*destructive boundary|destructive boundary.*Reset sortie|preparation.*Reset sortie|Reset sortie.*preparation'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:51'
- ac: AC6
command: 'rg -n "Reward claimed for this session|Persistence will be handled|already claimed|No pending reward" src/ui/HudController.ts src/main.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:76-90; tests/hud-controller.test.ts:166-176'
- ac: AC7
command: 'rg -n ''Quick Save failed|Quick Load failed|state unchanged|current state unchanged'' src/main.ts src/ui/HudController.ts tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'src/main.ts:90,93,113,126,133,139'
- ac: AC8
command: 'rg -n ''toHaveBeenCalledTimes\\(0\\)|not\\.toHaveBeenCalled|click\\(\\)'' tests/hud-controller.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'tests/hud-controller.test.ts:183-195'
- ac: AC9
command: 'pnpm test -- tests/hud-controller.test.ts tests/sortie-system.test.ts'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC10
command: 'pnpm typecheck'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'TypeScript: No errors found'
- ac: AC11
command: 'pnpm lint'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'eslint . completed successfully'
- ac: AC12
command: 'pnpm test'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: '21 files passed; 476 tests passed'
- ac: AC13
command: 'pnpm build'
exit_code: 0
status: pass
fallback_detected: false
artifact_present: not_required
human_review_required: false
stop_condition_triggered: false
notes: 'vite build succeeded'検証結果レポート
総合判定
|
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=CLEAN
Evidence Check
- AC coverage: ○。issue #770 contract snapshot の Outcome / AC1-AC13 に対し、PR 本文の Summary/Checks と latest TEST_VERDICT_MACHINE(13/13 PASS)が整合しています。
- Allowed Paths: 遵守。変更ファイルは
src/main.ts/src/ui/HudController.ts/tests/hud-controller.test.tsの 3 件のみで、issue comment snapshot の Allowed Paths 内です。 - CI Verification: ○。
gh pr checksは Passed 10 / Failed 0 で、pending / failed はありません。 - 検証コマンド結果: latest TEST_VERDICT_MACHINE comment(2026-06-09T22:17:52Z)が AC1-AC13 をすべて PASS、
verification_skipped_count: 0、fallback / human review required なしを記録しています。
Blockers
- なし
Non-blockers
- なし
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: d6d77532e758396c4c6efbd8f7775078e5eedb6a
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
allowed_paths_gate:
status: ok
produced_at: '2026-06-09T22:21:33Z'
produced_by: allowed_paths_review_gate.py
producer_role: review_subagent
worker_report_used_as_canonical: false
pr_number: 782
base_ref: main
base_sha: 98d76ad2d589a3f1fe689cdc66b5dce9ea7f9756
head_sha: d6d77532e758396c4c6efbd8f7775078e5eedb6a
changed_files_source: git_diff_base_head
allowed_paths_source: linked_issue_contract_snapshot
changed_files_count: 3
changed_files:
- src/main.ts
- src/ui/HudController.ts
- tests/hud-controller.test.ts
allowed_paths_list:
- src/main.ts
- src/ui/HudController.ts
- tests/hud-controller.test.ts
- tests/main-loop.test.ts
- tests/sortie-system.test.ts
violations: []
contract_fingerprint:
issue_number: 770
contract_source_kind: issue_comment
contract_source_id: '4662116792'
contract_body_sha256: 907fc71a377e19857f2edde2dec85db9b53ced8aade458eaf8656b98494e36cc
allowed_paths_normalized_sha256: e575f13b8317fd0859d8893e781b5bbad2f18db050637a15800a4eb997f75848
base_ref: main
base_sha_at_snapshot: 98d76ad2d589a3f1fe689cdc66b5dce9ea7f9756
execution_context:
worktree_root: /home/squne/projects/LOOP_PROTOCOL
generated_at: '2026-06-09T22:21:33Z'
tool_version: 1.1.0
reason: All changed files are within allowed paths
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []|
開始前。かなり縮小しないと全UIが画面に収まらない。 Claim rewardというボタンが追加されたが、何のため?MVPのため、人間が手動で状態を遷移する必要がある? Next sortieで戦闘が開始し敗北できることを確認した。 STATUS HULLの減少に異常が見られた。おそらく1→0の間で表記がバグる。<のような記号がちらっと見えた。改善の余地がある。 ゲーム描写における瞬間的な状態をスクリーンショットするためにデバッグのためのポーズ機能が必要。瞬時にポーズし、再開するためUIボタンだけではなくESCなどに割り当ててショートカットキーでも動作するようにしたい。 Loop Protocol Playtest EvidenceGenerated by playtestEvidence panel (AC8)playtest_evidence_schema_version: v1 |
判定: REQUEST_CHANGESPR #782 は #770 の主要な phase-aware HUD 操作面には概ね沿っています。変更ファイルも マージ前に潰すべき問題1. #770 と #771 の canonical issue 正規化が未解決#770 自体が、近接する #771 について「実装着手前に canonical issue を 1 本へ正規化する必要がある」と明記しています。#771 側にも「1 Issue = 1 PR」「duplicate 判定ではなく narrow follow-up materialization」と書かれており、単に #770 を close しても #771 が残るなら、同じ HUD action surface の二重実装・二重レビューが発生します。([GitHub]2) 修正案: PR 本文またはコメントで「#771 は #770 に統合して close / superseded 扱い」と明記し、#771 側にも close reason を残す。これをやらないなら、このPRは issue 運用契約違反寄りです。 2.
|
you askedmessage time: 2026-06-10 19:52:20 #782 Claim rewardというボタンが追加されたが、何のため?MVPのため、人間が手動で状態を遷移する必要がある? Next sortieで戦闘が開始し敗北できることを確認した。 STATUS HULLの減少に異常が見られた。おそらく1→0の間で表記がバグる。<のような記号がちらっと見えた。改善の余地がある。 ゲーム描写における瞬間的な状態をスクリーンショットするためにデバッグのためのポーズ機能が必要。瞬時にポーズし、再開するためUIボタンだけではなくESCなどに割り当ててショートカットキーでも動作するようにしたい。 Loop Protocol Playtest EvidenceGenerated by playtestEvidence panel (AC8)playtest_evidence_schema_version: v1 chatgpt responsePR本文・差分・関連情報を確認しつつ、貼ってくれたプレイテスト証跡を「ブロッカー級のPRコメント」に整理します。UI収まり、手動状態遷移、HULL表示、ポーズ機能を分けて扱います。 確認できた範囲では、 確認結果としては、これは #782 の細部修正ではなく、MVPのUI設計ゲート不足として扱うべきです。#782 は #770 の狭い契約、つまり phase-aware HUD buttons の追加としては AC1-AC13 PASS になっていますが、#770 自体が「広範な HUD redesign」は out of scope、browser runtime verification は #740 に deferred としているため、今回のプレイテストで出た「画面に収まらない」「文字で状況を説明しすぎる」「Claim reward の意味が分からない」は、契約上の穴です。(GitHub) (GitHub)
HULL の ポーズ機能は単なるデバッグ便利機能ではなく、プレイアビリティ・アクセシビリティ上も妥当です。Microsoft の Xbox Accessibility Guideline でも、シングルプレイヤー等は保存/読み込み中を除き任意時点で pause 可能であるべきとされています。(Microsoft Learn) 追加で貼るなら、次の追記コメントがよいです。 **Standard Title: ** 追加判定: UI設計ゲート不足として REQUEST_CHANGES既存の #770 契約上は phase-aware HUD controls の実装として AC を満たしている可能性が高いが、今回のプレイテストでは、契約が製品UIとして不十分であることが確認された。 ブロッカー
要求する対応このPRをこのままマージするのではなく、少なくとも以下のどちらかを実施してから継続したい。
推奨は A案。 起票するなら、最低でも3本に分けるのがよいです。
you askedmessage time: 2026-06-10 19:57:42 「敵HPラベル用の <1 表示」があることをしらなかったが内部処理ではなくプレイヤーに見せるUI要素としてそのようなUI設計はしたくない。ベストはグラフィック・視覚的な要素でHPの減少を表現すること、その次に数字を用いたとしても、整数でのみ表現したい。 chatgpt responseその認識でよいです。前回の「敵HPラベル用なら合理性がある」は取り下げたほうがいいです。 方針としては、プレイヤーに見えるHP表現では 修正後の主張はこうです。
PRコメントの該当箇所は次のように差し替えるとよいです。 ### HP表示ポリシーの問題
`STATUS HULL` の減少時に `<` のような記号が瞬間的に見えた。
これは単なる表示バグではなく、プレイヤー向けUIに内部計算値由来の表現が漏れている設計問題として扱いたい。
HP表現の方針は以下に統一したい。
- ベスト: グラフィック、ゲージ、色、損傷演出などの視覚的要素でHP減少を表現する
- 数字を使う場合: プレイヤーに見える値は整数のみ
- 禁止: `<1`、小数、比較記号、内部状態名などを通常UIに表示する
- デバッグ目的で詳細値を見る場合: Debug Panel に隔離する
敵HPラベルであっても `<1` のような表現は採用しない。
プレイヤーにとって意味があるのは「どの程度弱っているか」「倒せそうか」「危険か」であり、内部HPが 0 より大きく 1 未満であることではない。
したがって、このPRまたは後続Issueで、通常UIに表示されるHP値のフォーマットポリシーを定義してほしい。実装仕様に落とすなら、ACはこうです。 ## Acceptance Criteria
- 通常プレイ中に表示されるHP/HULL/耐久値に `<1` や小数が出ない。
- 敵・味方・プレイヤーのHP表示は、原則として視覚的なゲージまたは損傷表現を優先する。
- 数値表示を残す場合、表示値は整数のみとする。
- 内部計算値の詳細表示が必要な場合は Debug Panel に限定する。
- HPが 0 より大きく 1 未満の場合も、通常UIでは `<1` と表示しない。
- HPが 0 以下になった場合は `0`、`DESTROYED`、またはゲーム内文脈に合う状態表示にする。重要なのは、これは HULLだけのバグ修正に閉じない ことです。 |
|
CodexCLIの作業ログ |








Summary
LoopPhaseごとにStart sortie/Claim reward/Next sortie/Quick Load/Reset sortieの HUD 操作を出し分け、preparation / running / debrief の各 phase で有効化条件と feedback を固定しました。src/ui/HudController.tsとsrc/main.tsで phase-aware contract を接続し、tests/hud-controller.test.tsで phase/action matrix、disabled button no-op、claim/save/load feedback を確認しました。typecheck/lint/test/buildの通過を確認済みです。src/ui/HudController.ts、src/main.ts、tests/hud-controller.test.tsのみで、issue contract の範囲内に収まっています.Checks
pnpm typecheck- 通過。型エラーの追加がないことを確認しました。pnpm lint- 通過。HUD 操作面の追加に伴う lint 指摘がないことを確認しました。pnpm test- 通過(476 passed,21 files)。phase/action matrix、disabled button no-op、claim/save/load feedback の回帰がないことを確認しました。pnpm build- 通過。bundle 生成が継続して成功することを確認しました。Schema Change Applicability
LoopPhaseと reward-claim domain API を consumer として HUD 表示、callback wiring、UI テストを更新した変更であり、新しい machine-readable schema や producer-consumer contract のキー追加・変更はありません。Schema Consumer Inventory
not_schema_change判定のため inventory 追記は不要です。今回の変更は既存 contract の consumer 側実装とテストの更新に限定され、追加の schema consumer 棚卸し対象はありません。Safety Claim Matrix
変更対象は UI wiring と test に限られ、permission / sandbox / auth / MCP / workflow gate などの safety-sensitive 境界を変更していないことを先に確認したうえで、下表に証跡をまとめます。
src/main.ts/src/ui/HudController.ts/tests/hud-controller.test.tsのみ補足: UI wiring とテストの更新のみを含むため、権限境界や外部連携面の新規リスクはこの PR では増やしていません。
Notes