mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6196] [CLOSED] feat(game): host an Experience's toggle and world seed inside the setup wizard (Capability API 1.17 setup block) #7088
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#7088
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/6196
Author: @kolacheee
Created: 9/14/2026
Status: ❌ Closed
Base:
staging← Head:feat/experience-setup-seam📝 Commits (10+)
8daea55feat(capabilities): add Experience setup manifest vocabulary (CAPI 1.17)6416113feat(game): let the setup wizard own the Experience selectiona7b6623feat(game): collect and carry the Experience's world seed3e59bfffeat(game): apply and explain an Experience's declared setup requirement09d1e59feat(game): restate the Experiences block for the shared setup wizard88eabb2test(game): pin the Experience setup seam end to end and in three lanes8eebc12test(game): skip the setup seam spec before a browser is launchedf19c405fix(game): keep Escape from dismissing setup under a stacked dialog4936e1cfix(game): accept only whole-number seeds6c098affix(capabilities): carry unreadable installed packages through registry writes📊 Changes
18 files changed (+1738 additions, -278 deletions)
View changed files
📝
CHANGELOG.md(+9 -0)📝
docs/development/optional-agent-packages.md(+69 -1)➕
e2e/setup-wizard-experience.e2e.ts(+288 -0)📝
packages/client/src/components/game/GameSetupWizard.tsx(+294 -37)📝
packages/client/src/components/game/GameSurface.tsx(+48 -14)➕
packages/client/src/components/game/LegacyExperienceSetupDialog.tsx(+219 -0)📝
packages/client/src/components/game/NewGameExperienceChooser.tsx(+66 -218)📝
packages/client/src/components/ui/Modal.tsx(+11 -0)➕
packages/client/src/lib/game-experience-seed.ts(+38 -0)➕
packages/client/src/lib/modal-overlay-registry.ts(+47 -0)📝
packages/client/src/localization/locales/en.json(+9 -2)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+45 -4)📝
packages/shared/src/schemas/capability-package.schema.ts(+116 -1)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+110 -0)📝
scripts/regressions/experience-setup-config.regression.ts(+72 -1)➕
scripts/regressions/game-experience-seed.regression.ts(+104 -0)➕
scripts/regressions/game-setup-experience-config.regression.ts(+95 -0)➕
scripts/regressions/setup-escape-overlay-guard.regression.ts(+98 -0)📄 Description
Linked issue
Closes #6181
Why this change
Today, turning on a downloaded Experience in the game setup wizard replaces the wizard. The player picks an Experience and the six remaining steps disappear, so the Party step becomes unreachable and the Experience has to ask again, in its own dialog, for everything it needs. That is two setup forms for one game, with settings the wizard already owns duplicated or silently dropped.
This change makes the wizard the single setup surface. An Experience no longer takes the form away. It declares in its manifest what it needs, and the Engine draws those few controls inside the Experiences block while every ordinary step stays where it was. This is the Engine half of the Pixelforge maintainer's ruling that there should be no separate Pixelforge creation menu, only a seed the player can edit or randomize in the Experiences block.
Things a reviewer should know before reading the diff:
gameExperienceId, and one of them throws the built config away, so a player could flip the toggle, press Start, and have nothing happen.prepareBeforeStart; this one adds thesetupblock under the same 1.17, with both described on one ladder line, so a package that declares 1.17 can use either. Nothing reads the declaredcapabilityApito gate the seam; the Engine reads a declaredsetupblock regardless of the version a package claims. What refuses asetup-carrying manifest on an older Engine is the strict manifest schema: the catalog entry is dropped at parse with only a server-side warning.runSetupon a chat that has a game id but no generated world) discards the freshly built setup config; re-entering setup on an existing Experience game overwrites essentially the whole stored config with wizard defaults, because the wizard never hydrates from the chat;GameSessionStatusdeclares"setup" | "active" | "concluded"while the server writes and compares"ready"; andPATCH /chats/:id/metadatamerges its body with no validation, which is why the experience-state read re-validates the id every time. The new seed field is creation-only, so this PR adds no exposure there. One more, noticed while fixing Escape: the modal overlay isz-[10000]while both setup panels arez-[10001], so the malformed-JSON repair dialog may render behind the setup panel it belongs over. Pre-existing and untouched.What changed
contributions.gameSurfacegains an optional strictsetupblock:seed(a key inside the package's ownexperienceConfig, plus an optional label),config(flat scalar literals the host writes without interpreting) andrequires, a closed single-key object holdingenableCustomWidgets. A manifest whoseconfignames its own seed key is refused at parse.supportedCapabilityApimoves to 1.17 with a ladder line, and the seven existing pins move with it. Nothing in the vocabulary can touch Agents; that is the player's setting.GameSurfacerenders the wizard directly. The wizard resolves the installed game-surface packages itself and renders the Experiences chooser into its first step. The chooser is controlled and presentational, with no package id literal in it. While an Experience is active the block is forced open and its collapse control is disabled. All seven steps stay mounted, so the Party step is reachable again.LegacyExperienceSetupDialogcarries the pre-seam behaviour: when an active game-surface package declares nosetupblock, the Engine hands the whole form to the package exactly as it does today. It keys off the absence of the declaration, never off a package id or version. Please do not remove this in review. An Experience published before this change, including the shipped Pixelforge 0.16.6, has nosetupblock and would otherwise have no setup surface between this merge and the package release.setup.seed, the Engine draws a numeric seed field under the active Experience row, with a randomize button whose label says it overwrites a typed value. The seed is a number, rolled once per mount. Only a run of digits is accepted; anything else turns the field red and blocks Start with its own message, so the number on screen is always the number the world is built from.setupis active. The step-5 block, the template picker, every map arm of the setup config and the map plan behave exactly as they do when no map workflow was chosen.buildSetupConfigappends one conditional spread carryinggameExperienceIdandexperienceConfig, gated on both an active Experience and a new game. Declared literals spread first, the seed last. With no Experience active neither key appears at all, not even asundefined, which matters because the stored config is merged as{ ...stored, ...submitted }.docs/development/optional-agent-packages.mdgains a second Capability API 1.17 section, for the setup block, beside the one #6188 added, and corrects the 1.8 paragraph. New coverage: an end-to-end spec driving a fixture Experience through the wizard plus a second fixture proving the legacy path; a source pin on the two emitted keys; a pin on the seed coercion contract; a server leg proving a classic-shaped payload stamps the chat's top-levelgameExperienceIdand answers the first experience-state read; and a lane over the overlay registry and the registry carry-through.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run before opening: every piece of
pnpm check,pnpm version:check,git diff --check, the regression lanescapability-package-lifecycle,capability-gm-verb-runtime,experience-setup-config,game-experience-seed,game-setup-experience-config,setup-escape-overlay-guard,prompt,assigned-issue-sweepandopen-issues, and the new e2e spec on desktop-chromium. The mobile-webkit Playwright project cannot launch on the author's Fedora host (Playwright's WebKit needs Ubuntu 24.04 libraries), so that lane is proven by CI only, and a reviewer should require those shards green before merge.Walked on an isolated build of this branch with the shipped Pixelforge 0.16.6 package installed, once with its manifest as shipped (legacy path) and once with a
setupblock added to its registry row (seam path):Still to verify by hand:
setupis active, and that creating the game queues no map draft and arms no map-builder handoff.gameExperienceIdand the numeric seed, and confirm the Experience's first experience-state read is answered rather than refused.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/development/optional-agent-packages.mdgains the Capability API 1.17 section and corrects the 1.8 paragraph;CHANGELOG.mdcarries the entries. The[docs-i18n]follow-up for the docs page is batched with the other pending pages rather than filed per PR. No version bump.UI evidence (if applicable)
Screenshots of the seam path (seed field under the active row, the requirement line on the Features step) and the legacy dialog to be added by the author.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.