[PR #4623] [MERGED] feat: unify step-by-step and instant travel #6447

Closed
opened 2026-10-23 04:10:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4623
Author: @thetopham
Created: 8/5/2026
Status: ✅ Merged
Merged: 8/5/2026
Merged by: @thetopham

Base: staging ← Head: agent/4618-movement-modes-engine


📝 Commits (10+)

  • aa124bf feat: add hierarchical map movement modes
  • bb40d3f fix: harden routed movement reconciliation
  • 5406bac Merge branch 'staging' into agent/4618-movement-modes-engine
  • 7d1f0d1 Merge branch 'staging' into agent/4618-movement-modes-engine
  • 2a6e0f2 Merge remote-tracking branch 'origin/staging' into agent/4618-movement-modes-engine
  • 00986ff fix: harden spatial travel recovery
  • 45fbf8b Merge branch 'staging' into agent/4618-movement-modes-engine
  • d89f182 fix: preserve suppressed spatial directive turns
  • 460f0b4 Merge branch 'staging' into agent/4618-movement-modes-engine
  • a1ea001 Merge branch 'staging' into agent/4618-movement-modes-engine

📊 Changes

15 files changed (+746 additions, -86 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/chat/CyoaChoices.tsx (+35 -17)
➕ packages/client/src/components/chat/cyoa-choice-submission.ts (+32 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+7 -2)
➕ packages/client/src/hooks/spatial-owner-turn-recovery.ts (+25 -0)
📝 packages/client/src/hooks/use-generate.ts (+68 -15)
📝 packages/client/src/hooks/use-spatial-context.ts (+41 -3)
📝 packages/server/src/routes/generate.routes.ts (+41 -27)
📝 packages/server/src/routes/generate/spatial-transition-request.ts (+23 -2)
📝 packages/server/src/services/spatial-context/owner-turn.ts (+16 -4)
📝 packages/server/src/services/spatial-context/state-resolution.ts (+17 -2)
📝 packages/shared/src/schemas/spatial-context.schema.ts (+6 -1)
📝 packages/shared/src/types/spatial-context.ts (+30 -0)
📝 packages/shared/src/utils/spatial-context.ts (+123 -4)
📝 scripts/regressions/spatial-context.regression.ts (+281 -9)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #4618

Paired World Maps package PR: Pasta-Devs/Marinara-Agents#250

Why this change

Queued navigation needs one explicit, server-owned contract across Roleplay and Game. Previously, typed input and CYOA choices could take different submit paths, route state could advance ambiguously after failures, and the model did not receive a distinct canonical movement event for the accepted turn.

What changed

  • Added explicit step_by_step and travel_now travel modes with bounded server-owned directed route validation.
  • Kept movement to one canonical mutation per accepted turn and exposed accepted route facts to package prompts.
  • Forwarded queued movement through Game and Roleplay CYOA submissions, including impersonated Roleplay choices.
  • Added command-ID recovery for ambiguous failures and rebased stepwise drafts from authoritative state with rotated command IDs.
  • Preserved failed routes for retry and prevented duplicate movement after a committed turn.
  • Expanded spatial regressions for adjacent, multi-node, wrong-way, hidden, blocked, archived, disconnected, typed, CYOA, failure, and retry paths.

Automated validation performed

  • Client, server, and shared lint checks
  • Localization validation
  • Full production build
  • Spatial-context regression suite
  • Location-reference regression suite
  • git diff --check
  • Paired exact World Maps 1.3.2 artifact lifecycle regression

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually install the exact paired World Maps 1.3.2 artifact from Pasta-Devs/Marinara-Agents#250.
  • In Roleplay and Game, queue a multi-node route and verify Step by step advances one location per accepted typed or CYOA turn.
  • Switch to Travel now and verify one accepted typed or CYOA turn reaches the validated destination.
  • Verify a failed generation keeps the route available for retry and one-way wrong-way travel is rejected.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Pending manual browser review after exact local installation.

Summary by CodeRabbit

  • New Features

    • Added immediate or step-by-step travel across connected locations.
    • Routes now resolve automatically, with unreachable destinations rejected.
    • Travel progress and route details are preserved during choices and generation.
    • Added directional discovery links for more precise navigation.
  • Bug Fixes

    • Improved recovery for interrupted spatial transitions.
    • Prevented conflicting updates while travel is queued or underway.
    • Committed movement after accepted turns.
  • Tests

    • Expanded coverage for travel, routing, recovery, and queued transitions.

🔄 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/4623 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 8/5/2026 **Status:** ✅ Merged **Merged:** 8/5/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `agent/4618-movement-modes-engine` --- ### 📝 Commits (10+) - [`aa124bf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/aa124bf1b0f53f83d2d07374f9e371ebb251d073) feat: add hierarchical map movement modes - [`bb40d3f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb40d3feba0cb96062526f19e11fbe3a97ced9c9) fix: harden routed movement reconciliation - [`5406bac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5406bac9ad6468ec2ab8974d8f3a77284cc8525d) Merge branch 'staging' into agent/4618-movement-modes-engine - [`7d1f0d1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7d1f0d1ea4df9c98bddf5cc3bafeeb1a8332da7b) Merge branch 'staging' into agent/4618-movement-modes-engine - [`2a6e0f2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2a6e0f2e2320f4467ea8f5794b66f4f98ac38347) Merge remote-tracking branch 'origin/staging' into agent/4618-movement-modes-engine - [`00986ff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/00986ff5bfdcd5705d70c7fca8d8ade86665b217) fix: harden spatial travel recovery - [`45fbf8b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/45fbf8bdadd42d039f01db6021ef1335958ad9dd) Merge branch 'staging' into agent/4618-movement-modes-engine - [`d89f182`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d89f182ec4d381108a7ab395eb4532c20fc672ef) fix: preserve suppressed spatial directive turns - [`460f0b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/460f0b4805e4d3688b0f43d599c260d57beb19fe) Merge branch 'staging' into agent/4618-movement-modes-engine - [`a1ea001`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a1ea00163b6d36c1bb12c83a786646d8d602f8c1) Merge branch 'staging' into agent/4618-movement-modes-engine ### 📊 Changes **15 files changed** (+746 additions, -86 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/chat/CyoaChoices.tsx` (+35 -17) ➕ `packages/client/src/components/chat/cyoa-choice-submission.ts` (+32 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+7 -2) ➕ `packages/client/src/hooks/spatial-owner-turn-recovery.ts` (+25 -0) 📝 `packages/client/src/hooks/use-generate.ts` (+68 -15) 📝 `packages/client/src/hooks/use-spatial-context.ts` (+41 -3) 📝 `packages/server/src/routes/generate.routes.ts` (+41 -27) 📝 `packages/server/src/routes/generate/spatial-transition-request.ts` (+23 -2) 📝 `packages/server/src/services/spatial-context/owner-turn.ts` (+16 -4) 📝 `packages/server/src/services/spatial-context/state-resolution.ts` (+17 -2) 📝 `packages/shared/src/schemas/spatial-context.schema.ts` (+6 -1) 📝 `packages/shared/src/types/spatial-context.ts` (+30 -0) 📝 `packages/shared/src/utils/spatial-context.ts` (+123 -4) 📝 `scripts/regressions/spatial-context.regression.ts` (+281 -9) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #4618 Paired World Maps package PR: Pasta-Devs/Marinara-Agents#250 ## Why this change Queued navigation needs one explicit, server-owned contract across Roleplay and Game. Previously, typed input and CYOA choices could take different submit paths, route state could advance ambiguously after failures, and the model did not receive a distinct canonical movement event for the accepted turn. ## What changed - Added explicit `step_by_step` and `travel_now` travel modes with bounded server-owned directed route validation. - Kept movement to one canonical mutation per accepted turn and exposed accepted route facts to package prompts. - Forwarded queued movement through Game and Roleplay CYOA submissions, including impersonated Roleplay choices. - Added command-ID recovery for ambiguous failures and rebased stepwise drafts from authoritative state with rotated command IDs. - Preserved failed routes for retry and prevented duplicate movement after a committed turn. - Expanded spatial regressions for adjacent, multi-node, wrong-way, hidden, blocked, archived, disconnected, typed, CYOA, failure, and retry paths. ## Automated validation performed - Client, server, and shared lint checks - Localization validation - Full production build - Spatial-context regression suite - Location-reference regression suite - `git diff --check` - Paired exact World Maps 1.3.2 artifact lifecycle regression ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually install the exact paired World Maps 1.3.2 artifact from Pasta-Devs/Marinara-Agents#250. - In Roleplay and Game, queue a multi-node route and verify Step by step advances one location per accepted typed or CYOA turn. - Switch to Travel now and verify one accepted typed or CYOA turn reaches the validated destination. - Verify a failed generation keeps the route available for retry and one-way wrong-way travel is rejected. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Pending manual browser review after exact local installation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added immediate or step-by-step travel across connected locations. * Routes now resolve automatically, with unreachable destinations rejected. * Travel progress and route details are preserved during choices and generation. * Added directional discovery links for more precise navigation. * **Bug Fixes** * Improved recovery for interrupted spatial transitions. * Prevented conflicting updates while travel is queued or underway. * Committed movement after accepted turns. * **Tests** * Expanded coverage for travel, routing, recovery, and queued transitions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:10:32 +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#6447
No description provided.