mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4931] [Feature]: Easy Viewer phase 4 — Peek-Prompt-fidelity character/preset render + true per-entry reject #2734
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2734
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4931
Originally assigned to: @kolacheee on GitHub.
What problem does this solve?
Phase 4 follow-up to the Professor Mari "Easy Viewer" (#4919). Two capabilities were deliberately deferred because they need server work, and the Easy Viewer PR shipped without them:
Peek-Prompt-fidelity rendering of character and preset edits. In the Easy Viewer, character and preset changes render as a generic before/after field diff. The user asked for them to appear the way they would in Peek Prompt (the assembled prompt: XML / Markdown / brackets). That rendering is produced server-side by
assemblePrompt, which reads persisted rows by id;apply:falsereturns before/after row objects, not a rendered prompt. So a faithful Peek-Prompt view needs a new server path.True per-entry reject (reverting a single row of a pending change). Today the per-entry control in the Easy Viewer is Dismiss — a client-only hide, since Mari's edits are already applied and the card's Keep/Restore governs the whole batch. Actually reverting one row of an approval touches the audited durable-undo/restore path (#4813 / #4828 / #4852) and referential ordering, so it was deferred.
Proposed solution
Peek-Prompt render endpoint. Add a server endpoint that runs
assemblePrompttwice for the affected character/preset with the target row overridden byapproval.diffPreview.beforeand.after, returns the twomessages[]arrays, and lets the client diff them and feed the result into the existingPeekPromptModal. Presets are the harder case (apreset.updateSection"after" is a single section that doesn't map to a whole assembled prompt without the rest of the preset/groups/choiceBlocks).Scoped per-entry reject. Add a server "reject-rows" path that reverts a dependency-closed subset of a pending approval: run
restorePlanover the selected rows, shrink the pending record'splan.changes, recomputesummary/diffPreview, rewrite the durable sidecar, and rework the whole-plan supersede guard / one-plan-per-history-entry model to be per-row. Smallest viable start: scope reject tolorebook.createinserts only (leaflorebook_entriesrows → clean single deletes with no FK fallout); forbid rejecting the parentlorebooksrow (or treat it as reject-all). Note:diffPreviewis capped at 50 rows and omitscascadeOf, so the endpoint must operate on the full server-side plan, not the client's lossy preview.Alternatives considered
wrapContent's XML/Markdown output) — lower fidelity, drifts from the server wrap logic, and omits macro/persona/lorebook resolution. Rejected in favor of the true server render.Additional item: a lorebook entry's activation mode + vectorization are not obvious (folding into PR #4921 now)
Live-testing the Easy Viewer surfaced a third gap. Unlike the two capabilities above, this one is client-only (no server work), so it is being pulled forward into the Easy Viewer PR (#4921) rather than deferred here.
For a lorebook entry, the Easy Viewer does not make the entry's activation mode obvious at a glance. A reviewer cannot tell whether an entry is:
constant: true),constant: falsewith keys), orenabled: false),and it does not surface whether the entry is Vectorized (retrieved by embedding similarity) unless that specific field happens to change in Mari's edit.
Today
constantonly appears as a small "Constant: on/off" chip when it changes,enabledshows as a Disabled/Enabled badge, and vectorization falls through to the generic field diff only on change. The baseline state of a present-but-unchanged property is invisible — so an entry Mari just created as Constant + Vectorized reads like a plain entry.Wanted: an always-visible status indicator on each lorebook-entry card in the Easy Viewer showing its activation mode (Constant / Normal / Disabled) plus a Vectorized marker, matching the engine's own lorebook-editor visual language, with a before → after shown when Mari's edit changes that state. This is the "most destructive/most important should be loudest" principle applied to activation semantics, not just deletes.
Additional context
Follow-up to #4919 (Easy Viewer, PR #4921). The investigation for that feature already scoped the first two items (server
assemblePromptoverride for the render;restorePlan-over-a-subset for reject) and recommended shipping phases 1–3 first, which is done. The activation/vectorization indicator (third item) is being addressed in #4921.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: