[PR #6210] [MERGED] fix: show slash-command arguments in helpers and guides #7092

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6210
Author: @SpicyMarinara
Created: 9/14/2026
Status: ✅ Merged
Merged: 9/14/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/slash-command-usage


📝 Commits (4)

  • 9304772 docs: record slash-command usage improvements
  • b1a155f fix: show slash usage and support range-first character hiding
  • 1e9655d Merge remote-tracking branch 'origin/staging' into fix/slash-command-usage
  • e685ec9 fix: disambiguate numeric hide targets and clarify undo

📊 Changes

9 files changed (+413 additions, -49 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/chats/messages.md (+1 -1)
📝 docs/chats/slash-commands.md (+45 -17)
📝 e2e/roleplay-commands.e2e.ts (+78 -0)
📝 packages/client/src/components/chat/ChatInput.tsx (+6 -3)
📝 packages/client/src/components/chat/ConversationInput.tsx (+11 -4)
📝 packages/client/src/lib/slash-commands.ts (+53 -22)
📝 packages/client/src/localization/locales/en.json (+22 -2)
➕ scripts/regressions/slash-command-usage.regression.ts (+196 -0)

📄 Description

Linked issue

Closes #6209

Why this change

Typing /as showed only its name and description, leaving users to guess the character name and optional message arguments. Other commands had the same discoverability problem. This adds readable argument formats to the existing suggestions and guides, and supports the requested /hide [range] [name (optional)] order.

What changed

  • Reuse command usage metadata in Roleplay and Conversation suggestions and /help, with localized placeholders and explicit optional inputs. Keep syntax and descriptions readable on mobile.
  • Keep selection and aliases inserting only the command, without placeholder text. Conversation status suggestions also show the optional name argument.
  • Accept range-first character-targeted /hide while preserving global hiding, legacy name-first commands, and existing character visibility storage. Reject unknown or ambiguous targets without changing messages.
  • Update command formats/examples in the slash-command and message guides. /unhide retains its existing global behavior; the guide points to the visibility chooser for undoing character-specific hiding.
  • Add an Unreleased changelog entry. No dependencies or version changes.

Validation

  • pnpm check passes: localization, formatting, lint/types and production build.

  • slash-command-usage.regression.ts reproduces the missing range-first execution before the fix and passes afterward. It verifies character-specific append-only writes, legacy syntax, quoted/numeric names, invalid or ambiguous targets with no writes, global hiding in both modes, idempotence, and unchanged /unhide behavior.

  • Existing conversation-game slash and dice-notation regressions pass. Localized usage/help and package command fallback are covered.

  • Focused pnpm smoke:ui e2e/roleplay-commands.e2e.ts --grep "Slash command argument syntax": 6/6 pass across desktop Chromium, mobile Chromium and mobile WebKit, covering both chat modes. Checks /help, required/optional syntax, alias/plain command insertion, status hints, and viewport bounds.

  • Before/after screenshots use synthetic empty chats. No model/provider calls or real user data.

  • 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 verify slash suggestions and argument hints in Roleplay and Conversation on a physical mobile device. Confirm range-first /hide and legacy saved commands in an existing group Roleplay chat. The regression fixtures use synthetic data and no paid model calls.

Docs and release impact

Updated docs/chats/slash-commands.md, docs/chats/messages.md, and CHANGELOG.md. Translated documentation follow-up: #6211. UI usage strings are added to canonical English; community locales fall back to English.

UI evidence

Before/after command suggestion screenshots (self-contained HTML; download and open to view embedded images).

Summary by CodeRabbit

  • New Features

    • Slash-command suggestions and help now display argument formats, including optional inputs and alternatives.
    • Added clearer usage guidance and examples for commands such as /hide, /unhide, /selfie, and /status.
    • /hide supports message ranges with optional character names in Roleplay chats.
    • Added /games and /selfie to Conversation-mode commands.
  • Documentation

    • Expanded slash-command and message documentation with argument syntax, range behavior, and hiding examples.
  • Bug Fixes

    • Improved command suggestion layout so usage text wraps and remains visible within the chat window.
    • Added clearer handling and feedback for targeted hide and unhide commands.

🔄 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/6210 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/14/2026 **Status:** ✅ Merged **Merged:** 9/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/slash-command-usage` --- ### 📝 Commits (4) - [`9304772`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9304772d439f7a8816a71fb138f6e408623e21e6) docs: record slash-command usage improvements - [`b1a155f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b1a155fab2cbee375c52483a2f3b441902be55f2) fix: show slash usage and support range-first character hiding - [`1e9655d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1e9655dc516dd3e63a7750797d0bec3f163da287) Merge remote-tracking branch 'origin/staging' into fix/slash-command-usage - [`e685ec9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e685ec9fd92dd213f5686338e8f6cfafe9dd1fd2) fix: disambiguate numeric hide targets and clarify undo ### 📊 Changes **9 files changed** (+413 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/chats/messages.md` (+1 -1) 📝 `docs/chats/slash-commands.md` (+45 -17) 📝 `e2e/roleplay-commands.e2e.ts` (+78 -0) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+6 -3) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+11 -4) 📝 `packages/client/src/lib/slash-commands.ts` (+53 -22) 📝 `packages/client/src/localization/locales/en.json` (+22 -2) ➕ `scripts/regressions/slash-command-usage.regression.ts` (+196 -0) </details> ### 📄 Description ## Linked issue Closes #6209 ## Why this change Typing `/as` showed only its name and description, leaving users to guess the character name and optional message arguments. Other commands had the same discoverability problem. This adds readable argument formats to the existing suggestions and guides, and supports the requested `/hide [range] [name (optional)]` order. ## What changed - Reuse command usage metadata in Roleplay and Conversation suggestions and `/help`, with localized placeholders and explicit optional inputs. Keep syntax and descriptions readable on mobile. - Keep selection and aliases inserting only the command, without placeholder text. Conversation status suggestions also show the optional name argument. - Accept range-first character-targeted `/hide` while preserving global hiding, legacy name-first commands, and existing character visibility storage. Reject unknown or ambiguous targets without changing messages. - Update command formats/examples in the slash-command and message guides. `/unhide` retains its existing global behavior; the guide points to the visibility chooser for undoing character-specific hiding. - Add an Unreleased changelog entry. No dependencies or version changes. ## Validation - `pnpm check` passes: localization, formatting, lint/types and production build. - `slash-command-usage.regression.ts` reproduces the missing range-first execution before the fix and passes afterward. It verifies character-specific append-only writes, legacy syntax, quoted/numeric names, invalid or ambiguous targets with no writes, global hiding in both modes, idempotence, and unchanged `/unhide` behavior. - Existing conversation-game slash and dice-notation regressions pass. Localized usage/help and package command fallback are covered. - Focused `pnpm smoke:ui e2e/roleplay-commands.e2e.ts --grep "Slash command argument syntax"`: 6/6 pass across desktop Chromium, mobile Chromium and mobile WebKit, covering both chat modes. Checks `/help`, required/optional syntax, alias/plain command insertion, status hints, and viewport bounds. - Before/after screenshots use synthetic empty chats. No model/provider calls or real user data. - [ ] `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 verify slash suggestions and argument hints in Roleplay and Conversation on a physical mobile device. Confirm range-first `/hide` and legacy saved commands in an existing group Roleplay chat. The regression fixtures use synthetic data and no paid model calls. ## Docs and release impact Updated `docs/chats/slash-commands.md`, `docs/chats/messages.md`, and `CHANGELOG.md`. Translated documentation follow-up: #6211. UI usage strings are added to canonical English; community locales fall back to English. ## UI evidence [Before/after command suggestion screenshots](https://gist.github.com/SpicyMarinara/1c4bce3d775595e180fb75d56f237203) (self-contained HTML; download and open to view embedded images). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Slash-command suggestions and help now display argument formats, including optional inputs and alternatives. - Added clearer usage guidance and examples for commands such as `/hide`, `/unhide`, `/selfie`, and `/status`. - `/hide` supports message ranges with optional character names in Roleplay chats. - Added `/games` and `/selfie` to Conversation-mode commands. - **Documentation** - Expanded slash-command and message documentation with argument syntax, range behavior, and hiding examples. - **Bug Fixes** - Improved command suggestion layout so usage text wraps and remains visible within the chat window. - Added clearer handling and feedback for targeted hide and unhide commands. <!-- 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:28 +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#7092
No description provided.