Skip to content

Slash command menu sidecar.#9359

Merged
abhishekp106 merged 3 commits intomasterfrom
abhishek/slash-command-menu-sidecar
Apr 30, 2026
Merged

Slash command menu sidecar.#9359
abhishekp106 merged 3 commits intomasterfrom
abhishek/slash-command-menu-sidecar

Conversation

@abhishekp106
Copy link
Copy Markdown
Contributor

Description

Sidecar now works for the new slash command menu for cloud mode v2.

Testing

https://www.loom.com/share/6089946eae214fcb8f15c82c746d5d6b

@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
Contributor

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
Contributor

@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 generic search item detail metadata and uses it to render a sidecar for truncated Cloud Mode v2 slash command menu rows.

Concerns

  • No blocking correctness, security, error-handling, or performance concerns were found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

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
Contributor

@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 generic search item detail plumbing and renders a sidecar for selected cloud-mode-v2 slash command menu items when the selected row appears truncated. The security pass did not identify data exposure, injection, or unsafe execution concerns in the changed code.

Concerns

  • The truncation predicate does not match the actual slash command row layout when descriptions are present, so common rows with short command names and long descriptions can truncate without showing the sidecar.
  • The sidecar overlay is positioned with unbounded window behavior, so it can render outside split panes or narrow windows and leave truncated content inaccessible.

Verdict

Found: 0 critical, 2 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

Comment on lines +86 to +90
match &detail.description {
Some(description) => {
let description_em = font_cache.em_width(appearance.ui_font_family(), font_size);
let description_px = description_em * description.chars().count() as f32;
(name_px + NAME_DESCRIPTION_GAP_PX + description_px) > available
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This truncation check does not match the actual row layout: rows with descriptions reserve a fixed name column in InlineItem::render_item, so a short title plus long description can still truncate even when this sum fits. Use the same name-column width when computing description availability.

OffsetPositioning::offset_from_save_position_element(
row_position_id,
vec2f(SIDECAR_GAP, 0.),
PositionedElementOffsetBounds::Unbounded,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Unbounded lets the sidecar render outside the window when the slash menu is near the right edge or in a narrow split, making the truncated text unreachable. Use window-bounded positioning so the sidecar shifts back on-screen.

Suggested change
PositionedElementOffsetBounds::Unbounded,
PositionedElementOffsetBounds::WindowByPosition,

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-sidecar branch from d5c1c0b to 80055bb Compare April 29, 2026 03:21
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu branch from 9c0eb09 to 849517c Compare April 29, 2026 03:21
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu-sidecar branch 2 times, most recently from 87c2dd6 to 9187f64 Compare April 29, 2026 03:32
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu branch from 21bc4dc to a9aebec Compare April 29, 2026 03:32
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu-sidecar branch from 9187f64 to d767b46 Compare April 29, 2026 18:29
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu branch from 4066eb6 to d8daf72 Compare April 29, 2026 18:38
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu-sidecar branch 3 times, most recently from 61db123 to 5769608 Compare April 29, 2026 20:17
Copy link
Copy Markdown
Contributor

@liliwilson liliwilson left a comment

Choose a reason for hiding this comment

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

Super cool!

Nit from previous PR that I noticed while testing this one:

Image

On a shorter screen, the menu overflows and you can be highlighting things you can't select—can we make sure it stays in bounds and make it shorter if it needs to be?

@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu-sidecar branch from 5769608 to 6fff18b Compare April 29, 2026 22:48
Base automatically changed from abhishek/slash-command-menu to master April 29, 2026 23:48
@abhishekp106 abhishekp106 force-pushed the abhishek/slash-command-menu-sidecar branch from 6fff18b to fd55110 Compare April 29, 2026 23:49
@abhishekp106
Copy link
Copy Markdown
Contributor Author

Ack, will fix in a follow-up!

@abhishekp106 abhishekp106 merged commit 199cd94 into master Apr 30, 2026
25 checks passed
@abhishekp106 abhishekp106 deleted the abhishek/slash-command-menu-sidecar branch April 30, 2026 00:12
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.

2 participants