mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#6557
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4963
Author: @kolacheee
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/mari-easy-viewer-entry-status📝 Commits (10+)
5ff9c5efeat(mari): show lorebook entry activation + vectorization in the Easy Viewer (#4931)d0b3661docs(changelog): note Easy Viewer entry activation + vectorization status (#4931)cd2a157feat(mari): server-side per-entry reject for pending reviews (#4931)e5335b8feat(mari): per-entry Reject control in the Easy Viewer (#4931)b58ca75feat(mari): synthetic Peek-Prompt render endpoint for reviewed edits (#4931)502e025feat(mari): View as prompt preview for character/preset edits in the Easy Viewer (#4931)5f38569docs(changelog): note Easy Viewer per-entry reject + prompt preview (#4931)85cfb8bfix(mari): address adversarial review of the Easy Viewer phase-4 (#4931)6479dffMerge remote-tracking branch 'origin/staging' into feat/mari-easy-viewer-entry-status8610911fix(mari): address CodeRabbit review of the prompt preview + reject (#4931)📊 Changes
10 files changed (+1535 additions, -105 deletions)
View changed files
📝
CHANGELOG.md(+3 -0)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+165 -3)📝
packages/client/src/components/chat/MariEditEasyViewer.tsx(+263 -43)➕
packages/client/src/components/chat/MariPromptPreviewModal.tsx(+159 -0)📝
packages/client/src/lib/mari-edit-diff.ts(+3 -0)📝
packages/client/src/localization/locales/en.json(+25 -3)📝
packages/server/src/routes/professor-mari-workspace.routes.ts(+50 -0)📝
packages/server/src/services/mari-db/mari-db.service.ts(+306 -56)➕
packages/server/src/services/professor-mari/workspace-edit-render.ts(+236 -0)📝
scripts/regressions/open-issues.regression.ts(+325 -0)📄 Description
Linked issue
Closes #4931
Covers all three Easy Viewer phase-4 items in one PR (per the issue): the activation/vectorization visibility, the true per-entry reject, and the Peek-Prompt-fidelity render. Builds on the Easy Viewer from #4919 / #4921.
Why this change
Three gaps in Professor Mari's "Easy Viewer" review cards:
constantonly showed as a chip when it changed,enabledas a Disabled badge, and vectorization not at all unless it changed — so a reviewer couldn't tell at a glance whether Mari made a Constant, Selective, or Normal entry, or whether it was vectorized.What changed
1. Always-visible activation + vectorization status (client-only). Each lorebook-entry card shows an activation pill (Constant / Selective / Normal, using the lorebook editor's own dot colors) and a vectorization pill (Vectorized / Vector excluded), rendered as
from → towhen Mari's edit changes them. The prominent Disabled badge is kept (enabledis orthogonal). Aselectiveflip on a constant entry stays in the generic diff so it is never dropped; a derivedembeddingvector can never render as a giant diff.2. True per-entry reject (server + client), scoped to lorebook entries. A destructive-styled Reject button reverts one entry while keeping the rest applied. Server:
restoreChanges/validateAndFlushRestoredextracted fromrestorePlan(behavior-preserving), and a newrejectRows(id, selections)reverts a dependency-closed subset through the same audited transaction, refuses anything that could dangle a reference (a cascade child, a non-entry row, a stale selection), then shrinks the pending record (recompute summary + mirrored fields + atomically rewrite the durable sidecar) or resolves it when empty. Preserves the audited undo contract: the#4852in-tx supersede guard, apply/restore asymmetry,#4927character-book sync,#4813sidecar durability, the pending map's insertion order, andoperationHash. The client sends the row'sdiffPreviewindex + a{table,id,action}tuple the server re-checks; the state_changed / invalid_selection paths return 200ok:falseso the reason shows inline.3. Synthetic "View as prompt" preview (server + client) for character and preset edits (not deletes — the field diff covers those). A new
render-promptendpoint assembles the edited entity on its own — no persona, no chat history,previewOnly— before and after: a character edit uses a read-only DB proxy that substitutes the before/after snapshot for the live character row against the default preset; a preset/section/group/choice edit loads the edited row's own preset and splices the snapshot into the assembler arrays. The client shows a before/after diff of the assembled prompt (additions green, removals red), reusing the word-diff and the neutral panel chrome, labeled a preview. It is best-effort — any assembly failure renders as unavailable, never a 500.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated (already run locally; boxes above left for the human to confirm per repo policy):
pnpm checkpasses (TypeScript + ESLint +check-locales+ client build), exit 0, after merging lateststaging.scripts/regressions/open-issues.regression.tspasses, including new cases: per-entry reject (partial reject reverts one entry and shrinks the card; a stale tuple and a non-entry row are refused; rejecting every entry leaves the shell), and the character render DB proxy (substitution, pass-through of other characters, null-drop) exercised through the storagegetByIdpath.Still to verify in a real browser (not yet done — I do not run the shared dev server, to avoid a port collision with a running install):
from → totransitions read correctly (light and dark theme, mobile wrapping).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Notes: adds three
CHANGELOG.mdentries under### Added. No user-facing docs underdocs/changed, so nodocs-i18nupdate is required. No version bump.UI evidence (if applicable)
Screenshots to be added from the manual browser pass. A design mockup of the activation/vectorization pills (including a
from → totransition and the Disabled/Removed treatments) was shared with the maintainer during development.Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.