[PR #8400] [MERGED] feat(mari): swipe undo cards to close or undo #8578

Closed
opened 2026-11-07 16:45:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: feat/mari-undo-card-swipe


📝 Commits (5)

  • 54070db feat(mari): swipe undo cards to close or undo
  • ff702b0 Merge remote-tracking branch 'origin/staging' into feat/mari-undo-card-swipe
  • a7c3b91 fix(mari): track one pointer per swipe and disarm on outside release
  • c74ef9a fix(mari): drop stale swipe origin when the card stops being swipeable
  • c41d84f fix(mari): reset swipe when the card detaches and protect a moved drag

📊 Changes

3 files changed (+89 additions, -2 deletions)

View changed files

📝 packages/client/src/components/chat/MariChangeReceipt.tsx (+76 -1)
📝 packages/client/src/styles/mari.css (+12 -0)
📝 scripts/regressions/professor-mari/change-receipt.regression.ts (+1 -1)

📄 Description

Why

Prof. Mari's change cards only close their Undo window by waiting or through the omnibar, and Undo needs a precise tap on a small button. On a phone, a Mail-style swipe is the natural way to deal with a card quickly.

What changed

  • An open Mari change card (Undo still available, nothing busy) can be swiped sideways, with touch or a mouse drag:
    • Swipe left → Close: the change stays; the Undo offer closes (answered as "kept", the existing path). The card folds to its quiet state.
    • Swipe right → Undo: same as the Undo button.
  • It commits past one third of the card width; shorter drags spring back. The card follows the pointer and fades while dragging.
  • Vertical scrolling stays native (touch-action: pan-y); a swipe that ends on a button does not press it.
  • Additive only: all buttons stay. No new copy, so no localization change.

No linked issue: planned UX polish from the maintainer.

Manual verification

  • Manually verify on a phone: swipe left on an open change card closes Undo and the card folds to its quiet state
  • Manually verify on a phone: swipe right undoes the change
  • Manually verify a short swipe springs back and does nothing
  • Manually verify vertical scrolling over the card still scrolls the chat
  • Manually verify mouse drag on desktop does the same, and a drag ending on "Open" does not open the record
  • Manually verify closed/undone cards do not move

Local validation

  • Client tsc --noEmit: 0 errors; ESLint on the changed file: clean; Prettier: clean.
  • Not run in a browser yet.

🔄 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/8400 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/mari-undo-card-swipe` --- ### 📝 Commits (5) - [`54070db`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54070db3b22908877b47df01d4188e62f3b41f1d) feat(mari): swipe undo cards to close or undo - [`ff702b0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ff702b0274c0a0c22433411e794f0e22901fbb79) Merge remote-tracking branch 'origin/staging' into feat/mari-undo-card-swipe - [`a7c3b91`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a7c3b912e5d2843aba5693e092f27df415924d5a) fix(mari): track one pointer per swipe and disarm on outside release - [`c74ef9a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c74ef9a0e0e783636ffe2a5f650dc3031bae9704) fix(mari): drop stale swipe origin when the card stops being swipeable - [`c41d84f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c41d84f79d5de0dfd0ae0bf0beaf90b4078d60ec) fix(mari): reset swipe when the card detaches and protect a moved drag ### 📊 Changes **3 files changed** (+89 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/MariChangeReceipt.tsx` (+76 -1) 📝 `packages/client/src/styles/mari.css` (+12 -0) 📝 `scripts/regressions/professor-mari/change-receipt.regression.ts` (+1 -1) </details> ### 📄 Description ## Why Prof. Mari's change cards only close their Undo window by waiting or through the omnibar, and Undo needs a precise tap on a small button. On a phone, a Mail-style swipe is the natural way to deal with a card quickly. ## What changed - An open Mari change card (Undo still available, nothing busy) can be swiped sideways, with touch or a mouse drag: - **Swipe left → Close:** the change stays; the Undo offer closes (answered as "kept", the existing path). The card folds to its quiet state. - **Swipe right → Undo:** same as the Undo button. - It commits past one third of the card width; shorter drags spring back. The card follows the pointer and fades while dragging. - Vertical scrolling stays native (`touch-action: pan-y`); a swipe that ends on a button does not press it. - Additive only: all buttons stay. No new copy, so no localization change. No linked issue: planned UX polish from the maintainer. ## Manual verification - [ ] Manually verify on a phone: swipe left on an open change card closes Undo and the card folds to its quiet state - [ ] Manually verify on a phone: swipe right undoes the change - [ ] Manually verify a short swipe springs back and does nothing - [ ] Manually verify vertical scrolling over the card still scrolls the chat - [ ] Manually verify mouse drag on desktop does the same, and a drag ending on "Open" does not open the record - [ ] Manually verify closed/undone cards do not move ## Local validation - Client `tsc --noEmit`: 0 errors; ESLint on the changed file: clean; Prettier: clean. - Not run in a browser yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:45:44 +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#8578
No description provided.