[PR #7782] [MERGED] feat(mari): show nested changes on Professor Mari's change card #7926

Closed
opened 2026-10-24 04:08:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7782
Author: @ylli-selmani
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ylli-selmani

Base: staging ← Head: feat/mari-nested-change-excerpts


📝 Commits (6)

  • 0161202 feat(mari): show nested changes on the change card
  • 4801c09 fix(mari): keep an undrawable change in the receipt count
  • e8b9d01 fix(mari): count a dropped child change beside a shown one
  • b5c1e4e fix(mari): name nothing-to-draw receipts and skip empty nested fields
  • cbce2ef fix(mari): count every undrawn change and keep nested keys uncapped
  • 33af9c4 fix(mari): show zero onboarding counts and keep keys unclipped

📊 Changes

6 files changed (+427 additions, -26 deletions)

View changed files

📝 packages/client/src/components/chat/MariChangeReceipt.tsx (+64 -4)
📝 packages/client/src/components/chat/mari/mari-tool-presentation.ts (+13 -0)
📝 packages/client/src/localization/locales/en.json (+8 -0)
📝 packages/shared/src/types/professor-mari-workspace.ts (+10 -0)
📝 packages/shared/src/utils/mari-change-receipt.ts (+88 -22)
📝 scripts/regressions/professor-mari/change-receipt.regression.ts (+244 -0)

📄 Description

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 #7771

Why this change

  • When Professor Mari writes something nested inside a card (her interactive onboarding lives at data.extensions.onboarding), the change card only said "Changed personality and 1 more". The onboarding itself showed up as nothing more than "1 more field changed", so the only way to see what she wrote was to open the character's Onboarding tab.
  • The receipt builder read a changed row one level deep. Anything deeper was counted, never shown.
  • This is the gap found during the live test for #7760 / #7769.

What changed

  • Nested objects on the card. A changed object the card used to only count now gets its own field with the keys that changed: Extensions · Onboarding lists Description, Persona questions, Character questions. Any other deeper object gets the same general fallback, so "1 more field changed" no longer hides what she touched.
  • Onboarding says what it is in plain words. The card reads On · 5 persona questions · 1 character question (or Off), so you can see the onboarding she wrote without leaving the card. Wording matches the Onboarding tab: persona questions are the ones that build your persona, character questions are saved as chat variables.
  • Deeper lists keep their names. A list nested under a field (for example a preset's parameters.stopStrings) now shows added/edited/removed entries like a lorebook's, instead of being counted. Empty keys are skipped, so a brand-new onboarding does not list its untouched prose fields.
  • The new nested excerpt is added to the shared receipt type and to the client-side guard that decides what can be drawn, so a stored receipt never renders half a field. Existing receipts (text / value / list) are unchanged and old messages keep working.
  • New English localization keys for the onboarding line and its two question labels. No server or storage change; the receipt is still built from the row snapshots and saved on her message.

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

  • New regression change-receipt cases: onboarding written onto a card that had none, one onboarding question reworded, a generic nested object, a deeper list, the head-line wording, and the card source pin. The onboarding case fails on staging ("the onboarding change is its own excerpt") and passes with this change.
  • Seeded a real Professor Mari chat with a saved receipt and checked the card in the browser: folded it reads Changed personality and onboarding (previously Changed personality and 1 more); opened, the nested field reads On · 5 persona questions · 1 character question with Description, Persona questions, Character questions chips.
  • Screenshots captured locally; they are not attached to this draft yet.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

Before, the card said Changed personality and 1 more and the onboarding was not readable on it. After, folded: Changed personality and onboarding; opened: EXTENSIONS · ONBOARDING → On · 5 persona questions · 1 character question with the changed-key chips.

Summary by CodeRabbit

  • Improvements
    • Change receipts now show clearer summaries for nested fields, including which keys changed and how many changes were made.
    • When onboarding details are available, receipts display whether onboarding is on or off and show persona and character question counts.
    • Nested field labels now reflect the full path where applicable, and receipts retain counts for changes that cannot be displayed individually.
    • Nested lists and deeper changes are summarized where possible, with additional changes included in the receipt’s total.

🔄 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/7782 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ylli-selmani](https://github.com/ylli-selmani) **Base:** `staging` ← **Head:** `feat/mari-nested-change-excerpts` --- ### 📝 Commits (6) - [`0161202`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0161202f954f294a3d9e8465328149d7c5d09bc4) feat(mari): show nested changes on the change card - [`4801c09`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4801c09abb1c112293b9b3abc6db69b9066510cb) fix(mari): keep an undrawable change in the receipt count - [`e8b9d01`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8b9d01091253c7ea4366bdfaccd738839c8d0d0) fix(mari): count a dropped child change beside a shown one - [`b5c1e4e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5c1e4ef2bde488a122e0d2ed6fa73070753a4f0) fix(mari): name nothing-to-draw receipts and skip empty nested fields - [`cbce2ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cbce2efb223b3160056f90dbec0afd8e46475578) fix(mari): count every undrawn change and keep nested keys uncapped - [`33af9c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/33af9c41949afb366adba753b75f903f6627d152) fix(mari): show zero onboarding counts and keep keys unclipped ### 📊 Changes **6 files changed** (+427 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/MariChangeReceipt.tsx` (+64 -4) 📝 `packages/client/src/components/chat/mari/mari-tool-presentation.ts` (+13 -0) 📝 `packages/client/src/localization/locales/en.json` (+8 -0) 📝 `packages/shared/src/types/professor-mari-workspace.ts` (+10 -0) 📝 `packages/shared/src/utils/mari-change-receipt.ts` (+88 -22) 📝 `scripts/regressions/professor-mari/change-receipt.regression.ts` (+244 -0) </details> ### 📄 Description > [!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 Closes #7771 ## Why this change - When Professor Mari writes something nested inside a card (her interactive onboarding lives at `data.extensions.onboarding`), the change card only said "Changed personality and 1 more". The onboarding itself showed up as nothing more than "1 more field changed", so the only way to see what she wrote was to open the character's Onboarding tab. - The receipt builder read a changed row one level deep. Anything deeper was counted, never shown. - This is the gap found during the live test for #7760 / #7769. ## What changed - **Nested objects on the card.** A changed object the card used to only count now gets its own field with the keys that changed: `Extensions · Onboarding` lists `Description`, `Persona questions`, `Character questions`. Any other deeper object gets the same general fallback, so "1 more field changed" no longer hides what she touched. - **Onboarding says what it is in plain words.** The card reads `On · 5 persona questions · 1 character question` (or `Off`), so you can see the onboarding she wrote without leaving the card. Wording matches the Onboarding tab: persona questions are the ones that build your persona, character questions are saved as chat variables. - **Deeper lists keep their names.** A list nested under a field (for example a preset's `parameters.stopStrings`) now shows added/edited/removed entries like a lorebook's, instead of being counted. Empty keys are skipped, so a brand-new onboarding does not list its untouched prose fields. - The new `nested` excerpt is added to the shared receipt type and to the client-side guard that decides what can be drawn, so a stored receipt never renders half a field. Existing receipts (text / value / list) are unchanged and old messages keep working. - New English localization keys for the onboarding line and its two question labels. No server or storage change; the receipt is still built from the row snapshots and saved on her message. ## 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 - New regression `change-receipt` cases: onboarding written onto a card that had none, one onboarding question reworded, a generic nested object, a deeper list, the head-line wording, and the card source pin. The onboarding case fails on `staging` ("the onboarding change is its own excerpt") and passes with this change. - Seeded a real Professor Mari chat with a saved receipt and checked the card in the browser: folded it reads `Changed personality and onboarding` (previously `Changed personality and 1 more`); opened, the nested field reads `On · 5 persona questions · 1 character question` with `Description`, `Persona questions`, `Character questions` chips. - Screenshots captured locally; they are not attached to this draft yet. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) 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) Before, the card said `Changed personality and 1 more` and the onboarding was not readable on it. After, folded: `Changed personality and onboarding`; opened: `EXTENSIONS · ONBOARDING` → `On · 5 persona questions · 1 character question` with the changed-key chips. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Change receipts now show clearer summaries for nested fields, including which keys changed and how many changes were made. * When onboarding details are available, receipts display whether onboarding is on or off and show persona and character question counts. * Nested field labels now reflect the full path where applicable, and receipts retain counts for changes that cannot be displayed individually. * Nested lists and deeper changes are summarized where possible, with additional changes included in the receipt’s total. <!-- 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-24 04:08:53 +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#7926
No description provided.