[PR #4371] [MERGED] fix(chat): hide spatial-only message anchors #6350

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

📋 Pull Request Information

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

Base: staging ← Head: fix/spatial-only-blank-message-4366


📝 Commits (3)

  • 6eefa28 fix(chat): hide spatial-only message anchors
  • 0e9c868 Merge remote-tracking branch 'origin/staging' into fix/spatial-only-blank-message-4366
  • 1c76367 Merge branch 'staging' into fix/spatial-only-blank-message-4366

📊 Changes

6 files changed (+124 additions, -15 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+52 -0)
📝 package.json (+1 -1)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+2 -7)
📝 packages/client/src/hooks/use-generate.ts (+3 -7)
➕ packages/client/src/lib/chat-message-visibility.ts (+20 -0)
➕ scripts/regressions/spatial-only-message-visibility.regression.ts (+46 -0)

📄 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 #4366

Why this change

  • World Maps must persist an empty user-message anchor when a location transition is the only owner-turn action, but Roleplay rendered that implementation detail as a blank bubble.
  • The generation hook also treated a pending spatial transition as visible optimistic message content, so the empty bubble could appear before the persisted transcript was refreshed.

What changed

  • Skip optimistic user-message insertion when a turn has neither visible text nor attachments, without changing generation or spatial-transition submission.
  • Hide persisted contentless user anchors in the Roleplay transcript while retaining visible text, attachment-only messages, dice payloads, and explicitly visible assistant rows.
  • Add a focused regression to the Roleplay lane and desktop/mobile browser coverage for persisted transcript behavior.

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

  • Automated: pnpm check
  • Automated: pnpm regression:roleplay
  • Automated: pnpm exec playwright test e2e/core-flows.e2e.ts --grep "roleplay hides contentless user anchors" (desktop Chromium and mobile Chromium)
  • Manual browser verification remains for a human contributor.

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)

No documentation or release metadata changes are included.

UI evidence (if applicable)

  • Focused Playwright assertions cover the visible transcript on desktop and mobile. No screenshot is attached yet.

Summary by CodeRabbit

  • Bug Fixes

    • Improved chat message visibility so empty user messages are hidden while text, attachments, and dice-roll results remain visible.
    • Prevented spatial-transition-only events from displaying as empty user messages.
    • Preserved visibility for assistant messages and explicitly supported hidden-message markers in roleplay chats.
  • Tests

    • Added end-to-end and regression coverage for message visibility across text, attachments, metadata, and empty content scenarios.

🔄 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/4371 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/31/2026 **Status:** ✅ Merged **Merged:** 8/1/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `fix/spatial-only-blank-message-4366` --- ### 📝 Commits (3) - [`6eefa28`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6eefa2899724617bbd584d5a282772be0b39f5c3) fix(chat): hide spatial-only message anchors - [`0e9c868`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0e9c868a815ad63714cc25af5e4030a593f65081) Merge remote-tracking branch 'origin/staging' into fix/spatial-only-blank-message-4366 - [`1c76367`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1c763673ccc233ebd38f340dac0f1a0457847faa) Merge branch 'staging' into fix/spatial-only-blank-message-4366 ### 📊 Changes **6 files changed** (+124 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+52 -0) 📝 `package.json` (+1 -1) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+2 -7) 📝 `packages/client/src/hooks/use-generate.ts` (+3 -7) ➕ `packages/client/src/lib/chat-message-visibility.ts` (+20 -0) ➕ `scripts/regressions/spatial-only-message-visibility.regression.ts` (+46 -0) </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 #4366 ## Why this change - World Maps must persist an empty user-message anchor when a location transition is the only owner-turn action, but Roleplay rendered that implementation detail as a blank bubble. - The generation hook also treated a pending spatial transition as visible optimistic message content, so the empty bubble could appear before the persisted transcript was refreshed. ## What changed - Skip optimistic user-message insertion when a turn has neither visible text nor attachments, without changing generation or spatial-transition submission. - Hide persisted contentless user anchors in the Roleplay transcript while retaining visible text, attachment-only messages, dice payloads, and explicitly visible assistant rows. - Add a focused regression to the Roleplay lane and desktop/mobile browser coverage for persisted transcript behavior. ## Validation - [x] `pnpm check` passes locally - [ ] 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 - Automated: `pnpm check` - Automated: `pnpm regression:roleplay` - Automated: `pnpm exec playwright test e2e/core-flows.e2e.ts --grep "roleplay hides contentless user anchors"` (desktop Chromium and mobile Chromium) - Manual browser verification remains for a human contributor. ## 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) No documentation or release metadata changes are included. ## UI evidence (if applicable) - Focused Playwright assertions cover the visible transcript on desktop and mobile. No screenshot is attached yet. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved chat message visibility so empty user messages are hidden while text, attachments, and dice-roll results remain visible. * Prevented spatial-transition-only events from displaying as empty user messages. * Preserved visibility for assistant messages and explicitly supported hidden-message markers in roleplay chats. * **Tests** * Added end-to-end and regression coverage for message visibility across text, attachments, metadata, and empty content scenarios. <!-- 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:09:35 +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#6350
No description provided.