Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1370"
goal_ref: "#1936 の採用結果に従い、combat HUD を左下 status・上中央 elapsed・conditional edge control に配置し safe-zone/priority/accessibility を実装する"
change_kind: mixedParent Issue
Parent Goal Ref
- Goal: Canvas world layer と DOM player-facing control を分離した battle-stage を完成する。
- Desired Destination: primary status/control は DOM HUD、Canvas は world/visual cue に限定する。
Current Validated Scope
- HULL/critical warning を左下 persistent status とし、elapsed を上中央 low-prominence にする。
- weapon recharging と Assist command を conditional とし、space不足時に先に collapse する。
- Pause を stat cluster から分離し、Esc と focusable/pointer-operable DOM affordance を残す。
- inner 16 CSS px containment、protected action zone、pointer-through と focus/keyboard を E2E/VRT で検証する。
Dependency
- Depends on: 実装: fixed logical arena の responsive battle viewport と Canvas display を分離する #1956 (closed by PR feat: fixed logical arena の responsive Canvas presentation を分離する (#1956) #1964)
Remaining Parent Gaps
- 実装: result screen と pause overlay を battle-stage 内に統合する #1376 の result/pause overlay implementation と 実装: 旧 command rail を削除し overlay UI を E2E 検証する #1377 の command rail removal は変更しない。
- FCS、4武器 UI、minimap は実装しない。
Outcome
指定した HUD placement/priority/safe-zone が DOM overlay として実装され、全主要 fragment/control が内側16 CSS pxに収まり、keyboard/pointer/focus とVRT runtime evidenceが最新headでpassする状態。375×667 を含む既知の未修正ケースが解消され、safe-margin/protected-zone の検証契約が false-green にならない状態。
本 Issue は 2026-08-02 起票時点から main が進んでおり、着手時点の main head SHA(起票時点参照: 1c4f938、PR #1998 で command rail 削除・battle-stage 単列化・keyboard-only E2E の実 Tab 化が反映済み)を基準に実装・検証すること。
In Scope
- combat HUD placement、progressive disclosure、safe-zone、priority
- safe-margin false-green assertion の内側 containment 修正(
assertWithinSafeMargin()の epsilon 方向修正を含む) - major HUD fragment/interactive control geometry、protected action zone(static hard invariant と dynamic observation の分離)、pointer-through
- keyboard/focus/pointer Pause/Assist accessibility(実 pointer click、実 Tab/Shift+Tab、Enter/Space、200%zoom)、VRT/runtime evidence
- 375×667 の HUD overflow 解消と
tests/e2e/hud-hull-overflow.spec.tsの該当test.fixme解除 - critical warning、Kills、Weapon、Assist の状態契約(threshold・表示条件・collapse順位)の確定
Out of Scope
- responsive logical arena/display implementation
- FCS、4武器 UI、minimap
- 実装: result screen と pause overlay を battle-stage 内に統合する #1376 の result/pause overlay implementation
- 実装: 旧 command rail を削除し overlay UI を E2E 検証する #1377 の command rail 削除
- blanket screenshot baseline update(
.claude/skills外の全snapshot一括更新は禁止、変更PNGは個別列挙する) - 調査: running combat HUD の配置・遮蔽・情報優先度を決定する #1936 が棄却した動的追従 HUD(runtime occupancy-aware repositioning)
- 実装: #1375 merge後 running HUD / paused HUD VRT baseline を frozen 昇格する #1391 が所有する VRT
frozen昇格
Acceptance Criteria
- AC1: HULL、critical、elapsed、Kills、Weapon、Assist、Pause について、表示条件・配置・collapse順位・copyを表形式で固定した semantic state table を実装/テストへ反映する。
- AC2: exact container thresholds と縮退順を固定し、375×667を含む全境界ケースでHULL/active warning/Pauseを維持する。
tests/e2e/hud-hull-overflow.spec.tsの375×667test.fixmeを解除する。980×720、800×720 は継続サポートし、Supported minimum viewportを375×667に確定する。 - AC3: visible opaque fragment と interactive control が Canvas 内側16 CSS px に完全包含される(透明な HUD root 自体は対象外)。
assertWithinSafeMargin()をouter拡張ではなくinnerを epsilon 込みで縮めた比較に修正する。running HUD は内部 scroll を必要としない(.battle-hud-layerのscrollHeight <= clientHeight + epsilon)。 - AC4: persistent な opaque/interactive fragment は Canvas 中央60%×60%の static protected zone と交差しない(透明な layout root は判定対象外)。動的観測領域(player/aim corridor/enemy cluster)は指定 fixture・sampling時点・epsilon・opacity条件を明記した証跡(deterministic fixture E2E または manual runtime review)で扱う。
- AC5: Assist/Pause を通常の
getByRole(...).click()で操作でき、Canvas上のcontrol外座標への実page.mouse.click()をCanvas/input側が受信し、実Tab/Shift+TabでAssist/Pauseに到達し、Enter/Spaceでactivateでき、200% zoom時もfocused controlとfocus indicatorが隠れず、pause表示中はCanvas/combat HUDがinertでResume後にfocusが正しく復帰する。 - AC6: Assist/Pauseのhit targetが24×24 CSS px以上(規定spacing例外を除く)、
tabindex > 0を使わない、DOM順序と実Tab順序が一致する、hidden/collapsed controlがTab順序に残らない、disabled controlの理由が隣接copyまたはaccessible descriptionで判別できる、critical warningが色だけに依存しない(text/shape/iconを併用し状態遷移時のみARIA通知を更新する)。current codeの意味に沿ったplayer-facing copyを使い、raw internal stateを露出しない。 - AC7: 1280x720、1366x768、1920x1080、1437x1365、375x667 の全viewportで、viewport・DPR・実Chrome tab zoom・userAgent・head SHAを証跡化したE2Eをindividual diff review付きでpassする。
- AC8: representative boundary cellsのみをVRT baseline化し、expected/actual/diffを個別確認する。pixel-diversity/negative controlを維持し、Canvas exclusionをmask全面被覆方式へ戻さない。
legacy-current/provisional candidateのみ更新し、snapshot directoryの一括更新は行わず変更PNGを列挙する。 - AC9:
tests/e2e/product-pause.spec.tsの既存 pause 回帰(Canvas/combat HUD inert化、Resumeへのfocus移動、Escapeの単発処理)を非回帰として維持し、かつ 実装: PR #1984 pause-dialog/result-surface 変更に既存 E2E テストを追従させる #1986(pause/result architecture変更への既存E2E追従)が解消済みであるか、解消前の場合は 実装: PR #1984 pause-dialog/result-surface 変更に既存 E2E テストを追従させる #1986 の既知failure fingerprintを記録し実装head と clean main を同一環境で比較して新規failureがないことを証跡化する。
Verification Commands
# AC1
$ pnpm test
# AC2
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/hud-hull-overflow.spec.ts
# AC3
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/hud-hull-overflow.spec.ts
# AC4
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/hud-hull-overflow.spec.ts
# AC5
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/assist-player-affordance.spec.ts
# AC6
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/assist-player-affordance.spec.ts
# AC7
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/hud-hull-overflow.spec.ts
# AC8
# preflight-scope: pr_review_only
$ pnpm test:vrt
# AC9
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/product-pause.spec.tspnpm test:e2e を単独実行する場合は VITE_E2E_MODE=true pnpm build を先に実行する CI 前提コマンドである。hermetic なローカル/独立VCとしては pnpm test:vrt(build込み)を用いる。pnpm typecheck/typecheck:e2e/lint/test/build は project-constitution の必須検証としてPRレビュー時に別途実行する。
Runtime Verification Applicability
decision: immediate
reason: placement、occlusion、focus、pointer-through、VRTは browser runtimeでのみ検証できる。
applicable_acs: [AC2, AC3, AC4, AC5, AC6, AC7, AC8, AC9]
execution_environment: Chromium Playwright with VITE_E2E_MODE=true production build
skip_conditions: browser runtime unavailable; record failure and do not update/freeze snapshots
fallback_policy: unit checks may prove view-model/copy only(AC1); runtime proof remains merge blocker
artifact_requirements: expected/actual/diff review, viewport, DPR, zoom, browser, run ID, artifact ID, head SHA
Allowed Paths
src/ui/combatHud.tssrc/ui/HudController.tssrc/style.csstests/hud-controller.test.tstests/player-facing-hp-policy.test.tstests/e2e/hud-hull-overflow.spec.tstests/e2e/assist-player-affordance.spec.tstests/e2e/visual-overlay.spec.tstests/e2e/visual-utils.tstests/e2e/__screenshots__/visual-overlay.spec.ts/docs/dev/visual-baseline-registry.md.github/workflows/ci.ymlplaywright.config.tsscripts/check-visual-artifact-pipeline.pytests/e2e/__screenshots__/m2-combat-mvp.spec.ts/m2-running-hud-baseline.png
tests/e2e/product-pause.spec.ts は selector contract を変更しない限り実行対象のみとし、markup再構成に伴いselectorを変更する場合に限り Allowed Paths へ追加する。
Required Design References
docs/product/features/ui-information-architecture.mddocs/dev/visual-baseline-registry.md- 調査: running combat HUD の配置・遮蔽・情報優先度を決定する #1936
- 実装: result screen と pause overlay を battle-stage 内に統合する #1376
- 実装: #1375 merge後 running HUD / paused HUD VRT baseline を frozen 昇格する #1391
Required Skills
- TypeScript / DOM UI / CSS overlay / Playwright / visual regression testing
Delivery Rule
- 1 Issue = 1 PR
- PR body は
Closes #<this issue>、Refs #1936、Refs #1370、full head SHA、current-head CI、individual VRT review を含める。 - 実装: #1375 merge後 running HUD / paused HUD VRT baseline を frozen 昇格する #1391 はこのIssue mergeまで geometry baselineをfrozenにしない。
Stop Conditions
- destructive_operation
- secret_required
- external_billing
- insufficient_permission
テンプレート互換の次の旧定型文は上記4分類へ正規化し、追加の停止条件にはしない。
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Activity
fix: bounded remediation of #1956 responsive Canvas review defects
fix: defer 375x667 combat HUD safe-margin case to Issue #1958
feat: fixed logical arena の responsive Canvas presentation を分離する (#1956…
squne121 commentedon Aug 5, 2026
判定
REQUEST_CHANGES — 現状の #1958 は implementation-ready ではありません。
方向性自体は妥当です。左下の機体状態、上中央の経過時間、DOMによる Assist/Pause、Canvasとの入力責務分離は、#1936 と UI IA に整合します。しかし現契約には、実装者が判断できない情報状態、既知の未修正ケース、false-green になる検証、現在の
mainとずれた前提が残っています。#1958 自体にはコメントがなく、実質的な決定根拠は #1936、PR #1964、PR #1998 側に分散しています。Native dependency は正しく #1956 を指しており、#1956 は PR #1964 で完了済みです。ただし #1958 本文の Dependency 欄は依然として番号未解決の定型文なので、
Depends on: #1956 (closed by #1964)へ更新すべきです。P0 — マージ阻害事項
1. PR #1964 から明示的に委譲された 375×667 が AC6 から消えている
PR #1964 は、モバイル用の
transform: scale(0.5)を不適切なスコープ横断として削除し、375×667 の HUD overflow を #1958 に委譲しています。現行テストにも、そのケースだけtest.fixmeとする明示的なコメントがあります。ところが #1958 の AC6 は 1280×720、1366×768、1920×1080、1437×1365 しか列挙していません。これは単なる追加ケースではありません。現時点で約130px下にはみ出すことが既知であり、#1958 が閉じるべき具体的な欠陥です。
必要な修正は次のとおりです。
AC6 に 375×667 を必須ケースとして追加する。
現行の 980×720、800×720 を継続サポートするか明記する。
Supported minimum viewportを確定する。UI IA でも未決事項のままです。test.fixmeを解除することを独立ACにする。縮小は
transform: scale()ではなく conditional fragment の非表示、gap/padding調整、再配置で行う。2. AC4 の Verification Command は pointer / keyboard を実際には検証していない
assist-player-affordance.spec.tsは Assist を次の方法で操作しています。button.evaluate(button.click())によるDOMメソッド直接呼び出しassistButton.focus()によるプログラム的focus注入前者はhit-testingを迂回し、後者はTab順序と到達可能性を迂回します。ファイル内コメントも、これは manual pointer hit-testing を検証していないと認めています。
Playwrightの通常の
locator.click()は、対象が可視、安定、enabledであり、実際にpointer eventを受け取れることまで検査します。直接HTMLElement.click()を呼ぶと、この重要な検査がありません。 (Playwright)さらに、直近の PR #1998 では、まさに
.focus()によるkeyboard-only検証が敵対的レビューで却下され、実際のTab/Shift+Tabに書き換えられています。#1958 が古い方式を再採用するのは明確な後退です。AC4 は少なくとも以下を分離して検証する必要があります。
Assist/Pause を通常の
getByRole(...).click()で操作できる。Canvas上のcontrol外座標を実
page.mouse.click()し、Canvas/input側が受信する。実際の
Tab/Shift+Tabで Assist/Pause に到達する。EnterとSpaceでbuttonをactivateできる。200% zoom時にもfocused controlとfocus indicatorが隠れない。
pause表示中はCanvas/combat HUDがinertとなり、Resume後にfocusが正しく復帰する。
pointer-events:noneはhit-testingから外すだけであり、sequential focus navigationから要素を除外しません。pointer-throughとkeyboard/focusは別々のテストが必要です。 (W3C)3. protected action zone が実行可能な契約になっていない
#1936 の採用決定は、次の二種類のzoneを定義しています。
Canvas中央 60%×60% の静的zone
player、aim corridor、enemy/projectile cluster の動的観測領域
同時に「動的追従HUD」は視線予測性を壊すとして棄却されています。
一方、#1958 AC3 は「HUD root、主要fragment、interactive control が protected action zone と不適切に交差しない」としか書いていません。ここには二つの問題があります。
第一に、分散配置を実装するため
.combat-hudをCanvas全面の透明layout rootにした場合、rootは中央60%×60%と必ず交差します。検査対象はrootのbounding boxではなく、実際に描画されるopaque fragmentとinteractive hit target でなければなりません。第二に、動的zoneを全ゲーム状態で避けるにはruntime occupancy-aware repositioningが必要ですが、それは #1936 が棄却した動的追従に近づきます。固定HUDである以上、playerが左下へ移動すればHULL fragmentと重なる可能性は残ります。
したがって契約を次のように分離すべきです。
自動化するhard invariant: opaque/interactive fragmentが中央60%×60%に交差しない。
自動化するgeometry: 各fragmentがCanvas内側16pxに完全包含される。
動的zone: deterministic fixture数件での観測証跡、またはmanual runtime reviewとする。
Canvas全面の透明rootはprotected-zone判定から除外する。
「不適切に交差」の代わりに、対象rect、sampling時点、許容epsilon、opacity条件を定義する。
4. critical warning、Kills、Weapon、Assist の状態契約が欠落している
現行
combatHud.tsは一枚のsection内に次の六要素を持っています。Hull
Kills
Elapsed
Weapon
Assist
Pause
critical warning用のview-model field、threshold、copy、DOM fragmentは存在しません。Weaponは
ReadyまたはRechargingとして常時出力され、Assistもrunning中は基本的に表示されます。対して #1958 は以下を決めていません。
情報 | 未確定事項 -- | -- Critical warning | 発火threshold、hysteresis、解除条件、文言、icon、ARIA通知方式 Kills | 配置、常時表示かconditionalか、collapse順位 Weapon | Ready を隠して Recharging のみ出すのか Assist | ally不在、enemy不在、送信済み、pause時の表示・disabled・hidden条件 Elapsed | “low-prominence” の測定可能な定義 HULL | critical時の表現と通常時のnumeric/visual cue併用方針critical warningを色だけで表現してはいけません。text、shape、icon等を併用し、状態変化を通知する場合はthreshold遷移時だけ更新すべきです。毎frame
aria-liveを更新する実装は避けるべきです。 (W3C)5. AC3のsafe-margin検証とAC6のVRTがともに false-green
現行
assertWithinSafeMargin()は説明と逆で、Canvasを16px外側へ拡張して判定しています。正しくは内側へ縮めたrectです。
この既知欠陥は #1936 と #1958 のIn Scopeにも記載されていますが、現行テストはまだ誤ったままです。さらに Assist/Pause に対する
toBeInViewport()は「viewportと一部でも交差する」ことしか保証せず、完全包含を保証しません。各required fragment/controlについてbounding boxを比較する必要があります。 (Playwright)VRT側にも契約不一致があります。
visual-overlay.spec.tsのrunning HUD fixtureはdesktop-1280x720一件であり、Issueのzoom/DPR matrixを走査しません。加えて
pnpm test:vrt:e2eは、既にVITE_E2E_MODE=trueでbuildされたdistが存在することを前提とするCI用コマンドです。単独実行ではhermeticではありません。ローカルまたは独立VCにはbuild込みのpnpm test:vrtを使うべきです。必要な修正は以下です。
geometry E2Eのexact scenario tableを定義する。
「zoom/DPR matrix」がCartesian productなのかpairwiseなのか明記する。
全matrix cellではpredicate-based geometry/inputを検査する。
VRTは境界セルに絞った明示的subsetとする。
test:vrt:e2eを使う場合はbuild preconditionをVCに書く。単独VCはpnpm test:vrt。required fragmentは
toBeVisible()、non-zero bounding box、完全包含、no-scrollを順に検査する。.battle-hud-layer自体についてもscrollHeight <= clientHeight + epsilonを検査する。現行CSSのoverflow-y:autoを成功条件の逃げ道にしてはいけません。6. #1958 起票後の main 変更と既知red gateが契約へ反映されていない
現在の
mainは1c4f938…で、PR #1998 によりcommand railが削除され、battle-stageが単列化され、keyboard-only E2Eは実Tab方式へ修正されています。#1958 はそれ以前の2026年8月2日に起票されたため、最新レイアウトとテスト規約を再baseした記述が必要です。また #1986 がopenであり、pause/result architecture変更に追従していない既存E2EとVRTがmain上で既知redです。
したがって #1958 のmerge gateは次のどちらかに固定すべきです。
#1986を実装前依存に追加し、full E2E greenを必須にする。
#1986の既知failure fingerprintを記録し、実装: combat HUD の配置・safe-zone・情報優先度を実装する #1958 headとclean mainを同一環境で比較して「新規failureなし」を必須にする。
単に「current-head CI pass」と書くと、requiredではないred E2Eを無視したのか、差分が本当にpre-existingなのか判別できません。
P1 — 重大な品質不足
Pause回帰テストがVCにない
#1376 は、pause dialog表示時のCanvas/combat HUD inert化、Resumeへのfocus移動、invokerまたはCanvasへのfocus復帰、Escapeの単発処理を明示的に契約しています。#1958 はPauseのDOM位置、markup、CSS、controllerを変更し得るため、
tests/e2e/product-pause.spec.tsを必須回帰に含めるべきです。IssueのOut of Scopeが「#1376を変更しない」であることは、「#1376を検証しなくてよい」という意味ではありません。
VRTのcapture semanticsを再破壊する危険がある
#1980では、Canvas maskがcapture rootの約99.8%を覆い、HUDを実質的に一切検証していないのにVRTが通り得る欠陥が見つかっています。そのため現在は
canvasVisibility:'hidden'、pixel diversity、negative controlが導入されています。#1958 のVRT変更では、以下を非回帰条件にすべきです。
pixel diversity testを維持する。
negative controlを維持する。
Canvas exclusionをmask全面被覆方式へ戻さない。
#1391が所有する
frozen昇格を行わない。#1958では
legacy-current/ provisional candidateのみ更新する。snapshot directoryの一括更新を禁止し、変更PNGを列挙する。
viewport media queryよりCanvas container基準にすべき
現在のCanvas表示幅はブラウザviewportそのものではなく、単列
.app-shell内のactual container幅で決まります。したがってHUDのcollapse breakpointもwindowベースの@mediaより、.battle-stage__viewportをnamed query containerにした@containerを優先すべきです。container queryは実際のcontainerのinline sizeに応じてdescendant styleを切り替えられます。 (W3C)推奨構造は次です。
threshold値は実測で決めるべきであり、Issue本文で固定する必要があります。
accessibility ACが最低条件まで落ちていない
Assist/Pauseのhit targetは、少なくとも24×24 CSS pxを満たすか、規定されたspacing例外を満たす必要があります。focused componentはauthor-created contentに完全に隠されてはならず、focus orderは意味と操作性を維持しなければなりません。 (W3C)
ACに次を追加するのが妥当です。
Assist/Pause targetが24×24 CSS px以上。
tabindex > 0を使わない。DOM orderと実Tab orderを明示する。
200% zoomでcontrolとfocus indicatorがCanvas clip境界から隠れない。
critical warningは色だけに依存しない。
hidden/collapsed controlがTab順序に残らない。
disabled controlの理由を隣接copyまたはaccessible descriptionで判別できる。
推奨する実装境界
combatHud.tsを一枚のcompact cardから、透明root配下の独立fragmentへ変更するのが妥当です。重要なのは以下です。
rootは透明・全面配置でもよいが、protected-zone検査対象にしない。
fragment単位でplacement、opacity、visibility、priorityを持つ。
static text fragmentは
pointer-events:none。buttonだけ
pointer-events:auto。visual placementとDOM focus orderを分離しても、実Tab順序は論理的に保つ。
transform:scale()で文字とtargetを縮小しない。critical warningのARIA通知は毎renderではなく状態遷移時に限定する。
改訂AC案
AC1 — Semantic state table
HULL、critical、elapsed、Kills、Weapon、Assist、Pauseについて、表示条件、配置、collapse順位、copyを表形式で固定する。
AC2 — Deterministic disclosure
exact container thresholdsと縮退順を固定し、375×667を含む全境界ケースでHULL、active warning、Pauseを維持する。
AC3 — Geometry
visible opaque fragmentとinteractive controlがCanvas内側16pxに完全包含される。透明rootは対象外。running HUDは内部scrollを必要としない。
AC4 — Protected zone
persistent fragmentは中央60%×60%と交差しない。dynamic observationは指定fixtureとcapture時点に限定して証跡化する。
AC5 — Real input
real pointer click、Canvas pointer-through、Tab/Shift+Tab、Enter/Space、focus-visible、pause inert/focus returnを検証する。
AC6 — Copy/numeric/accessibility
実装: Player 向け HP / HULL 表示ポリシーを通常 UI に適用する #788 integer bucketを維持し、raw stateを露出せず、critical warningを色だけに依存させない。
AC7 — Exact runtime matrix
少なくとも現在の四viewportに375×667を追加し、各scenarioのviewport、DPR、実Chrome tab zoom、userAgent、head SHAを証跡化する。
AC8 — VRT governance
representative boundary cellsのみbaseline化し、expected/actual/diffを個別確認する。pixel-diversity/negative-controlを維持し、
frozenへ昇格しない。AC9 — Regression gate
product-pause.spec.ts、#1986対応済みfull E2E、またはclean-main differentialを通す。修正版Verification Commands
Allowed Pathsには、matrix/capture helperの再利用が必要になる可能性が高いため、少なくとも
tests/e2e/visual-utils.tsを追加すべきです。product-pause.spec.tsは変更不要なら実行対象だけでよいですが、markup再構成に伴いselector contractを更新する場合だけAllowed Pathsへ追加します。最終結論
#1958 は、配置方針は採用可能だが、実装契約と検証契約がまだ一致していません。特に以下を直さず着手すると、見た目を変えただけでACを通す実装、pointer操作できないのに通るテスト、375×667を未修正のまま閉じる実装が成立します。
最優先の修正順は次です。
375×667をACへ復帰。
critical/Kills/Weapon/Assistの状態表を確定。
protected-zoneを静的invariantと観測証跡へ分離。
direct click /
.focus()を実pointer / Tab操作へ置換。VRTとgeometry matrixを分離し、exact scenarioを列挙。
#1986またはclean-main differential gateを明記。
最新
main1c4f938…を基準にIssue本文を再bind。本レビューは最新
# 判定mainとGitHub上のIssue、PR、コメント、現行資産に対する静的レビューです。このセッションではPlaywright/VRTを実行していないため、実際の現行failure数や生成画像の目視確認までは行っていません。REQUEST_CHANGES — 現状の #1958 は implementation-ready ではありません。
方向性自体は妥当です。左下の機体状態、上中央の経過時間、DOMによる Assist/Pause、Canvasとの入力責務分離は、#1936 と UI IA に整合します。しかし現契約には、実装者が判断できない情報状態、既知の未修正ケース、false-green になる検証、現在の
mainとずれた前提が残っています。#1958 自体にはコメントがなく、実質的な決定根拠は #1936、PR #1964、PR #1998 側に分散しています。Native dependency は正しく #1956 を指しており、#1956 は PR #1964 で完了済みです。ただし #1958 本文の Dependency 欄は依然として番号未解決の定型文なので、
Depends on: #1956 (closed by #1964)へ更新すべきです。P0 — マージ阻害事項
1. PR #1964 から明示的に委譲された 375×667 が AC6 から消えている
PR #1964 は、モバイル用の
transform: scale(0.5)を不適切なスコープ横断として削除し、375×667 の HUD overflow を #1958 に委譲しています。現行テストにも、そのケースだけtest.fixmeとする明示的なコメントがあります。ところが #1958 の AC6 は 1280×720、1366×768、1920×1080、1437×1365 しか列挙していません。これは単なる追加ケースではありません。現時点で約130px下にはみ出すことが既知であり、#1958 が閉じるべき具体的な欠陥です。
必要な修正は次のとおりです。
Supported minimum viewportを確定する。UI IA でも未決事項のままです。test.fixmeを解除することを独立ACにする。transform: scale()ではなく conditional fragment の非表示、gap/padding調整、再配置で行う。2. AC4 の Verification Command は pointer / keyboard を実際には検証していない
assist-player-affordance.spec.tsは Assist を次の方法で操作しています。button.evaluate(button.click())によるDOMメソッド直接呼び出しassistButton.focus()によるプログラム的focus注入前者はhit-testingを迂回し、後者はTab順序と到達可能性を迂回します。ファイル内コメントも、これは manual pointer hit-testing を検証していないと認めています。
Playwrightの通常の
locator.click()は、対象が可視、安定、enabledであり、実際にpointer eventを受け取れることまで検査します。直接HTMLElement.click()を呼ぶと、この重要な検査がありません。 (Playwright)さらに、直近の PR #1998 では、まさに
.focus()によるkeyboard-only検証が敵対的レビューで却下され、実際のTab/Shift+Tabに書き換えられています。#1958 が古い方式を再採用するのは明確な後退です。AC4 は少なくとも以下を分離して検証する必要があります。
getByRole(...).click()で操作できる。page.mouse.click()し、Canvas/input側が受信する。Tab/Shift+Tabで Assist/Pause に到達する。EnterとSpaceでbuttonをactivateできる。pointer-events:noneはhit-testingから外すだけであり、sequential focus navigationから要素を除外しません。pointer-throughとkeyboard/focusは別々のテストが必要です。 ([W3C]2)3. protected action zone が実行可能な契約になっていない
#1936 の採用決定は、次の二種類のzoneを定義しています。
同時に「動的追従HUD」は視線予測性を壊すとして棄却されています。
一方、#1958 AC3 は「HUD root、主要fragment、interactive control が protected action zone と不適切に交差しない」としか書いていません。ここには二つの問題があります。
第一に、分散配置を実装するため
.combat-hudをCanvas全面の透明layout rootにした場合、rootは中央60%×60%と必ず交差します。検査対象はrootのbounding boxではなく、実際に描画されるopaque fragmentとinteractive hit target でなければなりません。第二に、動的zoneを全ゲーム状態で避けるにはruntime occupancy-aware repositioningが必要ですが、それは #1936 が棄却した動的追従に近づきます。固定HUDである以上、playerが左下へ移動すればHULL fragmentと重なる可能性は残ります。
したがって契約を次のように分離すべきです。
4. critical warning、Kills、Weapon、Assist の状態契約が欠落している
現行
combatHud.tsは一枚のsection内に次の六要素を持っています。critical warning用のview-model field、threshold、copy、DOM fragmentは存在しません。Weaponは
ReadyまたはRechargingとして常時出力され、Assistもrunning中は基本的に表示されます。対して #1958 は以下を決めていません。
Readyを隠してRechargingのみ出すのかUI IA はHULLをinteger-only summary、critical warningをcombat常時情報として扱い、major HUD textは1080pで18 CSS px以上、critical warningは200% zoomでも可視としています。
また #788 により、通常UIのHULLは
0 < value < 1を"1"に丸め、<1や小数を出さない契約が既に確定しています。#1958 AC5にはこの不変条件を直接記載すべきです。最低限、以下の状態表をIssue本文に追加する必要があります。
recharging時のみ、または別の明示条件critical warningを色だけで表現してはいけません。text、shape、icon等を併用し、状態変化を通知する場合はthreshold遷移時だけ更新すべきです。毎frame
aria-liveを更新する実装は避けるべきです。 ([W3C]3)5. AC3のsafe-margin検証とAC6のVRTがともに false-green
現行
assertWithinSafeMargin()は説明と逆で、Canvasを16px外側へ拡張して判定しています。正しくは内側へ縮めたrectです。
この既知欠陥は #1936 と #1958 のIn Scopeにも記載されていますが、現行テストはまだ誤ったままです。さらに Assist/Pause に対する
toBeInViewport()は「viewportと一部でも交差する」ことしか保証せず、完全包含を保証しません。各required fragment/controlについてbounding boxを比較する必要があります。 ([Playwright]1)VRT側にも契約不一致があります。
visual-overlay.spec.tsのrunning HUD fixtureはdesktop-1280x720一件であり、Issueのzoom/DPR matrixを走査しません。加えて
pnpm test:vrt:e2eは、既にVITE_E2E_MODE=trueでbuildされたdistが存在することを前提とするCI用コマンドです。単独実行ではhermeticではありません。ローカルまたは独立VCにはbuild込みのpnpm test:vrtを使うべきです。必要な修正は以下です。
test:vrt:e2eを使う場合はbuild preconditionをVCに書く。単独VCはpnpm test:vrt。toBeVisible()、non-zero bounding box、完全包含、no-scrollを順に検査する。.battle-hud-layer自体についてもscrollHeight <= clientHeight + epsilonを検査する。現行CSSのoverflow-y:autoを成功条件の逃げ道にしてはいけません。6. #1958 起票後の main 変更と既知red gateが契約へ反映されていない
現在の
mainは1c4f938…で、PR #1998 によりcommand railが削除され、battle-stageが単列化され、keyboard-only E2Eは実Tab方式へ修正されています。#1958 はそれ以前の2026年8月2日に起票されたため、最新レイアウトとテスト規約を再baseした記述が必要です。また #1986 がopenであり、pause/result architecture変更に追従していない既存E2EとVRTがmain上で既知redです。
したがって #1958 のmerge gateは次のどちらかに固定すべきです。
単に「current-head CI pass」と書くと、requiredではないred E2Eを無視したのか、差分が本当にpre-existingなのか判別できません。
P1 — 重大な品質不足
Pause回帰テストがVCにない
#1376 は、pause dialog表示時のCanvas/combat HUD inert化、Resumeへのfocus移動、invokerまたはCanvasへのfocus復帰、Escapeの単発処理を明示的に契約しています。#1958 はPauseのDOM位置、markup、CSS、controllerを変更し得るため、
tests/e2e/product-pause.spec.tsを必須回帰に含めるべきです。IssueのOut of Scopeが「#1376を変更しない」であることは、「#1376を検証しなくてよい」という意味ではありません。
VRTのcapture semanticsを再破壊する危険がある
#1980では、Canvas maskがcapture rootの約99.8%を覆い、HUDを実質的に一切検証していないのにVRTが通り得る欠陥が見つかっています。そのため現在は
canvasVisibility:'hidden'、pixel diversity、negative controlが導入されています。#1958 のVRT変更では、以下を非回帰条件にすべきです。
frozen昇格を行わない。legacy-current/ provisional candidateのみ更新する。viewport media queryよりCanvas container基準にすべき
現在のCanvas表示幅はブラウザviewportそのものではなく、単列
.app-shell内のactual container幅で決まります。したがってHUDのcollapse breakpointもwindowベースの@mediaより、.battle-stage__viewportをnamed query containerにした@containerを優先すべきです。container queryは実際のcontainerのinline sizeに応じてdescendant styleを切り替えられます。 ([W3C]4)推奨構造は次です。
threshold値は実測で決めるべきであり、Issue本文で固定する必要があります。
accessibility ACが最低条件まで落ちていない
Assist/Pauseのhit targetは、少なくとも24×24 CSS pxを満たすか、規定されたspacing例外を満たす必要があります。focused componentはauthor-created contentに完全に隠されてはならず、focus orderは意味と操作性を維持しなければなりません。 ([W3C]5)
ACに次を追加するのが妥当です。
tabindex > 0を使わない。推奨する実装境界
combatHud.tsを一枚のcompact cardから、透明root配下の独立fragmentへ変更するのが妥当です。重要なのは以下です。
pointer-events:none。pointer-events:auto。transform:scale()で文字とtargetを縮小しない。改訂AC案
AC1 — Semantic state table
HULL、critical、elapsed、Kills、Weapon、Assist、Pauseについて、表示条件、配置、collapse順位、copyを表形式で固定する。
AC2 — Deterministic disclosure
exact container thresholdsと縮退順を固定し、375×667を含む全境界ケースでHULL、active warning、Pauseを維持する。
AC3 — Geometry
visible opaque fragmentとinteractive controlがCanvas内側16pxに完全包含される。透明rootは対象外。running HUDは内部scrollを必要としない。
AC4 — Protected zone
persistent fragmentは中央60%×60%と交差しない。dynamic observationは指定fixtureとcapture時点に限定して証跡化する。
AC5 — Real input
real pointer click、Canvas pointer-through、Tab/Shift+Tab、Enter/Space、focus-visible、pause inert/focus returnを検証する。
AC6 — Copy/numeric/accessibility
実装: Player 向け HP / HULL 表示ポリシーを通常 UI に適用する #788 integer bucketを維持し、raw stateを露出せず、critical warningを色だけに依存させない。
AC7 — Exact runtime matrix
少なくとも現在の四viewportに375×667を追加し、各scenarioのviewport、DPR、実Chrome tab zoom、userAgent、head SHAを証跡化する。
AC8 — VRT governance
representative boundary cellsのみbaseline化し、expected/actual/diffを個別確認する。pixel-diversity/negative-controlを維持し、
frozenへ昇格しない。AC9 — Regression gate
product-pause.spec.ts、#1986対応済みfull E2E、またはclean-main differentialを通す。修正版Verification Commands
Allowed Pathsには、matrix/capture helperの再利用が必要になる可能性が高いため、少なくとも
tests/e2e/visual-utils.tsを追加すべきです。product-pause.spec.tsは変更不要なら実行対象だけでよいですが、markup再構成に伴いselector contractを更新する場合だけAllowed Pathsへ追加します。最終結論
#1958 は、配置方針は採用可能だが、実装契約と検証契約がまだ一致していません。特に以下を直さず着手すると、見た目を変えただけでACを通す実装、pointer操作できないのに通るテスト、375×667を未修正のまま閉じる実装が成立します。
最優先の修正順は次です。
.focus()を実pointer / Tab操作へ置換。main1c4f938…を基準にIssue本文を再bind。本レビューは最新
mainとGitHub上のIssue、PR、コメント、現行資産に対する静的レビューです。このセッションではPlaywright/VRTを実行していないため、実際の現行failure数や生成画像の目視確認までは行っていません。squne121 commentedon Aug 5, 2026
issue-refinement-loop: approved
OWNER の REQUEST_CHANGES レビュー(comment)を反映し、本文を全面改訂しました。
反映した主な変更
#1956 (closed by PR #1964)に更新assertWithinSafeMargin()の方向逆転バグ・VRT governance・main 追従(実装: PR #1984 pause-dialog/result-surface 変更に既存 E2E テストを追従させる #1986/実装: 旧 command rail を削除し overlay UI を E2E 検証する (#1377) #1998)を個別 AC として明文化# ACnmarker 形式へ再構成し、e2e/vrt の runtime-only コマンドに# preflight-scope: pr_review_onlyを付与tests/player-facing-hp-policy.test.ts/tests/e2e/visual-utils.tsを追加検証結果
combatHud.tsの critical warning field 欠落、product-pause.spec.tsの既存回帰テスト実在、visual-overlay.spec.tsの単一 viewport fixture、visual-utils.ts実在、Supported minimum viewport未決)をすべて裏付けcheck_issue_contract.py直接実行により再検証):verdict: approve(3 iteration。1回目は issue-reviewer SubAgent の誤検知を独立検証で否定・訂正、2回目は<!-- runtime-verification: true -->タグ欠落を修正、3回目は contract-review の pnpm allowlist に合わせて VC を調整)STATUS: pass/NEXT_ACTION: proceedrun_contract_review_once.py --mode static):status: go(vc_preflight_status: pass、AC1 はpnpm testregression gate で実際に pass、AC2-AC9 はpr_review_onlyで PR review へ委譲)latest_comment_urlは本 termination report コメント自体を Contract Snapshot の代替根拠とする(contract_snapshot.publishによる別コメント投稿は未実行のため null)。impl-review-loop/implement-issue側のissue-contract-review呼び出し時に freshness(body_sha256一致)を再確認すること。squne121 commentedon Aug 6, 2026
implement-issue: 実装完了(部分実装、詳細は PR 参照)
.claude/worktrees/issue-1958-combat-hud-safe-zoneworktree-issue-1958-combat-hud-safe-zone37a5300f438edc7c624133dd603fb6c69bc1cfddsqune121 commentedon Aug 6, 2026
Owner Decision on Issue #1958 (in response to PR #2006 iteration 1 HUMAN_REVIEW_REQUIRED verdict, reviewed_head_sha 5e2054e)
1. AC4 is maintained including at 375x667 — no blanket exception
A comprehensive exception for the Canvas center 60%x60% static protected zone at 375x667 is NOT granted.
However, AC1's "bottom-left-status" does NOT mean the current ~85px stacked-card chrome must stay fixed. Placement, player-facing copy, and information priority must be preserved, but the concrete representation may change to a compact form specific to the supported minimum viewport.
At 375x667, collapse must follow the semantic state table in this order:
HULL, active critical warning, and Pause must be preserved.
The 375x667 status may be changed to a single line or equivalent minimal display that:
transform: scale()The current "~85px status card doesn't fit" measurement is evidence that the CURRENT stacked representation doesn't fit — it is NOT proof that every allowed compact representation is impossible.
2. AC1 placement must be runtime-verified
The prior review's conclusion that "AC1 is independently verified" is reverted to unconfirmed. Current CSS uses
.battle-hud-layer { align-content: start; }with a content-sized.combat-hud, andalign-self: endmay only be positioning within an auto-sized grid row — semantic-state-table strings alone do not prove actual bottom-left placement.tests/e2e/hud-hull-overflow.spec.tsmust add runtime geometry assertions that:"Bottom-left" must be proven via bounding box, not CSS class/grid-area names. If this new check reveals placement inconsistencies beyond 375x667, fix them per the Issue contract rather than preserving the prior AC1 PASS finding.
3. The 375x667 known failure must be resolved
test.fail()must not remain in the final deliverable. At minimum two fixtures at 375x667 must be exercised — normal HULL state, and critical-warning-triggered state — and both must verify: AC1 placement, Canvas inner 16 CSS px containment, static protected-zone non-intersection, HULL display, icon+text display in the critical fixture, Pause pointer/keyboard/focus reachability, no hidden/collapsed fragment in Tab order, no-scroll on HUD/.battle-hud-layer, and recorded viewport/DPR/zoom/userAgent/head SHA. Available dimensions outside the protected zone must be derived from actual measurements, not hard-coded viewport-specific guesses.4. AC8 must be completed in this same Issue/PR — no follow-up split
Scope Delta — Allowed Paths addition
Add
.github/workflows/ci.ymlto Issue #1958's Allowed Paths. The edit authority is limited to the minimal diff needed to register AC8's representative VRT captures inACTIVE_VRT_CAPTURESand the corresponding CI summary/artifact contract. No unrelated workflow cleanup, Action version bumps, or job restructuring is authorized.Representative boundary cells to re-confirm against the Issue contract and current implementation, adding only necessary baselines:
Each PNG must have expected/actual/diff individually reviewed; changed PNGs must be enumerated in the PR body and the visual baseline registry. Blanket snapshot-directory updates remain prohibited.
scripts/check-visual-artifact-pipeline.pycross-validation against.github/workflows/ci.ymlmust actually run and prove no missing declarations.5. Update to latest main
PR #2006 is BEHIND, and Issue #1986 closed after the prior PR body was written. Use the repo's authorized branch-update path (not raw
gh apior an ad hoc merge/rebase that bypasses repository policy) to catch up to latest main. Record previous head SHA, previous base/main SHA, updated main SHA, updated PR head SHA, and any conflict resolution. After updating, confirm Issue #1986's closed state and its resolving PR/main landing, and re-run AC9 against latest main (not a stale clean-main comparison).6. Verification independence requirement
Two prior test-runner subagent reports incorrectly claimed AC4/AC8 were PASS when they were not. Future subagent reports are candidate evidence only — the verdict author must directly confirm: current head diff, the actual test bodies, executed commands and exit codes, test counts, presence of expected-failure/skip/fixme markers, generated artifacts, expected/actual/diff, workflow capture declarations, and reviewed head SHA.
test.fail(),test.fixme(), skip, and vacuous assertions must not be counted as ordinary PASS.Attribution: recorded via impl-review-loop orchestrator at the explicit direction of the human operator (owner) in response to PR #2006 iteration 1 HUMAN_REVIEW_REQUIRED verdict. Date: 2026-08-06.
fix: PR #2006 review iteration 2 -- real 375x667 compact status, remo…
squne121 commentedon Aug 6, 2026
Owner Decision 2 on Issue #1958 (AC8 scope expansion, in response to PR #2006 iteration 2 HUMAN_REVIEW_REQUIRED verdict, reviewed_head_sha cf740a1)
The owner authorizes BOTH of the two options presented by the iteration-2 pr-review-judge verdict:
1. Allowed Paths expansion (authorized)
Add to Issue #1958's Allowed Paths:
playwright.config.tsscripts/check-visual-artifact-pipeline.pyEdit authority for these two files remains scoped strictly to what's needed to support true multi-viewport VRT capture registration for AC8 (e.g. additional Playwright projects/viewports, and per-call-site viewport parsing/validation in the artifact pipeline checker). No unrelated config changes, no removal of existing project/browser coverage, no unrelated validator rule changes.
2. CI matrix / fingerprint-schema restructuring (authorized)
The owner authorizes restructuring the VRT evidence pipeline's fingerprint schema and/or CI job matrix as needed so that each individual VRT capture can carry and be validated against its own declared viewport (rather than the current single run-wide viewport fingerprint token), specifically to register the AC8 representative boundary-cell baselines: 1366x768, 1920x1080, 1437x1365 (or low-DPR approximation), 375x667, and the existing 1280x720 if still needed.
This authorization is scoped to the minimal schema/matrix change needed for AC8's baselines — do not use this as license for a broader visual-testing-pipeline rewrite. Preserve the existing hard-fail contract properties in
docs/dev/visual-baseline-registry.md§5 (uses/if/id/with.name/with.path/if-no-files-found/retention-days exact-value checks) for whichever CI job(s) end up producing the required uploads; extend rather than relax them.All other constraints from Owner Decision 1 (2026-08-06) remain in force: representative boundary cells only, individual expected/actual/diff review per PNG, changed PNGs enumerated individually in the PR body and visual baseline registry (no blanket snapshot-directory update),
scripts/check-visual-artifact-pipeline.pycross-validation must actually pass proving no missing declarations, and AC8 must still be completed in this same Issue/PR (no follow-up split).Attribution: recorded via impl-review-loop orchestrator at the explicit direction of the human operator (owner), who replied "1,2 Y" confirming both options presented in the iteration-2 pr-review-judge HUMAN_REVIEW_REQUIRED verdict. Date: 2026-08-07.
fix: PR #2006 review iteration 3 -- complete AC8 boundary-cell VRT ba…
fix: PR #2006 review iteration 3 -- CI evidence, real AC5 interaction…
squne121 commentedon Aug 7, 2026
implement-issue: fix_delta iteration 3 実装完了 (2026-08-07)
OWNER の PR #2006 REQUEST_CHANGES(reviewed_head_sha 465774a、コメント)で指摘された 4 件の merge blocker に対応し、既存ブランチへ push しました。
対応内容
mcr.microsoft.com/playwright@sha256:9bd26ad9...)内で 4 つの boundary-cell baseline(1366x768, 1920x1080, 1437x1365 DPR0.667, 375x667)と既存の legacy-current/paused/result-timeout baseline を再生成。個別 diff review 済み(すべてホスト Chromium とコンテナ間のフォントレンダリング差分のみで構造的差分なし)。tolerance widening は行っていません。assistButton.evaluate(...click())/.focus()を実getByRole(...).click()/ 実Tab/Shift+Tab/Enter/Spaceに置換。専用の Tab 順序+focus indicator テストを追加。調査の過程でcommandIntentRuntime.activeIntent(assistPlayerTtlTicks133ms TTL、src/state/GameState.ts、Allowed Paths 外につき変更なし)が一発性の短命 transient であり、実クリックの actionability wait が 50ms poll interval の観測点をすり抜けることを発見・修正(10ms 間隔の atomic poll に変更)。assertSemanticPlacement()を全可視 opaque fragment(elapsed/status/critical/edge-control/Assist/Pause)個別の 16px safe-margin containment チェックに書き換え(透明な[data-combat-hud]root への適用を除去)。"lower region"/"top region" を実測ジオメトリに基づく明示的 canvas-normalized 閾値に固定。null boundingBox は fail に変更。EXPECTED_PR_HEAD_SHA(workflow 側でgithub.event.pull_request.head.sha || github.shaを設定)の 40-hex SHA 検証を必須化し、GITHUB_SHAの synthetic merge-ref や'unknown'フォールバックを廃止。検証
host: typecheck / typecheck:e2e / lint / test(1864 pass)/ build 全 pass
pinned CI Docker image 内: hud-hull-overflow.spec.ts(23)/ assist-player-affordance.spec.ts(4、real-click テストは 5 回連続実行で再現性確認)/ product-pause.spec.ts(14)/ visual-overlay.spec.ts(10)全 pass
scripts/check-visual-artifact-pipeline.py: pass
PR: 実装: combat HUD の配置・safe-zone・情報優先度を実装する (#1958) #2006
Worktree:
.claude/worktrees/issue-1958-combat-hud-safe-zoneBranch:
worktree-issue-1958-combat-hud-safe-zonehead: ee7d0d4
後続: 実 CI(e2e / ci-verdict-summary 含む)結果待ち → pr-review-judge 再レビュー
squne121 commentedon Aug 7, 2026
OWNER approved Scope Delta: Allowed Paths extended to include
tests/e2e/__screenshots__/m2-combat-mvp.spec.ts/m2-running-hud-baseline.pngper #1958 (comment) finding, to unblock the requirede2eCI job for PR #2006.fix: PR #2006 regenerate m2-running-hud-baseline for #1958 wide HUD l…
test(vrt): combat-hud-running component baseline を #1958 新レイアウトへ追従させる (…