Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1370"
goal_ref: "fixed-logical-arena-responsive-presentation: gameplay semantics を変えず、battle viewport と Canvas display/backing store/input mapping を responsive 化する"
change_kind: mixedParent Issue
Parent Goal Ref
- Goal: battle-stage 内の player-facing UI を DOM overlay と Canvas world layer に分離する。
- Desired Destination: Canvas は固定 logical arena の world 表示を維持し、container/browser resize は display だけに反映する。
Current Validated Scope
resizeArena()の window/safeSidebar 依存を、display-only resize で logical arena を変えない実装へ置換する。- CSS display size、Canvas backing store size、logical coordinates を独立させる。
- responsive 表示により生じた既存 VRT の7件だけを、expected/actual/diff を個別確認して provisional baseline と fixture projection を整合させる。実装: #1375 merge後 running HUD / paused HUD VRT baseline を frozen 昇格する #1391 が 実装: combat HUD の配置・safe-zone・情報優先度を実装する #1958 merge 後に frozen 昇格するまで geometry baseline を frozen にしない。
- stable ancestor を
ResizeObserverで監視し、DPR/zoom とdevice-pixel-content-boxfallback を扱う。 - pointer coordinate mapping と player/projectile/aim の相対位置を維持する。
Remaining Parent Gaps
- combat HUD placement、safe-zone、priority は後続 Issue が所有する。
- command rail 削除は 実装: 旧 command rail を削除し overlay UI を E2E 検証する #1377 が所有する。
Outcome
logical arena とゲームプレイを固定したまま、actual container、browser zoom、DPR に display/backing store/input mapping が追従し、指定matrixで描画と操作位置が一致する状態。
In Scope
- responsive battle viewport / Canvas display implementation
ResizeObserverlifecycle と fallback- DPR-aware backing store、CSS display scaling、pointer-to-logical mapping
- resize 後の gameplay semantics non-regression、Playwright runtime evidence
- responsive Canvas に直接起因する既存 VRT fixture と個別 provisional baseline の整合
Out of Scope
- logical arena の拡大、敵密度、移動距離、難易度、spawn 配置の変更
- combat HUD placement / safe-zone / priority
- FCS、4武器 UI、minimap
- Pause/result overlay、command rail 削除
Acceptance Criteria
- AC1: container resize が CSS display size に追従し、logical arena は表示都合で変わらない。
- AC2: backing store が display size と DPR に追従し、CSS display size と混同しない。
- AC3: pointer の四隅と中央が
getBoundingClientRect()比で正しい logical coordinate に写像される。 - AC4: resize 前後で player/projectile/aim の logical relative position と gameplay range が維持される。
- AC5: 1280x720、1366x768、1920x1080、1437x1365 / DPR≈0.667、zoom 100/125/150/200%、DPR 1/1.25/2 で runtime evidence がある。
- AC6: observer/event listener cleanup があり、production build と既存 test/e2e gate が pass する。
Verification Commands
# AC1
# preflight-scope: pr_review_only
$ pnpm test -- tests/main-loop.test.ts
# AC2
# preflight-scope: pr_review_only
$ pnpm test -- tests/canvas-renderer.test.ts
# AC3
# preflight-scope: pr_review_only
$ pnpm test -- tests/input-bindings.test.ts
# AC4
# preflight-scope: pr_review_only
$ pnpm test -- tests/main-loop.test.ts
# AC5
# preflight-scope: pr_review_only
$ pnpm test:e2e -- tests/e2e/assist-player-affordance.spec.ts
# AC6
$ pnpm buildRuntime Verification Applicability
decision: immediate
reason: display size、backing store、DPR/zoom、pointer mapping は browser runtime で検証する。
applicable_acs: [AC1, AC2, AC3, AC4, AC5, AC6]
execution_environment: Chromium Playwright with VITE_E2E_MODE=true production build
skip_conditions: browser runtime unavailable; record the failed command and retain no visual-pass claim
fallback_policy: unit tests may prove math only; reopen runtime verification before merge when browser evidence is unavailable
artifact_requirements: viewport, declared zoom, observed DPR, visualViewport scale, canvas CSS/backing-store dimensions, screenshot path, head SHA
Allowed Paths
src/main.tssrc/render/CanvasRenderer.tssrc/input/InputBindings.tssrc/style.csstests/main-loop.test.tstests/canvas-renderer.test.tstests/input-bindings.test.tstests/e2e/assist-player-affordance.spec.tstests/e2e/hud-hull-overflow.spec.tstests/e2e/m2-combat-mvp.spec.tstests/e2e/phase-screens.spec.tstests/e2e/__screenshots__/m2-combat-mvp.spec.ts/tests/e2e/__screenshots__/phase-screens.spec.ts/
Required Design References
docs/product/features/ui-information-architecture.mddocs/adr/0001-architecture-baseline.mddocs/product/game-design.md- 調査: running combat HUD の配置・遮蔽・情報優先度を決定する #1936
Required Skills
- TypeScript / Canvas 2D / ResizeObserver / Playwright
Delivery Rule
- 1 Issue = 1 PR
- PR body は
Closes #<this issue>、Refs #1936、Refs #1370、full head SHA と viewport/DPR/zoom matrix を含める。 - combat HUD implementation は本 Issue merge 後の main を基底にする。
Stop Conditions
- destructive_operation
- secret_required
- external_billing
- insufficient_permission
テンプレート互換の次の旧定型文は上記4分類へ正規化し、追加の停止条件にはしない。
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Activity
squne121 commentedon Aug 2, 2026
Contract Review Result
squne121 commentedon Aug 2, 2026
Contract Review Result
最小化した契約スナップショットです。上記 body SHA に対する static review は
go、VC preflight はpassです。実装後の検証は PR review/current head で実行します。squne121 commentedon Aug 2, 2026
Contract Review Result
test: strengthen responsive Canvas runtime evidence (#1956)
test: align responsive Canvas VRT baselines (#1956)
squne121 commentedon Aug 2, 2026
implement-issue: VRT安定化を反映
eb174f8d5c837f150bd6ac5026f54ef0b3cf1f99squne121 commentedon Aug 2, 2026
implement-issue: current-head VRT修復を反映
13ef3209504915e91928af9a1ed7b000f354a0d7squne121 commentedon Aug 2, 2026
implement-issue: title-menu VRT baselineを再同期
5a4ebd31d6b0ad0e41b43d75f6dcf9e46b1dcd9esqune121 commentedon Aug 2, 2026
implement-issue: 残るphase screen VRT baselineを再同期
c7d7cdbd7d2293c5c3e9d9a1fc3ac5d257695868squne121 commentedon Aug 2, 2026
Contract Review Result
test: phase screen VRT baselines を同期する (#1956)
squne121 commentedon Aug 2, 2026
Contract Review Result
test: responsive phase screen baselines を更新 (#1956)
squne121 commentedon Aug 2, 2026
Contract Review Result
squne121 commentedon Aug 2, 2026
Contract Review Result
fix: bounded remediation of #1956 responsive Canvas review defects
fix: defer 375x667 combat HUD safe-margin case to Issue #1958
fix: wait for real Chrome tab zoom to propagate before pointer-mappin…
test: VRT baseline を CI ピン留め Playwright コンテナで再キャプチャする (Issue #1956)
feat: fixed logical arena の responsive Canvas presentation を分離する (#1956…
squne121 commentedon Aug 3, 2026
PR #1964(merge commit 1a4db3e、2026-08-03T21:21:07Zマージ)で完了しました。
PR本文の
Closes #1956がinline codeとして記述されていたためGitHubの自動クローズkeywordが発火せず、手動でクローズします(post-merge-cleanup、squne121/loop-protocol)。tests/e2e/hud-hull-overflow.spec.tsの375x667ケースをtest.fixmeで明示)fix(e2e): repair pause-dialog resume path and legacy-surface selector…
feat(ui): result screen と pause overlay を battle-stage 内に統合する (#1984)