Skip to content

Add action metadata and selected-action preview panel#806

Closed
multiplex55 wants to merge 2 commits intomasterfrom
codex/add-ui-preview-panel-for-actions
Closed

Add action metadata and selected-action preview panel#806
multiplex55 wants to merge 2 commits intomasterfrom
codex/add-ui-preview-panel-for-actions

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Provide richer context for launcher results so users can see a human-friendly preview, risk level, and optional icon for actions.
  • Surface metadata for high-impact operations (system, recycle, layout, task manager) to reduce accidental destructive actions.
  • Let users toggle the preview UI and choose a compact presentation from settings so the feature is optional and non-intrusive.

Description

  • Extend the action model by adding preview_text: Option<String>, risk_level: Option<ActionRiskLevel>, and icon: Option<String> plus a new ActionRiskLevel enum for Low/Medium/High/Critical in src/actions/mod.rs.
  • Populate metadata for high-impact plugins and their command shortcuts in src/plugins/system.rs, src/plugins/task_manager.rs, src/plugins/recycle.rs, and src/plugins/layout.rs so returned Actions carry preview text, a risk classification, and an icon identifier.
  • Update the main launcher UI (src/gui/mod.rs) to render a split view showing the results list and a preview pane when an item is selected and preview_enabled is true, with compact/expanded behavior controlled by preview_compact_mode.
  • Add settings fields preview_enabled and preview_compact_mode to Settings and wire them into the settings editor so the preview panel can be enabled/disabled and persisted; propagate those settings into LauncherApp state.
  • Add/adjust many action constructors and widget code paths to initialize new Action fields (defaulting to None where appropriate) and add new unit tests that assert metadata presence and selection/visibility behavior.

Testing

  • Ran cargo fmt successfully to format the changes.
  • Attempted cargo check and running the test suite, but cargo check failed in this environment due to a Rust toolchain mismatch (installed rustc 1.87.0 while a dependency requires 1.88.0), so automated compilation/tests could not complete here.
  • Added/updated unit tests covering selection behavior and plugin metadata expectations (examples: tests/selection.rs, tests/gui_visibility.rs, tests/system_plugin.rs, tests/task_manager_plugin.rs, tests/recycle_plugin.rs, tests/layout_plugin.rs), but their execution was blocked by the toolchain constraint.
  • Committed all changes after formatting; the change set includes model, plugin, UI, settings, and test updates described above.

Codex Task

@multiplex55 multiplex55 closed this Feb 8, 2026
@multiplex55 multiplex55 deleted the codex/add-ui-preview-panel-for-actions branch February 8, 2026 01:16
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