[PR #782] [MERGED] Add Quick replies menu for guided actions #4771

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/782
Author: @Xelvanis
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/14/2026
Merged by: @Xelvanis

Base: main ← Head: feature/guided-generation-action


📝 Commits (6)

  • d561fbd feat(chat): add quick replies for guided actions
  • bc1231b fix: preserve quick reply drafts on failure
  • 362a0e9 fix: align guided replies with chat lorebook scans
  • c25bb34 fix: resolve quick reply review follow-ups
  • 15d9535 fix: keep attachment drafts scoped to chats
  • 1450801 Merge origin/main into guided generation branch

📊 Changes

18 files changed (+1647 additions, -260 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/FAQ.md (+16 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -0)
📝 packages/client/src/components/chat/ChatInput.tsx (+420 -75)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+78 -78)
📝 packages/client/src/components/chat/ConversationInput.tsx (+452 -71)
➕ packages/client/src/components/chat/QuickReplyMenu.tsx (+263 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+1 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+163 -2)
📝 packages/client/src/hooks/use-generate.ts (+1 -0)
📝 packages/client/src/lib/slash-commands.ts (+8 -1)
📝 packages/client/src/stores/ui.store.ts (+36 -1)
📝 packages/server/src/routes/chats.routes.ts (+35 -1)
📝 packages/server/src/routes/generate.routes.ts (+40 -16)
📝 packages/server/src/services/prompt/assembler.ts (+3 -0)
📝 packages/server/src/services/prompt/marker-expander.ts (+22 -15)
📝 packages/server/test/lorebook-processing.test.ts (+106 -0)
📝 packages/shared/src/schemas/chat.schema.ts (+1 -0)

📄 Description

Linked issue

No linked issue yet. This PR comes from maintainer/user feedback that Guided Generation, guided swipes/regens, Post only, and Impersonate were hard to discover and easy to confuse.

Why this change

  • Users need a clearer way to steer a reply, post a persona message without triggering generation, or generate an impersonated user-side message without learning hidden workflows from Discord.
  • The previous optional buttons competed for space in the send bar, and moving more actions there would make that area harder to scan.
  • /narrator, guided swipes/regens, and quick reply actions should behave consistently without leaking hidden guide text into chat history or the wrong lorebook trigger paths.

What changed

  • Added a configurable Quick replies control in Settings > Advanced with compact toggles for Post only, Guide reply, and Impersonate.
  • Added a send-bar Quick replies menu that shows a direct icon when only one action is enabled, or an animated vertical icon rail when multiple actions are enabled.
  • Routed Guide reply through the /narrator generation-guide path and routed quick Impersonate through the normal /impersonate command path.
  • Added server-side persona snapshots for Post only user messages so they keep the correct persona/avatar after persona changes.
  • Tagged generation guide sources so narrator/user guide requests can use Chat reply lorebook filters while invisible Game startup guidance does not.
  • Updated the FAQ to explain /narrator, guided swipes/regens, and the Quick replies location.

Reviewer Blockers Addressed

  • Cross-chat draft clobber: Quick replies and ordinary slash-command paths now snapshot and restore drafts/attachments per chat. Async file reads are bound to the chat where upload, paste, or drop started, so switching chats during a read or failed send cannot append files into another chat's draft.
  • Orphaned Post only messages: Post only now tracks the created message ID, deletes the partial user message if attachment/persona persistence fails, and restores the submitted draft/attachments so users can retry without cleanup.
  • Lorebook trigger disclosure: Guided /narrator requests and guided manual character replies now use Chat reply lorebook triggers. docs/FAQ.md and CHANGELOG.md call out that entries previously relying on Continue/Autonomous for guided replies should move to Chat reply if they should still fire there.

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

  • git diff --check passed; Git reported line-ending notices only.
  • pnpm check passed. Build still emits the existing Node DEP0190 warning.
  • Local browser/UI iteration covered the Quick replies settings drawer and send-bar menu layout across desktop/mobile screenshots.
  • Not run: Docker/container validation.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Notes:

  • Updated docs/FAQ.md.
  • No version or release metadata changes.

UI evidence (if applicable)

Screenshot 2026-05-13 223524 Screenshot 2026-05-13 223547

Summary by CodeRabbit

  • New Features

    • Quick Reply Menu with Post-only, Guided reply, and Impersonate actions; keyboard and accessibility support.
    • Guided generation now carries source metadata (narrator/guide/game_start) for consistent behavior across interactions.
  • Documentation

    • New FAQ explaining guided generation, /narrator steering, guide-enabled swipes/regens, quick-reply options, and lorebook guidance behavior.
  • Enhancements

    • Settings UI to configure quick replies and migration of prior preferences.
    • Improved attachment and persona handling across chat flows.
  • Tests

    • Added test ensuring guide-only lorebook entries are scanned without appearing in chat history.

Review Change Stack


🔄 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/782 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/13/2026 **Status:** ✅ Merged **Merged:** 5/14/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `main` ← **Head:** `feature/guided-generation-action` --- ### 📝 Commits (6) - [`d561fbd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d561fbdb30596809359fe702d1b1afded7e98918) feat(chat): add quick replies for guided actions - [`bc1231b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bc1231b6e8e3ca6e86a097c0a0192850570cbc5a) fix: preserve quick reply drafts on failure - [`362a0e9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/362a0e94ce0e938485bd6e021ccee36e137bf9f5) fix: align guided replies with chat lorebook scans - [`c25bb34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c25bb34d1e650b5ce3f6eaee861266b836d6e57d) fix: resolve quick reply review follow-ups - [`15d9535`](https://github.com/Pasta-Devs/Marinara-Engine/commit/15d9535bfbfa46e7df65a93b259cd21e42bcbe94) fix: keep attachment drafts scoped to chats - [`1450801`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1450801009d3fa13a64a841b920c41f04bdc07b0) Merge origin/main into guided generation branch ### 📊 Changes **18 files changed** (+1647 additions, -260 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/FAQ.md` (+16 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -0) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+420 -75) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+78 -78) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+452 -71) ➕ `packages/client/src/components/chat/QuickReplyMenu.tsx` (+263 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+1 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+163 -2) 📝 `packages/client/src/hooks/use-generate.ts` (+1 -0) 📝 `packages/client/src/lib/slash-commands.ts` (+8 -1) 📝 `packages/client/src/stores/ui.store.ts` (+36 -1) 📝 `packages/server/src/routes/chats.routes.ts` (+35 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+40 -16) 📝 `packages/server/src/services/prompt/assembler.ts` (+3 -0) 📝 `packages/server/src/services/prompt/marker-expander.ts` (+22 -15) 📝 `packages/server/test/lorebook-processing.test.ts` (+106 -0) 📝 `packages/shared/src/schemas/chat.schema.ts` (+1 -0) </details> ### 📄 Description ## Linked issue No linked issue yet. This PR comes from maintainer/user feedback that Guided Generation, guided swipes/regens, Post only, and Impersonate were hard to discover and easy to confuse. ## Why this change - Users need a clearer way to steer a reply, post a persona message without triggering generation, or generate an impersonated user-side message without learning hidden workflows from Discord. - The previous optional buttons competed for space in the send bar, and moving more actions there would make that area harder to scan. - `/narrator`, guided swipes/regens, and quick reply actions should behave consistently without leaking hidden guide text into chat history or the wrong lorebook trigger paths. ## What changed - Added a configurable Quick replies control in Settings > Advanced with compact toggles for Post only, Guide reply, and Impersonate. - Added a send-bar Quick replies menu that shows a direct icon when only one action is enabled, or an animated vertical icon rail when multiple actions are enabled. - Routed Guide reply through the `/narrator` generation-guide path and routed quick Impersonate through the normal `/impersonate` command path. - Added server-side persona snapshots for Post only user messages so they keep the correct persona/avatar after persona changes. - Tagged generation guide sources so narrator/user guide requests can use Chat reply lorebook filters while invisible Game startup guidance does not. - Updated the FAQ to explain `/narrator`, guided swipes/regens, and the Quick replies location. ## Reviewer Blockers Addressed - **Cross-chat draft clobber:** Quick replies and ordinary slash-command paths now snapshot and restore drafts/attachments per chat. Async file reads are bound to the chat where upload, paste, or drop started, so switching chats during a read or failed send cannot append files into another chat's draft. - **Orphaned Post only messages:** Post only now tracks the created message ID, deletes the partial user message if attachment/persona persistence fails, and restores the submitted draft/attachments so users can retry without cleanup. - **Lorebook trigger disclosure:** Guided `/narrator` requests and guided manual character replies now use Chat reply lorebook triggers. `docs/FAQ.md` and `CHANGELOG.md` call out that entries previously relying on Continue/Autonomous for guided replies should move to Chat reply if they should still fire there. ## Validation - [x] `pnpm check` passes locally - [ ] 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 - `git diff --check` passed; Git reported line-ending notices only. - `pnpm check` passed. Build still emits the existing Node `DEP0190` warning. - Local browser/UI iteration covered the Quick replies settings drawer and send-bar menu layout across desktop/mobile screenshots. - Not run: Docker/container validation. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Notes: - Updated `docs/FAQ.md`. - No version or release metadata changes. ## UI evidence (if applicable) <img width="471" height="337" alt="Screenshot 2026-05-13 223524" src="https://github.com/user-attachments/assets/d33e84a0-67ba-464a-8de8-532fe92f9ecd" /> <img width="414" height="337" alt="Screenshot 2026-05-13 223547" src="https://github.com/user-attachments/assets/d9e8feb1-f66f-4c2c-b5e5-70ec08c05f44" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Quick Reply Menu with Post-only, Guided reply, and Impersonate actions; keyboard and accessibility support. * Guided generation now carries source metadata (narrator/guide/game_start) for consistent behavior across interactions. * **Documentation** * New FAQ explaining guided generation, /narrator steering, guide-enabled swipes/regens, quick-reply options, and lorebook guidance behavior. * **Enhancements** * Settings UI to configure quick replies and migration of prior preferences. * Improved attachment and persona handling across chat flows. * **Tests** * Added test ensuring guide-only lorebook entries are scanned without appearing in chat history. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/782) <!-- review_stack_entry_end --> <!-- 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-22 04:10:31 +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#4771
No description provided.