[PR #2225] [MERGED] Fix game combat UI regressions #5488

Closed
opened 2026-10-22 04:16:45 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2225
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2145-game-combat-ui


📝 Commits (3)

  • 90cd6d4 Fix game combat UI regressions
  • 6b916d0 Address combat bark review feedback
  • f7267e9 Keep combat bark display and voice in sync

📊 Changes

1 file changed (+237 additions, -30 deletions)

View changed files

📝 src/features/modes/game/components/GameCombatUI.tsx (+237 -30)

📄 Description

Linked issue

Closes #2145

Why this change

  • Game combat on refactor regressed three legacy presentation behaviors: combatant-matched dialogue barks were moved into one shared panel, action animation pacing became much faster than the readable legacy timings, and large desktop combatant rows clipped fixed-width cards inside an overflow-hidden scene.

What changed

  • Restored component-local dialogue identity, combatant matching, and dismissal state so matched combat dialogue renders as click-to-dismiss barks anchored to the matching combatant card.
  • Kept unmatched dialogue in the shared CombatDialoguePanel fallback so non-combatant speakers still appear.
  • Restored readable action delays to 1800ms normal actions, 2200ms reactions, and 400ms round-start delay.
  • Reworked desktop combatant rows/cards to use no-wrap visible rows with per-side CSS width clamps so five-plus combatants fit without clipping.

Refactor impact

Primary owner:

  • Game mode UI (src/features/modes/game/components/GameCombatUI.tsx)

Impact areas reviewed:

  • Desktop game combat render path
  • Combat dialogue props from combatDialogue / combatDialogueCues
  • Combat round animation pacing
  • Mobile combat drawer path was checked and intentionally left with the existing shared cues drawer behavior

Boundary notes:

  • Feature-only React UI change. No engine, shared API, Tauri/Rust, storage, provider, import/export, or remote-runtime boundary changes.

Pressure points touched:

  • GameCombatUI desktop combat scene and CombatantCard

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex/browser proof: node scratch\issue-2145-combat-ui-proof.mjs against local Vite rendered the real GameCombatUI component with five enemies, three party members, three matched barks, one unmatched dialogue line, and one duplicate-name dialogue line. Result: 8 cards rendered, all card rects stayed within the 1280px viewport, max card width was 86.390625px, two same-speaker barks were both anchored to the same combatant card, the party bark was anchored to its combatant card, anchored barks rendered as buttons, the duplicate-name line stayed in the fallback panel instead of attaching to the wrong card, clicking one anchored bark removed only that bark, and the other barks plus fallback panel stayed visible.
  • Codex/static repro: git show upstream/refactor:src/features/modes/game/components/GameCombatUI.tsx matched the pre-fix centered lines={visibleCombatDialogue} panel, setTimeout(playNextAction, action.reaction ? 1200 : 800), and desktop row overflow-hidden fixed-card layout.
  • Codex baseline: pnpm typecheck passed.
  • Codex baseline: pnpm check passed, including line endings, architecture, frontend tsc, Rust cargo check, docs, discovery, launcher safety, and unused-code checks.
  • Codex proof gate: node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny review: pass on the current diff before opening this draft.
  • No human-only/manual verification blocker remains for the core claim.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; restores existing game combat presentation behavior and does not add a discoverable feature.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

Before dismissal:

Before dismissal

After dismissing one anchored bark:

After dismissal


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2225 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2145-game-combat-ui` --- ### 📝 Commits (3) - [`90cd6d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/90cd6d443057c0f679b268f8a8071aac003bd6d1) Fix game combat UI regressions - [`6b916d0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6b916d0bed5b8a874981e1bbee8c8ebcb552b65e) Address combat bark review feedback - [`f7267e9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f7267e9db48970fd31dab87c4dd7741d61726392) Keep combat bark display and voice in sync ### 📊 Changes **1 file changed** (+237 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `src/features/modes/game/components/GameCombatUI.tsx` (+237 -30) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2145 ## Why this change - Game combat on `refactor` regressed three legacy presentation behaviors: combatant-matched dialogue barks were moved into one shared panel, action animation pacing became much faster than the readable legacy timings, and large desktop combatant rows clipped fixed-width cards inside an `overflow-hidden` scene. ## What changed - Restored component-local dialogue identity, combatant matching, and dismissal state so matched combat dialogue renders as click-to-dismiss barks anchored to the matching combatant card. - Kept unmatched dialogue in the shared `CombatDialoguePanel` fallback so non-combatant speakers still appear. - Restored readable action delays to 1800ms normal actions, 2200ms reactions, and 400ms round-start delay. - Reworked desktop combatant rows/cards to use no-wrap visible rows with per-side CSS width clamps so five-plus combatants fit without clipping. ## Refactor impact Primary owner: - Game mode UI (`src/features/modes/game/components/GameCombatUI.tsx`) Impact areas reviewed: - Desktop game combat render path - Combat dialogue props from `combatDialogue` / `combatDialogueCues` - Combat round animation pacing - Mobile combat drawer path was checked and intentionally left with the existing shared cues drawer behavior Boundary notes: - Feature-only React UI change. No engine, shared API, Tauri/Rust, storage, provider, import/export, or remote-runtime boundary changes. Pressure points touched: - `GameCombatUI` desktop combat scene and `CombatantCard` ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Codex/browser proof: `node scratch\issue-2145-combat-ui-proof.mjs` against local Vite rendered the real `GameCombatUI` component with five enemies, three party members, three matched barks, one unmatched dialogue line, and one duplicate-name dialogue line. Result: 8 cards rendered, all card rects stayed within the 1280px viewport, max card width was 86.390625px, two same-speaker barks were both anchored to the same combatant card, the party bark was anchored to its combatant card, anchored barks rendered as buttons, the duplicate-name line stayed in the fallback panel instead of attaching to the wrong card, clicking one anchored bark removed only that bark, and the other barks plus fallback panel stayed visible. - Codex/static repro: `git show upstream/refactor:src/features/modes/game/components/GameCombatUI.tsx` matched the pre-fix centered `lines={visibleCombatDialogue}` panel, `setTimeout(playNextAction, action.reaction ? 1200 : 800)`, and desktop row `overflow-hidden` fixed-card layout. - Codex baseline: `pnpm typecheck` passed. - Codex baseline: `pnpm check` passed, including line endings, architecture, frontend `tsc`, Rust `cargo check`, docs, discovery, launcher safety, and unused-code checks. - Codex proof gate: `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny review: pass on the current diff before opening this draft. - No human-only/manual verification blocker remains for the core claim. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; restores existing game combat presentation behavior and does not add a discoverable feature. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence Before dismissal: ![Before dismissal](https://gist.githubusercontent.com/cha1latte/d99869a6acc94ad0fc946bfc88bfa056/raw/bd0b2f0b7ac24e67590b8d05161a19211cf29aba/issue-2145-before-dismiss.svg) After dismissing one anchored bark: ![After dismissal](https://gist.githubusercontent.com/cha1latte/d99869a6acc94ad0fc946bfc88bfa056/raw/ff33363e002cb21c911ae2260bf0f8d12e493c05/issue-2145-after-dismiss.svg) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:45 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5488
No description provided.