Expand description
Portable action catalogue.
The shell’s command surfaces (command palette, context palette,
radial palette) share a single enumerated vocabulary of actions
(ActionId) grouped into logical families (ActionCategory). The
pre-M4-slice-1 home for these types was render::action_registry
in the graphshell crate, which also carried host-coupled helpers
(input-binding lookup, action-registry-driven ActionContext
filtering). This module splits off the portable leaves so that
downstream portable state — CommandPaletteSession’s Tier 1
selection, the omnibar’s action-match types, future iced-host
action-dispatch — can reference the vocabulary without pulling in
the host-side registry machinery.
The render-side [render::action_registry] module re-exports the
symbols here for zero-churn at call sites; host-coupled helpers
(ActionId::shortcut_hints, the ActionContext / ActionEntry
filtering surface, the list_actions_for_context resolver) stay
alongside the re-exports.
Enums§
- Action
Category - Logical grouping of actions, used for separators and ordering in the command palette and as sector grouping in the radial palette.
- Action
Id - Stable identifier for a registered action.
- Input
Mode - Preferred input mode, used as a layout hint by control surfaces.
Constants§
- CATEGORY_
PIN_ ORDER_ PERSIST_ KEY - Persistent-storage key for user-pinned category ordering.
- CATEGORY_
RECENCY_ PERSIST_ KEY - Persistent-storage key for the recency ring used by palette ranking.
Functions§
- action_
id_ has_ namespace_ format truewhenidmatches thenamespace:namekey format the registry enforces for cross-surface routing. Bothnamespaceandnamemust be lowercase ASCII alphanumerics plus_; exactly one:separator; no empty parts.- all_
action_ ids - Every
ActionIdvariant. Useful for generators (settings UI that lists every keybinding, doc exporters, consistency audits) and the render-side dispatch table that wires each variant’s enabled predicate into the palette context. - category_
from_ persisted_ name - Inverse of
category_persisted_name. ReturnsNonefor unknown names so callers can decide whether to fall back to a default or surface a diagnostic. - category_
persisted_ name - Stable machine-readable name for a category. Used when persisting user preferences (pin order, recency ring) across sessions.
- default_
category_ order - Canonical base ordering for action categories in command surfaces. Callers may re-rank based on context, recency, and user pinning; this is the default when no other signal applies.