Skip to content

Slash command menu working.#9358

Open
abhishekp106 wants to merge 6 commits intomasterfrom
abhishek/slash-command-menu
Open

Slash command menu working.#9358
abhishekp106 wants to merge 6 commits intomasterfrom
abhishek/slash-command-menu

Conversation

@abhishekp106
Copy link
Copy Markdown
Contributor

Description

Adds the new slash command menu for cloud mode v2.

https://www.loom.com/share/12c523ae66ca4e26b2d2ef46fdbcb035

Testing

See loom.

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
Copy link
Copy Markdown
Contributor Author

abhishekp106 commented Apr 29, 2026

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@abhishekp106

I'm starting a first review of this pull request.

You can follow along in the session on Warp.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a Cloud Mode V2 slash-command menu, including a new floating view, zero-state grouping for commands/skills/prompts, compact slash-command item rendering, and routing of keyboard acceptance/navigation to the new view when composing in Cloud Mode V2.

Concerns

  • The new click handler in CloudModeV2SlashCommandView::rebuild_from_results captures and moves an unused weak handle, which makes the callback fail the renderer's Fn requirement and blocks compilation.

Verdict

Found: 1 critical, 0 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

item,
cmd_or_ctrl_enter: false,
});
let _ = weak_handle;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] This let _ = weak_handle; moves the captured WeakViewHandle out of the click closure, so the closure is only FnOnce and cannot satisfy QueryResultRenderer::new's Fn bound or be reused for every renderer. Remove the unused weak-handle capture/field, or create a fresh clone per renderer if the callback needs it.

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a Cloud Mode V2 slash-command menu, new sectioned zero-state results for commands/skills/prompts, compact slash-command item rendering, and routes keyboard acceptance/navigation to the new menu while composing.

Concerns

  • The new cloud-mode view currently captures and moves weak_handle inside its click callback, which makes the callback incompatible with the Fn callback expected by QueryResultRenderer::new and reused for each renderer.
  • The shared slash-command data source is switched to compact/v2 behavior whenever CloudModeInputV2 is enabled, even though the regular inline slash menu still uses the same handle outside cloud-mode composing.
  • Security pass: no security-specific findings in the changed lines.

Verdict

Found: 1 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

item,
cmd_or_ctrl_enter: false,
});
let _ = weak_handle;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] let _ = weak_handle; moves the captured handle out of the click closure, so the closure is FnOnce while QueryResultRenderer::new requires an Fn and this same callback is reused for every renderer; remove this capture or clone per renderer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread app/src/terminal/input.rs Outdated
terminal_view_id,
};
if FeatureFlag::CloudModeInputV2.is_enabled() {
SlashCommandDataSource::for_cloud_mode_v2(args, ctx)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This switches the shared slash_command_data_source to compact/v2 rendering for every slash menu whenever the flag is enabled, but the regular inline slash menu still receives this handle outside is_cloud_mode_input_v2_composing; keep the default source for the inline view or create a separate v2 source for CloudModeV2SlashCommandView.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu branch from 9c0eb09 to 849517c Compare April 29, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant