Skip to content

Enhance list-backed action discovery for mouse gesture picker#929

Merged
multiplex55 merged 2 commits intomasterfrom
codex/enhance-action-discovery-in-mouse-gestures-dialog
Mar 13, 2026
Merged

Enhance list-backed action discovery for mouse gesture picker#929
multiplex55 merged 2 commits intomasterfrom
codex/enhance-action-discovery-in-mouse-gestures-dialog

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the gesture binding editor’s "Pick an action" UI surfaces real user-list items for list-backed plugins (clipboard, emoji, processes, notes, folders, bookmarks, todo, snippets) instead of leaving only query: stubs.
  • Make the picker deterministic and cheap while preferring search-driven list results when they contain concrete selectable actions.

Description

  • Extend list_query_prefix_for_plugin() to return (primary_prefix, Option<alternate_prefix>) and add mappings for clipboard, emoji, processes, note/notes, folders, bookmarks, todo, and snippets.
  • Add helper has_concrete_actions() that detects non-query: (concrete) actions.
  • Update resolve_action_source() to: try the mapped plugin.search() using the primary prefix (with the provided filter), accept results only if they contain concrete actions, retry an alternate prefix if present, and finally fall back to plugin.commands().
  • Refactor and expand unit tests in the mouse_gestures_dialog.rs test module by replacing the simple mock with a query-aware mock that records seen queries and supports per-query responses, and add table-driven tests covering each mapped plugin, the alternate-prefix retry, empty-search fallback, and unmapped-plugin fallback.
  • Apply cargo fmt to the modified file src/gui/mouse_gestures_dialog.rs.

Testing

  • Ran cargo fmt on the modified file which completed successfully.
  • Ran cargo test targeting the modified test area but full test compilation failed in this environment because the system ALSA development library is missing (pkg-config could not find alsa.pc), so the added tests could not be executed here.
  • All changes are covered by new/extended unit tests in src/gui/mouse_gestures_dialog.rs and validated locally where system dependencies are available.

Codex Task

@multiplex55 multiplex55 merged commit ade3946 into master Mar 13, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/enhance-action-discovery-in-mouse-gestures-dialog branch March 25, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant