mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8121] [MERGED] Add a pluggable combat-style seam to the game surface #8115
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#8115
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/8121
Author: @kolacheee
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-71u921📝 Commits (8)
3d8c63dAdd a pluggable combat-style seam to the game surface (#8109)38db48dGuard and save a style-owned combat start (#8109 review)a77b0bbMerge remote-tracking branch 'origin/staging' into claude/project-thread-71u92127aa2f9Merge remote-tracking branch 'origin/staging' into claude/project-thread-71u921531193aRelease the style-start latch and save before entering combat (#8109 review)fa78a7aTreat a party-less save as stale unless its style can report the fight (#8109 review)20bf09dMerge remote-tracking branch 'origin/staging' into claude/project-thread-71u921aa4a026Ask the style whether a party-less save is still live (#8109 review)📊 Changes
10 files changed (+603 additions, -80 deletions)
View changed files
📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+4 -3)📝
packages/client/src/components/game/GameSetupWizard.tsx(+2 -1)📝
packages/client/src/components/game/GameSurface.tsx(+144 -71)➕
packages/client/src/components/game/combat-styles.tsx(+238 -0)📝
packages/client/src/features/chat-settings/sections/CombatStyleSection.tsx(+8 -0)📝
packages/server/src/routes/game.routes.ts(+8 -1)📝
packages/server/src/services/generation/game-gm-prompt-runtime.ts(+2 -1)📝
packages/shared/src/features/world/game-intro.ts(+3 -1)📝
packages/shared/src/types/game.ts(+10 -2)➕
scripts/regressions/combat-style-registry.regression.ts(+184 -0)📄 Description
Linked issue
Closes #8109
Why this change
GameSurface.tsxbranched on the closed"classic" | "tactical"union wherever combat touched it: the start of a fight, the battle UI it mounts, the top-chrome offset and the "is a fight on screen" check. There was no seam a combat style could plug into, so adding one meant hand-editing the same 14k-line file in all of those places, which is also where nearly all of the rebase conflicts land for anyone carrying an extra style (see #8109).What changed
packages/client/src/components/game/combat-styles.tsx). A style can provide:start(): return true to take over the start of a fight, which skips the classic generation pass.render(): the battle UI mounted in place of the built-in one.ownsTopChrome: the style draws its own top bar, so the HUD and controls move below--tactical-chrome-height.isActive()/subscribe(): lets a style that keeps its own state (outside the generated party and enemies) count as an active fight, so the map, party and other overlays hide for it like they do for the built-ins.GameSurfacenow asks the active style instead of naming one. The two built-in UI components are lazy-loaded from the registry, and the director keeps running the built-in styles and a ruleset's own fights as before.GameCombatStyleis now the built-in styles plus any registered id (BUILT_IN_GAME_COMBAT_STYLESin shared). An id the client does not know plays as classic. The game setup route accepts any well-formed style id. Experience setup defaults still name built-in styles only, so the Capability API surface is unchanged.combat-style-registry.regression.tscovers the registry (built-ins, unknown ids, registering and removing styles) and checks that the surface goes through the seam.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run results: every
pnpm checkstep passes (impeccable, localization, format, lint, e2e/token types, build), with one pre-existing lint warning inHomeProfessorMariChat.tsx. In the full regression run, 1020 of 1024 passed, including the newcombat-style-registry. The four that failed are sandbox-only failures in files this PR does not touch:launcher-browser-ready(no IPv6::1),capability-server-externals(tmp-dirrmSync),mari-guard-sibling-pathsandstorage-writer-lock.Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
No visible change: Classic and Tactical look and behave as before.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.