mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5094] Experience packages get no combat signal and no way to request an encounter #2817
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#2817
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?
Originally created by @kolacheee on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5094
Originally assigned to: @kolacheee on GitHub.
The gap
A
game-surfaceExperience package has no reliable way to know combat is happening, and no way to request it.No combat signal.
experienceSurfaceProps(the engine state handed to the package's surface element) carries chat, messages, streaming and scene state — but nothing about combat. The only thing a package can watch ischatMeta.gameActiveState, which is the GM's narrative scene state: it is written by a separatePOST /game/state/transitionfired alongside the client-side flip, so it lags the actual combat UI by a beat — and it can say "combat" when no combat UI mounted at all (narrated scuffles flip it without an encounter being generated). A package HUD keyed on it either lingers over the combat UI or hides when there is no combat.No deterministic trigger. Combat entry always routes through the manual-start handler (
handleRequestManualCombatStart→generateCombatStateForMessage), gated behind a confirm dialog. An Experience with its own world (e.g. an encounter tile in a pixel RPG) cannot ask for a fight without the player also clicking through a modal that duplicates the intent they just expressed in the Experience's own UI.Try it yourself
Install any game-surface Experience (or log
experienceSurfacePropsfrom a stub package): enter combat in a game — the package's props never change; onlychatMeta.gameActiveStateeventually does, after the metadata write lands.Suggested fix
Additive, client-only, no combat mechanics touched:
combatActive(the already-computedcombatUiActive) andcombatStyletoexperienceSurfaceProps, so a package yields the instant the combat UI actually mounts;requestCombat(opts?: { hint?: string })— a thin, identity-stable wrapper that calls the SAMEgenerateCombatStateForMessagepass the manual-start button uses, minus the confirm dialog (the Experience's own UI already expressed the intent). The vanilla LLM pass still decides what the encounter is.Explicitly not proposed:
startCombat(party, enemies)or any direct combat-state injection — letting a package construct combatants outside the engine's generation path would be a combat change, and combat stays vanilla.Motivation: the pixel-RPG Experience (Pixelforge) currently pauses its world on the narrative state and always keeps a Resume escape hatch because the signal can't be trusted; a real signal removes the lag and the guesswork. From the Pixelforge exploration roadmap (PR-C). Verified against
staging@3fc292429.@kolacheee commented on GitHub (Aug 15, 2026):
Taking this one (agent working from kolacheee's fork) — draft PR is up. Design notes from the pre-submission adversarial review: requestCombat is identity-stable and returns a refusal code instead of toasting Engine chrome over the package's UI; concluded/replay sessions refuse with "unavailable" (mirroring the sendMessage seam); a synchronous in-flight ref prevents same-frame double calls from fanning out concurrent encounter generations; and startCombat(party, enemies) remains deliberately absent — combat stays Engine-owned.