[PR #8571] [MERGED] fix(mari): live-test bugs: failed write stays failed, held change settles only after a real save #8679

Closed
opened 2026-11-07 17:38:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8571
Author: @Gunterlie
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @Gunterlie

Base: staging ← Head: fix/mari-live-test-bugs


📝 Commits (2)

  • 0e6aa66 fix(mari): live-test bugs: failed write stays failed, held change settles only after a real save
  • 6b9ce76 fix(mari): key failed db writes by row, settle only editor-text held changes

📊 Changes

9 files changed (+337 additions, -47 deletions)

View changed files

📝 packages/client/src/components/characters/MariFieldReview.tsx (+29 -5)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+37 -14)
📝 packages/client/src/components/chat/MariApprovalCards.tsx (+33 -19)
📝 packages/client/src/components/chat/mari/MariWorkTimeline.tsx (+6 -8)
📝 packages/client/src/components/chat/mari/mari-tool-presentation.ts (+34 -0)
📝 packages/client/src/lib/mari-editor-fields.ts (+49 -0)
📝 packages/client/src/localization/locales/en.json (+1 -0)
📝 packages/client/src/styles/mari.css (+4 -1)
➕ scripts/regressions/mari/held-change-and-retry.regression.ts (+144 -0)

📄 Description

Linked issue

No issue: follow-up to the Professor Mari companion (#8418), found in live testing.

Why this change

Live testing of Prof. Mari's in-editor review showed 3 bugs. A failed write could look like it worked. A held change could stay open or settle wrongly after the user typed their own text. A failed save could not be retried.

What changed

  • A failed write stays failed. It no longer matches a later successful write.
  • A held change settles only after a real save of the user's own text.
  • A failed settle save can be tried again.
  • Review fixes:
    • A same-write match needs tool, action and target ids.
    • Settle happens only after a saved value that differs from the pre-Edit text.
    • The settle check reads mariHeldCalls (heldCallsAreEditorText).
    • No settle happens during Keep.
    • settle(key) returns a boolean and retries after a failed save.
    • A settled card shows only the title and "You saved your own text".
  • New regression: scripts/regressions/mari/held-change-and-retry.regression.ts.

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

Agent-run (not manual): tsc, ESLint, Prettier, localization:check, the held-change-and-retry regression, and seeded Playwright 29/29 at 1440 and 390. No real model was used. Full pnpm check was not run locally.

To verify manually:

  1. Ask Prof. Mari to change a field while the write fails. Manually verify the change stays failed.
  2. Hold a change, edit the field yourself, and save. Manually verify the card shows "You saved your own text".
  3. Make the settle save fail. Manually verify it retries.

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)

Screenshots are local; attach on request.


🔄 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/8571 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `fix/mari-live-test-bugs` --- ### 📝 Commits (2) - [`0e6aa66`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0e6aa66b6798eceedc2c961ebb082cc146671494) fix(mari): live-test bugs: failed write stays failed, held change settles only after a real save - [`6b9ce76`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6b9ce763c9b42d333e5d6cfaaa8c303cc44b07c0) fix(mari): key failed db writes by row, settle only editor-text held changes ### 📊 Changes **9 files changed** (+337 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/MariFieldReview.tsx` (+29 -5) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+37 -14) 📝 `packages/client/src/components/chat/MariApprovalCards.tsx` (+33 -19) 📝 `packages/client/src/components/chat/mari/MariWorkTimeline.tsx` (+6 -8) 📝 `packages/client/src/components/chat/mari/mari-tool-presentation.ts` (+34 -0) 📝 `packages/client/src/lib/mari-editor-fields.ts` (+49 -0) 📝 `packages/client/src/localization/locales/en.json` (+1 -0) 📝 `packages/client/src/styles/mari.css` (+4 -1) ➕ `scripts/regressions/mari/held-change-and-retry.regression.ts` (+144 -0) </details> ### 📄 Description ## Linked issue No issue: follow-up to the Professor Mari companion (#8418), found in live testing. ## Why this change Live testing of Prof. Mari's in-editor review showed 3 bugs. A failed write could look like it worked. A held change could stay open or settle wrongly after the user typed their own text. A failed save could not be retried. ## What changed - A failed write stays failed. It no longer matches a later successful write. - A held change settles only after a real save of the user's own text. - A failed settle save can be tried again. - Review fixes: - A same-write match needs tool, action and target ids. - Settle happens only after a saved value that differs from the pre-Edit text. - The settle check reads `mariHeldCalls` (`heldCallsAreEditorText`). - No settle happens during Keep. - `settle(key)` returns a boolean and retries after a failed save. - A settled card shows only the title and "You saved your own text". - New regression: `scripts/regressions/mari/held-change-and-retry.regression.ts`. ## 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 Agent-run (not manual): `tsc`, ESLint, Prettier, `localization:check`, the held-change-and-retry regression, and seeded Playwright 29/29 at 1440 and 390. No real model was used. Full `pnpm check` was not run locally. To verify manually: 1. Ask Prof. Mari to change a field while the write fails. Manually verify the change stays failed. 2. Hold a change, edit the field yourself, and save. Manually verify the card shows "You saved your own text". 3. Make the settle save fail. Manually verify it retries. ## 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) Screenshots are local; attach on request. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:38:52 +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#8679
No description provided.