mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4919] [Feature]: Easy Viewer for Professor Mari's edits (readable before/after diff on the review card) #2724
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#2724
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/4919
Originally assigned to: @kolacheee on GitHub.
What problem does this solve?
When Professor Mari edits something, her Keep/Restore review card shows the change as a raw
app_data … {JSON}command. Users can't tell what they're looking at — a character rewrite, a lorebook entry edit, and a preset change all appear as an opaque one-line JSON blob. The card already renders created and deleted rows in a friendly collapsible way, but it has no rendering at all forupdate/replacerows, so every edit falls through to the raw command string.Proposed solution
Add an Easy Viewer for Mari's edits on the review card (
DatabaseWorkspaceApprovalCard), shipped in phases. This issue covers phases 1–3 (a follow-up will cover phase 4):update/replacerows as a per-field before/after diff (red for removed, green for added), with inline word-level highlighting. All the data is already client-side onapproval.diffPreview[].before/.after(full row snapshots), so this needs no server change. Covers characters, presets, and lorebooks generically.lorebook_entrieschanges, lay the edit out like the entry editor users know (name, keys, content, toggles) with the field-level red/green diff, instead of a generic key/value diff.Word-level highlighting will use a small self-contained diff utility (no new dependency).
Alternatives considered
assemblePromptreads persisted rows by ID), andapply:falsereturns before/after row objects rather than a rendered prompt, so a faithful Peek-Prompt view needs a new server endpoint. The phase-1 field diff already makes character/preset edits readable without it.Additional context
Follow-up to the Professor Mari memory/edit-review work (#4851, #4852). The review card is
packages/client/src/components/chat/HomeProfessorMariChat.tsx; the diff data isMariDbPendingApproval.diffPreview(packages/shared/src/types/professor-mari-workspace.ts).Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: