[PR #6057] [MERGED] fix(game): explain the locked composer after a concluded session and offer New Session inline #7042

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6057
Author: @Romuromylus
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/11/2026
Merged by: @Romuromylus

Base: staging ← Head: fix/6045-concluded-composer-cta


📝 Commits (5)

  • c095d95 fix(game): explain the locked composer after a concluded session and offer New Session inline
  • 472c96f fix(game): keep the concluded-session button icon-only on narrow composers
  • 136ca13 Merge remote-tracking branch 'pasta/staging' into fix/6045-concluded-composer-cta
  • a43471e Merge remote-tracking branch 'pasta/staging' into fix/6045-concluded-composer-cta
  • 20f6b03 chore(changelog): restore the line break lost while merging staging

📊 Changes

4 files changed (+57 additions, -10 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/game/GameInput.tsx (+48 -10)
📝 packages/client/src/components/game/GameSurface.tsx (+6 -0)
📝 packages/client/src/localization/locales/en.json (+2 -0)

📄 Description

Linked issue

Closes #6045

Why this change

After ending a Game Mode session (the summary generates and lands in the session history), the composer goes dead: the textarea is disabled but still shows the ordinary "What do you do?" placeholder, and nothing on the surface says why or how to continue. Reloading or restarting the engine changes nothing because the concluded status is persisted on the chat, so it reads as a permanent lock, which is what #6045 reports.

This is working as designed on the server side: gameSessionStatus: "concluded" makes GameSurface pass draftDisabled / disabled to GameInput, and the intended way forward is the New Session action. The problem is that the only New Session control lives inside the Session panel's History tab (a small icon button), so a player who has never opened that panel has no path back into play.

What changed

  • packages/client/src/components/game/GameInput.tsx: new optional sessionConcluded, onStartNewSession, and startNewSessionPending props. When the session is concluded the placeholder reads "Session concluded. Start a new session to keep playing." and a New Session button renders in the composer next to the textarea (spinner while the start request is in flight). Below the sm breakpoint the button is icon-only (with title and aria-label) so the placeholder keeps its room on phones. Nothing changes for ready/active sessions.
  • packages/client/src/components/game/GameSurface.tsx: both GameInput call sites pass sessionConcluded={!sessionInteractive}, onStartNewSession={handleStartNewSession} and startNewSessionPending={startSessionLocked}, so the composer button goes through the same handler as the Session panel (widget-preparation dialog when HUD widgets exist, in-flight guard, new-session chat creation).
  • packages/client/src/localization/locales/en.json: two new game.input.* strings.
  • CHANGELOG.md: Unreleased entry.

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

  • Before: on a Game Mode chat with gameSessionStatus: "concluded", stepped through the narration to the composer; the textarea was disabled with the "What do you do?" placeholder and no New Session control anywhere in the composer.
  • After (build from this branch on my production deploy): same chat, the composer shows the concluded placeholder and the New Session button, confirmed both from the rendered DOM (textarea placeholder text, button label) and visually.
  • Active session control: the composer is unchanged on a chat whose status is active.

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)

Before (staging build, concluded chat): disabled textarea with the ordinary "What do you do?" placeholder and no New Session control in the composer.

After (this branch on my deploy, same chat): placeholder "Session concluded. Start a new session to keep playing." with a New Session button rendered inline at the right of the textarea; the rest of the game surface (narration, choices, HUD) is unchanged.

Summary by CodeRabbit

  • New Features

    • Game Mode now clearly announces when a session has concluded.
    • The composer displays a New Session button to start another session.
    • A loading indicator appears while a new session is starting.
    • Added localized messaging for the concluded-session state and New Session action.
  • Documentation

    • Added an unreleased changelog entry describing the updated session conclusion experience.

🔄 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/6057 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/11/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `staging` ← **Head:** `fix/6045-concluded-composer-cta` --- ### 📝 Commits (5) - [`c095d95`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c095d9584a92eca57926a976a8e44e20eae8c5a8) fix(game): explain the locked composer after a concluded session and offer New Session inline - [`472c96f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/472c96fc26e2585a56944c3f72cd6404cfa08ccc) fix(game): keep the concluded-session button icon-only on narrow composers - [`136ca13`](https://github.com/Pasta-Devs/Marinara-Engine/commit/136ca136587c97d98f76b08f309c12f51c65c71d) Merge remote-tracking branch 'pasta/staging' into fix/6045-concluded-composer-cta - [`a43471e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a43471ec58be561cd1a33e48135ec2aace23781b) Merge remote-tracking branch 'pasta/staging' into fix/6045-concluded-composer-cta - [`20f6b03`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20f6b03711da1ffaaa6d74c1fb89aa75fe17c55e) chore(changelog): restore the line break lost while merging staging ### 📊 Changes **4 files changed** (+57 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/game/GameInput.tsx` (+48 -10) 📝 `packages/client/src/components/game/GameSurface.tsx` (+6 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) </details> ### 📄 Description ## Linked issue Closes #6045 ## Why this change After ending a Game Mode session (the summary generates and lands in the session history), the composer goes dead: the textarea is disabled but still shows the ordinary "What do you do?" placeholder, and nothing on the surface says why or how to continue. Reloading or restarting the engine changes nothing because the concluded status is persisted on the chat, so it reads as a permanent lock, which is what #6045 reports. This is working as designed on the server side: `gameSessionStatus: "concluded"` makes `GameSurface` pass `draftDisabled` / `disabled` to `GameInput`, and the intended way forward is the New Session action. The problem is that the only New Session control lives inside the Session panel's History tab (a small icon button), so a player who has never opened that panel has no path back into play. ## What changed - `packages/client/src/components/game/GameInput.tsx`: new optional `sessionConcluded`, `onStartNewSession`, and `startNewSessionPending` props. When the session is concluded the placeholder reads "Session concluded. Start a new session to keep playing." and a New Session button renders in the composer next to the textarea (spinner while the start request is in flight). Below the `sm` breakpoint the button is icon-only (with title and aria-label) so the placeholder keeps its room on phones. Nothing changes for ready/active sessions. - `packages/client/src/components/game/GameSurface.tsx`: both `GameInput` call sites pass `sessionConcluded={!sessionInteractive}`, `onStartNewSession={handleStartNewSession}` and `startNewSessionPending={startSessionLocked}`, so the composer button goes through the same handler as the Session panel (widget-preparation dialog when HUD widgets exist, in-flight guard, new-session chat creation). - `packages/client/src/localization/locales/en.json`: two new `game.input.*` strings. - `CHANGELOG.md`: Unreleased entry. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Before: on a Game Mode chat with `gameSessionStatus: "concluded"`, stepped through the narration to the composer; the textarea was disabled with the "What do you do?" placeholder and no New Session control anywhere in the composer. - After (build from this branch on my production deploy): same chat, the composer shows the concluded placeholder and the New Session button, confirmed both from the rendered DOM (textarea placeholder text, button label) and visually. - Active session control: the composer is unchanged on a chat whose status is `active`. ## Docs and release impact - [ ] No docs changes needed - [x] 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) Before (staging build, concluded chat): disabled textarea with the ordinary "What do you do?" placeholder and no New Session control in the composer. After (this branch on my deploy, same chat): placeholder "Session concluded. Start a new session to keep playing." with a New Session button rendered inline at the right of the textarea; the rest of the game surface (narration, choices, HUD) is unchanged. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Game Mode now clearly announces when a session has concluded. - The composer displays a **New Session** button to start another session. - A loading indicator appears while a new session is starting. - Added localized messaging for the concluded-session state and **New Session** action. - **Documentation** - Added an unreleased changelog entry describing the updated session conclusion experience. <!-- 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:16:00 +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#7042
No description provided.