[PR #5684] [CLOSED] feat(client): copy the impersonation prompt from the stored-guidance … #6884

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5684
Author: @luma-inibitor
Created: 8/30/2026
Status: ❌ Closed

Base: staging ← Head: patch/impersonate-copy-button


📝 Commits (2)

  • 083327d feat(client): copy the impersonation prompt from the stored-guidance modal
  • f81ff8e fix(client): harden stored guidance copy actions

📊 Changes

4 files changed (+167 additions, -36 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/chat/GenerationReplayDetailsModal.tsx (+71 -36)
📝 packages/client/src/localization/locales/en.json (+12 -0)
➕ scripts/regressions/generation-replay-copy.regression.ts (+83 -0)

📄 Description

…modal

The stored-guidance modal shows a copy button beside the guided prompt but none beside either impersonation block, so an impersonation prompt could be read and not lifted out.

TextBlock hardcoded the guided strings into its copy button, which is why the affordance could not simply be reused. It now takes a CopyAction — the clipboard payload plus its label, tooltip, and result toasts — and all three blocks supply one:

  • Guided guidance copies /guided <direction>, exactly as before.
  • Impersonation guidance copies /impersonate <direction>. The stored guidance is the direction /impersonate was given, so the command replays the same generation, matching what regeneration already reconstructs in applyGenerationReplayToRegenerateInput.
  • The impersonation prompt template copies verbatim. It is a stored setting rather than a command; /impersonate_prompt writes chat metadata, which is a different field.

A source-asserting regression lane pins the copy affordance to all three blocks and keeps their payloads distinct.

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 #

Why this change

What changed

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

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)

Summary by CodeRabbit

  • New Features

    • Added copy actions for stored guided directions, impersonation directions, and impersonation prompt templates.
    • Guided directions and impersonation directions can be copied as replayable commands; prompt templates can be copied verbatim.
    • Added localized labels, tooltips, confirmation messages, and error notifications for copy actions.
  • Bug Fixes

    • Improved clipboard failure handling with an error notification.

🔄 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/5684 **Author:** [@luma-inibitor](https://github.com/luma-inibitor) **Created:** 8/30/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `patch/impersonate-copy-button` --- ### 📝 Commits (2) - [`083327d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/083327df03c44d3a9259404f4c2cf85b1f611458) feat(client): copy the impersonation prompt from the stored-guidance modal - [`f81ff8e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f81ff8e567f4dfcab56b7abfd4c11aff5a3ab6c6) fix(client): harden stored guidance copy actions ### 📊 Changes **4 files changed** (+167 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/chat/GenerationReplayDetailsModal.tsx` (+71 -36) 📝 `packages/client/src/localization/locales/en.json` (+12 -0) ➕ `scripts/regressions/generation-replay-copy.regression.ts` (+83 -0) </details> ### 📄 Description …modal The stored-guidance modal shows a copy button beside the guided prompt but none beside either impersonation block, so an impersonation prompt could be read and not lifted out. `TextBlock` hardcoded the guided strings into its copy button, which is why the affordance could not simply be reused. It now takes a `CopyAction` — the clipboard payload plus its label, tooltip, and result toasts — and all three blocks supply one: - Guided guidance copies `/guided <direction>`, exactly as before. - Impersonation guidance copies `/impersonate <direction>`. The stored guidance is the direction `/impersonate` was given, so the command replays the same generation, matching what regeneration already reconstructs in `applyGenerationReplayToRegenerateInput`. - The impersonation prompt template copies verbatim. It is a stored setting rather than a command; `/impersonate_prompt` writes chat metadata, which is a different field. A source-asserting regression lane pins the copy affordance to all three blocks and keeps their payloads distinct. > [!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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes # ## Why this change <!-- What user problem, bug, or goal does this solve? --> - ## What changed <!-- List the key changes in this PR --> - ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - ## 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) <!-- Add before/after screenshots or recordings for UI changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added copy actions for stored guided directions, impersonation directions, and impersonation prompt templates. - Guided directions and impersonation directions can be copied as replayable commands; prompt templates can be copied verbatim. - Added localized labels, tooltips, confirmation messages, and error notifications for copy actions. - **Bug Fixes** - Improved clipboard failure handling with an error notification. <!-- 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:14: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#6884
No description provided.