[PR #6335] [MERGED] fix: alias read path, prompt preview and chat controls #7140

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

📋 Pull Request Information

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

Base: staging ← Head: codex/sept18-evening-sweep


📝 Commits (5)

  • c9c7771 chore: start evening issue sweep
  • 319edf4 fix: align package prompt previews and improve chat controls
  • 17618cf Merge staging with completed OpenCode session support
  • 064ef1e test: verify package wrap format through actual contributor calls
  • 74611d9 Merge current staging ruleset setup changes

📊 Changes

17 files changed (+627 additions, -137 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
➕ e2e/evening-chat-controls.e2e.ts (+133 -0)
📝 e2e/roleplay-vn.e2e.ts (+15 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+13 -6)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+8 -2)
📝 packages/client/src/components/layout/ChatSidebar.tsx (+2 -2)
📝 packages/client/src/components/modals/DocsViewerModal.tsx (+3 -43)
➕ packages/client/src/hooks/use-code-block-copy.ts (+43 -0)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/server/src/routes/generate.routes.ts (+29 -62)
📝 packages/server/src/routes/generate/dry-run-route.ts (+47 -10)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+30 -7)
📝 packages/server/src/services/capability-packages/capability-prompt-context.service.ts (+4 -0)
➕ packages/server/src/services/generation/capability-prompt-runtime.ts (+30 -0)
📝 scripts/regressions/capability-package-chat-controls.regression.ts (+2 -5)
➕ scripts/regressions/capability-prompt-preview.regression.ts (+217 -0)
➕ scripts/regressions/character-name-aliases.regression.ts (+42 -0)

📄 Description

Linked issue

Closes #6328
Closes #6331
Closes #6332
Closes #6333
Closes #6334

Why this change

Aliases were saved on character cards but unavailable through the server's name resolver. Peek Prompt omitted capability package context that real generation includes. Three existing chat controls also needed small usability fixes: full-size Visual Novel portraits, a readable schedule icon, and copying fenced code in Professor Mari.

What changed

  • Add an identity-map sibling to the existing name resolver. Both use one parser, keep canonical names unchanged, ignore malformed aliases, and read only the supplied chat members, including disabled characters. This provides the requested read path without adding downstream alias consumers or storage.
  • Share capability-context collection and placement between preview and generation, including package Agent Sections and existing chat/audience filtering for roleplay events.
  • Connect Visual Novel portraits to the existing image viewer with keyboard and touch support.
  • Prevent inherited button padding from squeezing the schedule icon.
  • Reuse the Docs code-copy controls in Professor Mari, preserving code whitespace, clipboard fallback and localized accessible feedback.

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

Recorded automated validation:

  • pnpm check passed on the implementation and again after integrating staging's OpenCode session merge.
  • After #6330 landed on staging, 74611d967 integrated it cleanly. pnpm check and the prompt-preview and new ruleset-setup regressions passed on the combined tree; GitHub validation runs again on this revision to satisfy the up-to-date branch gate.
  • pnpm regression:prompt, tracker-section regressions, and the new alias and capability-preview regressions passed. Preview proof captures real local provider requests in all three modes, checks preset placement, package deactivation, read-only message history and negative audience/chat controls.
  • All 42 Visual Novel checks passed across desktop Chromium, mobile Chromium and mobile WebKit. All 12 final schedule/Mari/Docs control checks passed across those same profiles in dark and light themes.
  • Initial local CodeRabbit review found one accessibility issue in copy feedback; it was fixed and covered by browser assertions. Final local review completed with zero findings; hosted CI and CodeRabbit remain merge gates.
  • Hosted CodeRabbit completed on 74611d967. Its one actionable recommendation asked to migrate alias-matching consumers, which #6328 explicitly excludes. The resolved review response records that scope decision; no consumer behavior change is claimed.
  • All 41 final GitHub checks passed, including all 12 browser shards and their desktop/mobile aggregate jobs, native/platform builds, containers and security analysis. Merged into staging as 04511dec3d; all five linked issues are closed.

The latest hosted Node run passed 306/306 regressions on 74611d967, including the new staging ruleset regression. The earlier 064ef1ef9 run passed 305/305. The initial run's only failure was a source-text assertion looking for the old inline collector; that assertion now checks the actual contributor input in the passing preview/generation regression. Local CodeRabbit review of this two-file proof correction also completed with zero findings.

The first browser pass encountered disk exhaustion and a shared fixture collision. Disposable dependency caches were removed; fixtures now have unique markers. One subsequent assertion compared moving sidebar rectangles across frames; it now measures both in a single frame. The final control run passes with all size/containment assertions intact.

Manual verification notes

Manually verify aliases with a consuming package, inspect Peek Prompt with your installed prompt-context package, open a Visual Novel portrait, and copy Mari code on a physical phone and Firefox. Browser screenshots were inspected; browser interaction proof is automated. Provider transport used a local fixture, with no paid provider calls. Package contributions retain their existing timeout/failure behavior, matching generation.

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
  • Version/release files updated (only if this PR includes a version bump)

Added five Unreleased entries and shared English copy-control labels. Existing guides remain accurate; no user-facing documentation, dependencies, storage or release versions changed.

UI evidence (if applicable)

Before/after screenshots and regression logs. Download marinara-6335-ui-proof.html to view the embedded original screenshots.


