mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8815] [MERGED] Show Professor Mari's edits as whole runs, old then new #8821
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#8821
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/8815
Author: @kolacheee
Created: 11/4/2026
Status: ✅ Merged
Merged: 11/4/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-e339o4📝 Commits (7)
6048133Show Professor Mari's edits as whole runs, old then newdecfed0Fold a single kept word between two edits into the run3dca375Never strike a kept word between pure insertions or deletions6611bd6Judge each run on its own segments, not flags left by an earlier run8345587Merge remote-tracking branch 'origin/staging' into claude/project-thread-e339o4176d977Merge remote-tracking branch 'origin/staging' into claude/project-thread-e339o43e1cd85Merge remote-tracking branch 'origin/staging' into claude/project-thread-e339o4📊 Changes
5 files changed (+190 additions, -10 deletions)
View changed files
📝
packages/client/src/components/chat/MariChangeReceipt.tsx(+2 -2)📝
packages/client/src/lib/mari-edit-diff.ts(+5 -5)📝
packages/client/src/lib/word-diff.ts(+100 -2)📝
packages/client/src/styles/mari.css(+12 -0)📝
scripts/regressions/mari/word-diff-lines.regression.ts(+71 -1)📄 Description
Linked issue
Closes #8814
Why this change
A rewritten phrase in Mari's edit diff alternated old and new word by word, each struck word glued to its replacement, which is hard to read.
What changed
groupChangeRuns/diffWordRunsinlib/word-diff.ts: each run of changed words becomes the whole old run struck, then the whole new run. Kept stretches between two edits join the run when they are a single word (any length) or up to two words of four letters or fewer ("of the"); a line break never does. A run that only inserts or only deletes keeps its kept words unstruck. Kept+removed still spells the old text and kept+added the new.TextBody), the Easy Viewer (trackProseChange, after its rewrite check on the raw diff), and paired lines in the unified diff (after its similarity check).margin-inline-endon struck text directly followed by new text (del:has(+ ins)), so the two runs don't touch. Browsers without:has()just show them adjacent, as before.scripts/regressions/mari/word-diff-lines.regression.ts(the issue example, single kept words, pure insertion/deletion, line breaks).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Ran the mari regressions (
node ./scripts/run-regressions.mjs --filter mari, 87/87) and the command-center regression, clienttsc --noEmit, client lint (no errors), and Prettier on changed files. Rendered the diff output with the receipt styles in Chromium to compare before and after; not clicked through in the running app.Before:
A brilliant researcher ~~and respected~~whose ~~authority~~outward ~~in~~professionalism ~~her~~has ~~field,~~become a ~~professional~~ shield ~~to~~against ~~a~~growing ~~fault.~~exhaustion.After:
A brilliant researcher ~~and respected authority in her field, a professional shield to against a growing fault. With~~ whose outward professionalism has become a shield against growing exhaustion. While …Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.