mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6780] [MERGED] feat: add message bookmarks, notes, pins and optional recovery #7329
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#7329
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/6780
Author: @SirAdoni
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @SpicyMarinara
Base:
staging← Head:contrib/6698-message-tools📝 Commits (10+)
e452399feat: add message bookmarks notes pins and optional recoverycd83b17Merge staging and preserve message trash on downgrade5a4acfcfix: align message recovery results and enforce restored pin limits31b65c3Merge staging inventory update into message tools517e4a7fix: clean expired message recovery records safely822363cMerge staging ruleset inventory update into message toolsba08173style: format message trash maintenance setupc08a4bafix: preserve message recovery and context edit consistency8efebeefix: keep hidden bookmarks and Mari retries out of message lists5758252fix: avoid nested context-start metadata queue deadlock📊 Changes
38 files changed (+3229 additions, -150 deletions)
View changed files
📝
CHANGELOG.md(+23 -1)➕
e2e/message-marks-trash.e2e.ts(+216 -0)➕
e2e/message-trash-batching.e2e.ts(+183 -0)📝
packages/client/src/components/chat/ChatInput.tsx(+1 -1)📝
packages/client/src/components/chat/ChatMessage.tsx(+7 -0)➕
packages/client/src/components/chat/ChatMessageMarksPanels.tsx(+255 -0)📝
packages/client/src/components/chat/ChatMessageSearch.tsx(+76 -31)📝
packages/client/src/components/chat/ConversationInput.tsx(+1 -1)📝
packages/client/src/components/chat/ConversationMessage.tsx(+2 -0)📝
packages/client/src/components/chat/ConversationMessageActions.tsx(+3 -1)📝
packages/client/src/components/chat/ConversationMessageGrouped.tsx(+2 -0)📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+2 -2)📝
packages/client/src/components/chat/MessageActionButton.tsx(+65 -1)➕
packages/client/src/components/chat/MessageMarks.tsx(+287 -0)📝
packages/client/src/components/panels/SettingsPanel.tsx(+17 -0)📝
packages/client/src/components/panels/settings/FeatureSwitchesSettings.tsx(+1 -0)📝
packages/client/src/hooks/use-chats.ts(+100 -6)📝
packages/client/src/localization/locales/en.json(+52 -0)📝
packages/client/src/stores/ui.store.ts(+8 -0)📝
packages/server/src/app.ts(+12 -0)...and 18 more files
📄 Description
Linked issue
Closes #6808. Partial implementation of #6698; the umbrella issue remains open.
Why this change
Users need persistent bookmarks, private notes and optional message recovery without losing queued edits or blocking chat metadata changes.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdpnpm check; prompt and focused storage/route regressions; six conversation/roleplay desktop/mobile Chromium/WebKit browser cases; seven shell smoke cases passed. Strengthened contributor history-start and feature-settings regressions also passed. The combined six-feature browser run passed 28 applicable cases with two intentional mobile skips; the final combined trash regression also passed.
Local CodeRabbit completed: two valid findings fixed; three suggestions rejected with code-based reasons recorded in review discussion. Latest hosted findings are fixed and published in
d035de970, including the outside-diff saved Game-state recovery boundary. Full pnpm check passed on that exact revision. Current-head review and checks remain merge gates.Manual verification
Manually verify marks and note saving with the real mobile keyboard, pin/history limits, partial recovery, retention disabled and export privacy. Recovery restores messages and swipes; it does not undo other world-state effects.
Automated browser evidence does not claim physical-device or manual container verification. Human checklist states are preserved.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedAdded an Unreleased changelog entry. No release metadata or user-facing docs changed.
UI evidence
Browser evidence (download the HTML to view the embedded screenshots). Captions distinguish before/after captures from current feature screenshots.
Summary by CodeRabbit
Maintainer verification
The latest fix,
9b9d929ba, keeps message marks atomic across all swipes by reusing the existing writer. Inactive-swipe pinning immediately counts toward the chat limit, and a concurrent swipe switch cannot restore stale marks. Swipe-specific fields remain scoped to their target. Mixed mark/scan updates still schedule stored-scan compaction, only after the transaction succeeds.At this commit,
pnpm checkand all four focused regressions pass: message-trash, message-marks, lorebook-scan-compaction, and advanced-memory-history-start. The retained proofs cover inactive pin limits, mark clearing, mixed fields, concurrent swipe selection, private-note isolation, recovery behavior and mixed PATCH compaction. The independent race reproduction previously allowed 11 pins; the fix preserves marks, rejects the extra pin with HTTP 409 and keeps the count at 10. Independent source review found no substantive issue. Local CodeRabbit completed with zero findings across the five-file delta.Earlier fixes preserve retryable restoration failures, results from completed batches (including conflicts-only batches), Game snapshot safeguards, queue ordering and partial-restore memory reconciliation. The existing UI shows the later error as a warning and keeps unresolved entries retryable. All six batching cases were verified across focused desktop Chromium, mobile Chromium and mobile WebKit runs; shell smoke passed 7/7. The UI is unchanged by this final backend fix. Markdown/HTML private-note exclusion is covered with export opt-in both off and on.
Current-head hosted CodeRabbit and required GitHub checks remain merge gates. Human checklist states are preserved.
Local build and container verification
Tested commit:
2bb529a97e. Full local pnpm check passed. The full Docker image built successfully and ran with synthetic data; HTTP readiness and embedded build commit were verified. These results do not claim completion of the remaining manual and UI edge-case checklist.Agent-operated production-container browser verification at the tested commit completed the delete-to-trash and restore workflow using synthetic messages. Restored content, bookmark, pin and note indicator returned; the trash became empty. This is browser interaction, not physical-device testing. Broader theme, empty-state and error-path verification remains pending.
Additional evidence for tested revision
2bb529a97eEvery named focused browser case has a passing result across runs, but this was not one clean 12/12 suite. The original matrix passed 10/12; an intermediate desktop retry passed 1/2. Both desktop large-batch cases subsequently passed individually with unchanged source, assertions and timeouts and tracing disabled. Desktop timing remains flaky. Light-desktop and dark-narrow supplements passed 2/2 for the marks dialog. This evidence applies to the stated tested revision, not automatically to later merged changes. General edge-case and overall completion boxes remain unchecked.
Merged-revision backend verification
At
9b9d929bae, the message-trash regression (including mark/swipe atomicity) and lorebook-scan-compaction regression each passed. Full local pnpm check passed. The full Docker image rebuilt and ran successfully, with HTTP readiness and its embedded commit verified. This updates the local-check and container evidence to the merged revision; prior browser results remain scoped to2bb529a97and retain the documented timing limitations. Overall manual and edge-case completion remain unchecked.Current-revision interactive follow-up at
9b9d929bae: after refreshing the production client, synthetic message bookmark, pin and note state remained present. Editing a note, saving, reloading and reopening it preserved the exact updated text. This agent-operated UI walkthrough supports the interactive row on the merged revision alongside the local-check and Docker evidence above. No provider request was made. Broad edge-case and overall verification remain unchecked.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.