mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7233] [MERGED] test(e2e): cover the trash's deleting status and release a failed trash hold #7638
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#7638
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/7233
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:test/trash-followups📝 Commits (1)
48a18a9test(e2e): cover the trash's deleting status and release a failed trash hold📊 Changes
2 files changed (+63 additions, -21 deletions)
View changed files
📝
e2e/message-marks-trash.e2e.ts(+41 -21)📝
e2e/message-trash-responsive.e2e.ts(+22 -0)📄 Description
Linked issue
Refs #7210, #7220
This is the follow-up promised in two CodeRabbit threads that were deferred so their PRs could land:
Why this change
holdMessageTrash, which lets parallel e2e runs share the global Message Trash switch. It saves this run's hold toholders.jsonbefore it removes its lock. If removing the lock fails, the helper rejects before it returns its release callback. The test calls the helper before itstry/finally, so nothing ever releases that hold. Message Trash then stays on, and the holder count stays wrong, until the e2e servers restart.What changed
Test-only. No app code, docs or CHANGELOG entry.
e2e/message-trash-responsive.e2e.ts: after the existing restore checks, the test empties the trash (Empty trash, then "Click again to empty") whilepage.routeholds the/trash/deleterequest. It checks that therole="status"region reads "Deleting messages…" while the request is pending, and is empty again once it finishes. It also checks that exactly one{ all: true }delete was sent. The held request is released infinally, like the restore. Existing assertions are unchanged.e2e/message-marks-trash.e2e.ts:holdMessageTrashnow takes back its own hold if letting go of the lock fails after the hold was counted. The lock is still held at that point, so the helper decrements the holder count, restores the original settings if it was the last holder, writes the file and tries to remove the lock again. Other active holders keep their holds. It then rethrows the original error. If the rollback fails too, it throws anAggregateErrorwith both errors. The lock-release steps and the release logic are now small shared helpers (unlock,release), so the normal release and the rollback use the same code.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run evidence (local macOS, Playwright 1.63; the boxes above are left for the human reviewer):
pnpm exec playwright test e2e/message-trash-responsive.e2e.ts e2e/message-marks-trash.e2e.ts --project=desktop-chromium --project=mobile-webkit --workers=1 --repeat-each=2: 12 passed, on this branch rebased ontostagingafter #7226 and #7229 merged.ChatTrashListshowed the restore wording for deletes too. The test failed on both projects at the new assertion:Expected: "Deleting messages…",Received: "Restoring messages…".holders.jsonreads{ holders: 0 }, the lock is gone, and the feature settings equal the original.{ holders: 1, original }), Message Trash stays on, and the lock is gone. Releasing the other holder then restores the original settings.stagingfails:holders.jsonstill reads{ holders: 1, original: {} }after the rejected hold.pnpm checkpassed on the final commit.coderabbit review --agent --committed) returnedrate_limit(43 minutes) and did not review this commit. The GitHub CodeRabbit review has not run yet either.Manual verification notes
pnpm regression:ui e2e/message-trash-responsive.e2e.ts --project=desktop-chromium --project=mobile-webkit --workers=1and confirm both pass.pnpm regression:ui e2e/message-marks-trash.e2e.ts --project=mobile-webkit --project=mobile-chromium --repeat-each=2 --workers=4and confirm no failures.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Not applicable: test-only change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.