[Feature]: Macros, named action sequences you can run from any action picker
Problem Statement
Many places in the app let you pick one action: button remaps, Duo gestures, Status Glance and Island taps, lockscreen shortcuts and DIY automations. If you want the same few steps in several of them (for example: turn on DND, set volume, open an app), you have to build that sequence again in each one, and keep the copies in sync when you change it. Some pickers only take a single action, so a sequence isn't possible there at all.
Proposed Solution
A macro is a named list of actions, saved once and offered as a Run macro action in every action picker (a "Macros" category). Editing a macro updates every place that uses it.
- Built on the existing DIY pieces:
Action,ActionSequenceEditor,CombinedActionExecutorandDIYRepository. - Macros can't contain other macros, so there are no loops.
- In pickers limited to screen-on actions, macros that contain an excluded action are hidden.
- Deleting a macro asks first, since the places that use it will stop running it.
Where the UI lives is open. I've posted three options with mockups in #1419 (https://github.com/sameerasw/essentials/pull/1419#issuecomment-6721350429). My suggestion is Option A: a macro is another DIY type, using the same list, + sheet and editor as other automations, with no new tab or screen. I'll follow whichever design you prefer, or wait for your DIY redesign.
Alternatives Considered
- Duplicating the same action sequence in every place (what users do today).
- Asking for multi-action support in each picker separately, which repeats the same UI many times.
- Running an external macro app (MacroDroid, Tasker), as asked in #1639. Built-in macros cover common cases without a second app.
Affected Areas
- DIY: list, + sheet, automation editor,
DIYRepository,DIYViewModel,ActionRegistry,CombinedActionExecutor. - Action pickers that gain the Macros category: button remap, Duo gestures, Dynamic Island and Status Glance taps, lockscreen shortcuts. Duo and the Island are shared parts, so I'd like your OK on these. The change there is only the picker list, not the models.
- No changes to
ScreenOffAccessibilityService, the keyboard, gesture handling orSettingsRepositorystructure. No new dependencies.
Priority
Medium - Would improve my experience
Contribution
- [x] I would be willing to implement this feature once it is approved and assigned to me
Additional Context
#1419 was opened in October, before the approved-issue rule, so I'm filing this to bring it in line. The PR is a draft and changes about 1,470 lines. With Option A it should get smaller, since it reuses the automation editor and removes the separate macro editor, list item and store. If it's still over ~1,000 lines, I'm happy to split it: (1) the macro model, storage and Run macro action, then (2) the DIY UI.
🤖 Generated with Claude Code
Duplicate of #1696, closing.