🔄 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/6335 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/18/2026 **Status:** ✅ Merged **Merged:** 9/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept18-evening-sweep` --- ### 📝 Commits (5) - [`c9c7771`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c9c77718475448897ecd47f2c8580b6b5401f870) chore: start evening issue sweep - [`319edf4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/319edf4bac21d2db977c6768e792139f520b0e7d) fix: align package prompt previews and improve chat controls - [`17618cf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/17618cf6efce82482fd7da1dccaeff7988ec1bb2) Merge staging with completed OpenCode session support - [`064ef1e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/064ef1ef97d7afa1ca09629c09f393ec985ce394) test: verify package wrap format through actual contributor calls - [`74611d9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/74611d967ea386d64e31bb008e62110a60648c2f) Merge current staging ruleset setup changes ### 📊 Changes **17 files changed** (+627 additions, -137 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) ➕ `e2e/evening-chat-controls.e2e.ts` (+133 -0) 📝 `e2e/roleplay-vn.e2e.ts` (+15 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+13 -6) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+8 -2) 📝 `packages/client/src/components/layout/ChatSidebar.tsx` (+2 -2) 📝 `packages/client/src/components/modals/DocsViewerModal.tsx` (+3 -43) ➕ `packages/client/src/hooks/use-code-block-copy.ts` (+43 -0) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+29 -62) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+47 -10) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+30 -7) 📝 `packages/server/src/services/capability-packages/capability-prompt-context.service.ts` (+4 -0) ➕ `packages/server/src/services/generation/capability-prompt-runtime.ts` (+30 -0) 📝 `scripts/regressions/capability-package-chat-controls.regression.ts` (+2 -5) ➕ `scripts/regressions/capability-prompt-preview.regression.ts` (+217 -0) ➕ `scripts/regressions/character-name-aliases.regression.ts` (+42 -0) </details> ### 📄 Description ## Linked issue Closes #6328 Closes #6331 Closes #6332 Closes #6333 Closes #6334 ## Why this change Aliases were saved on character cards but unavailable through the server's name resolver. Peek Prompt omitted capability package context that real generation includes. Three existing chat controls also needed small usability fixes: full-size Visual Novel portraits, a readable schedule icon, and copying fenced code in Professor Mari. ## What changed - Add an identity-map sibling to the existing name resolver. Both use one parser, keep canonical names unchanged, ignore malformed aliases, and read only the supplied chat members, including disabled characters. This provides the requested read path without adding downstream alias consumers or storage. - Share capability-context collection and placement between preview and generation, including package Agent Sections and existing chat/audience filtering for roleplay events. - Connect Visual Novel portraits to the existing image viewer with keyboard and touch support. - Prevent inherited button padding from squeezing the schedule icon. - Reuse the Docs code-copy controls in Professor Mari, preserving code whitespace, clipboard fallback and localized accessible feedback. ## 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` Recorded automated validation: - `pnpm check` passed on the implementation and again after integrating staging's OpenCode session merge. - After #6330 landed on staging, 74611d967 integrated it cleanly. `pnpm check` and the prompt-preview and new ruleset-setup regressions passed on the combined tree; GitHub validation runs again on this revision to satisfy the up-to-date branch gate. - `pnpm regression:prompt`, tracker-section regressions, and the new alias and capability-preview regressions passed. Preview proof captures real local provider requests in all three modes, checks preset placement, package deactivation, read-only message history and negative audience/chat controls. - All 42 Visual Novel checks passed across desktop Chromium, mobile Chromium and mobile WebKit. All 12 final schedule/Mari/Docs control checks passed across those same profiles in dark and light themes. - Initial local CodeRabbit review found one accessibility issue in copy feedback; it was fixed and covered by browser assertions. Final local review completed with zero findings; hosted CI and CodeRabbit remain merge gates. - Hosted CodeRabbit completed on 74611d967. Its one actionable recommendation asked to migrate alias-matching consumers, which #6328 explicitly excludes. The [resolved review response](https://github.com/Pasta-Devs/Marinara-Engine/pull/6335#discussion_r4050027254) records that scope decision; no consumer behavior change is claimed. - All 41 final GitHub checks passed, including all 12 browser shards and their desktop/mobile aggregate jobs, native/platform builds, containers and security analysis. Merged into staging as 04511dec3d92104d7af35d4588c7af0c4a8cf09c; all five linked issues are closed. The latest hosted Node run passed **306/306 regressions** on 74611d967, including the new staging ruleset regression. The earlier 064ef1ef9 run passed 305/305. The initial run's only failure was a source-text assertion looking for the old inline collector; that assertion now checks the actual contributor input in the passing preview/generation regression. Local CodeRabbit review of this two-file proof correction also completed with zero findings. The first browser pass encountered disk exhaustion and a shared fixture collision. Disposable dependency caches were removed; fixtures now have unique markers. One subsequent assertion compared moving sidebar rectangles across frames; it now measures both in a single frame. The final control run passes with all size/containment assertions intact. ### Manual verification notes Manually verify aliases with a consuming package, inspect Peek Prompt with your installed prompt-context package, open a Visual Novel portrait, and copy Mari code on a physical phone and Firefox. Browser screenshots were inspected; browser interaction proof is automated. Provider transport used a local fixture, with no paid provider calls. Package contributions retain their existing timeout/failure behavior, matching generation. ## 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 - [ ] Version/release files updated (only if this PR includes a version bump) Added five Unreleased entries and shared English copy-control labels. Existing guides remain accurate; no user-facing documentation, dependencies, storage or release versions changed. ## UI evidence (if applicable) [Before/after screenshots and regression logs](https://gist.github.com/SpicyMarinara/cc8e3173838e680ade15e5186d2a6c36). Download `marinara-6335-ui-proof.html` to view the embedded original screenshots. --- <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:53 +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#7140
No description provided.