Repository navigation
feat(SwipeActions): swipe messages and Activity items to run an action - #530
Merged
Merged
Conversation
Two-finger trackpad swipes on messages (channels, DMs, Unreads, threads) and Activity items run an action picked per surface and direction: any message menu or hover action, an app shortcut, a reaction, or an Activity menu item or hover button such as Clear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pop-outs Messages with attachments start with hidden aria-label spans, so the swipe moved a span and the reveal covered the message. Slide the row child that holds the message kit instead. Node checks no longer use instanceof, which missed every node in a pop-out window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Resting fingers past the line no longer count as letting go; a stop after steady movement waits 300 ms before the action runs. - Wheel events use their own timestamps, so momentum queued behind a slow render doesn't start a new swipe. - A vertical scroll or reversal right after a swipe is no longer swallowed as momentum. - Engine clock and timers come from the window the swipe happens in. - Retry finding Slack's message action handler instead of caching a miss. - Wait for the saved action list to load before saving discoveries. - Roll back the editor when saving a setting fails. - Split Activity "to-do" and "Save for later" into separate actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ealed strip Slowing down while sliding back was read as post-lift momentum, and taking that travel back put the row past the line again, so it ran anyway. A run of shrinking deltas toward the start now cancels, and pulling back 20px from the furthest point disarms until you push out again. The label now spans the revealed strip and adapts to its size: icon over text on tall rows, one line with an ellipsis on short ones, icon only when narrow. Built-in actions get short names.
3kh0
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Swipe Actions plugin (
messagescategory, off by default).What it does
Swipe a message or Activity item sideways with two fingers on a trackpad to run an action, like swiping an email on a phone. The row slides with your fingers over a coloured reveal showing the action; past the line it fills in and taps the trackpad once (
navigator.vibrate, Slack desktop on a Mac), and letting go runs it. Letting go short of the line puts it back; a quick flick runs it anyway.Each direction gets its own action, per surface:
handle_message_actions), an app message shortcut, another plugin's action frommenu.getMessageActions, or toggling a reaction with a chosen emoji (changeReactionFromUserAction).getActivityItemMenuTemplate/getNonChannelActivityItemMenuTemplate), or a hover toolbar button such as Clear, Mark complete or Reschedule.The custom settings panel lists seeded actions, plus anything seen when you open a message's or an Activity item's menu (
MAMenu/MenuFromTemplatepatches), saved in plugin storage. Swipe distance, when the action runs (on release or on crossing the line), quick flicks, haptics and scroll direction are live settings.How swipes are read
Pages get no scroll phases, so
engine.tsreads swipes fromwheelevents alone: a capture-phase, non-passive document listener locks to the horizontal axis, and the end of a swipe is a gap in events or a run of shrinking deltas (AppKit momentum after the fingers lift), whose travel is taken back. Vertical scrolling, mouse wheels (coarse first deltas,deltaMode, Shift) and sideways scrolling inside code blocks and tables are left alone. Pop-outs are covered throughapi.onDocument.Verification
bun run fmt:check,bun run lint,bun run typecheck,bun run test(newengine.test.tsandactions.test.ts).lint:shnot run: no ShellCheck locally, and no shell changes.bun run build -- desktop firefox chromium userscript,bun run extension:lint,bun run extension:validate,git diff --check🤖 Generated with Claude Code