mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6266] [MERGED] feat(game): hybrid tactical terrain and movement capabilities #7112
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6266
Author: @kolacheee
Created: 9/16/2026
Status: ✅ Merged
Merged: 9/17/2026
Merged by: @kolacheee
Base:
staging← Head:codex/hybrid-tactical-terrain📝 Commits (10+)
2c94bc6docs: record approved combat terrain and rules roadmap (#6265)fff1844feat(game): add hybrid tactical terrain and movement (#6265)9326e14refactor(game): reuse pinned combat style for battlefield art4b15163fix(game): harden terrain recovery and setup export validationb453b68fix(game): discard late tactical launch responses after navigation3e0854dfix(game): preserve terrain validation errors and input data84c1400fix(game): isolate tactical chat state and localize battlefield summaries4d956bcfix(game): align battlefield provenance and active combat context4c4a8f9fix(game): retain readable size labels for malformed saved settings4880d5erefactor(game): derive barrier legality from terrain data📊 Changes
29 files changed (+3068 additions, -124 deletions)
View changed files
📝
AGENTS.md(+1 -0)📝
CHANGELOG.md(+4 -0)➕
docs/development/game-combat-roadmap.md(+66 -0)📝
docs/game/combat.md(+37 -6)📝
docs/game/getting-started.md(+3 -1)📝
e2e/game-experience-setup.e2e.ts(+73 -0)➕
e2e/game-hybrid-terrain.e2e.ts(+401 -0)➕
e2e/game-terrain-restore.e2e.ts(+459 -0)📝
packages/client/src/components/game/GameSetupWizard.tsx(+138 -10)📝
packages/client/src/components/game/GameSurface.tsx(+120 -29)📝
packages/client/src/components/game/TacticalCombatUI.tsx(+159 -25)📝
packages/client/src/hooks/use-game.ts(+2 -0)📝
packages/client/src/lib/game-setup-share.ts(+87 -8)📝
packages/client/src/localization/locales/en.json(+46 -2)📝
packages/server/src/routes/encounter.routes.ts(+43 -1)📝
packages/server/src/routes/game.routes.ts(+67 -17)📝
packages/server/src/services/game/gm-prompts.ts(+12 -0)➕
packages/server/src/services/game/tactical-battlefield.service.ts(+124 -0)📝
packages/server/src/services/generation/game-gm-prompt-runtime.ts(+33 -3)➕
packages/shared/src/features/tactical-combat/battlefield-summary.ts(+69 -0)...and 9 more files
📄 Description
Linked issue
Closes #6265. Owned by @kolacheee with Astra coordinating Sol, Terra, and GPT-5.5 implementation/review work. Targets
staging.Why this change
Tactical Game Mode already has a grid, but its generated terrain cannot reflect player guidance and a bounded GM terrain brief. Units with established flight or teleportation also follow ordinary walking rules. This adds scene-aware, reproducible battlefields and distinct movement capabilities while preserving older setups and saves.
What changed
This is a flat-grid movement/terrain increment. Full summoning, 5e/V20 rules, individual initiative, altitude/ceilings, spell-specific teleport costs, and ranged line of sight remain future work; the roadmap documents their boundaries and prior work.
Validation
Observed local results for this change:
pnpm check: passed on025442b17(localization, formatting, lint/types, and production build). One existing GameNarration hook-dependency warning remains outside this change.node scripts/run-regressions.mjs --filter hybrid-terrain: all 3 suites passed after the review fixes, including real route validation, legacy generation, legal/illegal movement, terrain bonuses, setup round trips, pinned GM prompt rules, and rejection of malformed persisted battlefield grids.pnpm regression:prompt: all three prompt lanes passed again after the saved-grid summary validation fix.4c4a8f9c(not the current head);/api/healthreturned healthy and the web root served the client shell. The documented private-network opt-in was used only inside the disposable smoke container; its container and volume were removed.025442b17with three non-actionable suggestions, dismissed against the code and existing tests below. No additional review loop is needed under the maintainer's clarified policy. GitHub CodeRabbit and required CI remain merge gates.Local pass 17 dispositions:
parseGameSetupShareFileJson, which already rejects unknown sizes and oversized/non-string guidance before any state update. The setup regression covers these invalid imports. Silently replacing or truncating them would weaken the existing error contract.battlefieldErrorto the initial launch effect dependencies: the soleGameSurfacecaller sets terrain errors together with combatants before mounting the chat-keyed tactical UI. The post-mount error change clears it after accepting a fallback board; rerunning the initial launch at that point could start another battle before saved metadata refreshes. The existing mount-only launch and explicit recovery preserve the current caller contract.Additional review-fix proof: valid battlefield summaries are byte-for-byte unchanged; seven malformed-grid inputs reproduced incorrect summaries before the fix and now return no context. A forced delayed-request failure reproduced an unhandled rejection before the test-helper fix; afterward both returned promises retain the original error with zero unhandled rejections.
The following boxes remain a human contributor's checklist, not automated proof:
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated real-browser flows and their screenshots were inspected during implementation. Human follow-up:
CI failure triage
On
616c5f451, one mobile-WebKit dice-turn case timed out on the visible Close Chat Settings button; the separatemobile-webkitfailure is the aggregate verdict. Filed #6269 with the trace and passing controls on the PR base and earlier terrain head. The dice test and settings drawer are unchanged between the green feature head and failing head; GameSurface changes in that interval are comments only. Evidence supports a test/browser actionability flake, with the underlying timing cause still unconfirmed. The unrelated dice test is unchanged in this patch. The pushed fixes trigger fresh CI; this triage does not bypass merge gates.Docs and release impact
Updated
docs/game/combat.md,docs/game/getting-started.md,docs/development/game-combat-roadmap.md, andCHANGELOG.md. Translation follow-up: #6267. No release/version bump.docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence
Before/after browser gallery. Download the gist ZIP and open
browser-evidence.html; it embeds the original PNG captures and requires no network or scripts. Includes desktop/mobile setup, a flying unit on a wall, and explicit terrain fallback. Before captures use the original staging wizard atb659229c2e9c7c30d6e3d0e0921f583297dca96e. Synthetic game data only; no screenshot assets are committed to the repository.Summary by CodeRabbit
New Features
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.