Skip to content

Preview the highlighted skill's description in the picker - #581

Open
xsh310 wants to merge 5 commits into
skills-picker-download-wiringfrom
skills-picker-download-preview
Open

xsh310 wants to merge 5 commits into
skills-picker-download-wiringfrom
skills-picker-download-preview

Conversation

@xsh310

@xsh310 xsh310 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

What

A small UX follow-up on the ug skill add picker (PR #579): the picker now previews the highlighted skill's description in a footer, so a row is more than a bare FQN. Requested in review on #579.

Changes

  • SkillRef gains a description field, populated by _skill_ref from the ListSkills response, so it rides in on the same streaming walk with no per skill GetSkill.
  • _skill_download_choice passes it through as the Choice.description.
  • scrolling_checkbox gains show_description (default False, so the MCP picker is unchanged). When on, it renders the highlighted row's description in its own footer window, updating as you move the cursor.

Why a footer rather than questionary's inline show_description

questionary's built-in show_description appends the description as an extra line inside the choices window. That window is sized to the row count in this picker, so the inline line would be clipped. A dedicated footer window (mirroring the existing search string and loading footers) sidesteps that, and showing only the highlighted row's description means a long one (UC caps skill descriptions at ~1024 chars) is confined to a bounded, 2 line wrapping footer via _description_preview, instead of bloating every row.

 › main.default.triage
   main.default.pii
   ml.prod.scoring
 Routes incoming support tickets to the right on call queue by severity.   ← footer: highlighted row

Testing

uv run ruff check ., ruff format --check src tests, ty check src, and uv run pytest all pass (the 2 pre-existing e2e failures in test_e2e_user_agent and test_claude_smart_routing_v2 are unrelated and also fail on the base branch). New unit tests cover _description_preview boundaries (short unchanged, at the limit unchanged, long clipped with an ellipsis), _skill_ref carrying the description, the Choice carrying it, and the picker being invoked with show_description=True.

Stacked on #579.

Screen.Recording.2026-09-12.at.12.01.57.AM.mov

This pull request and its description were written by Isaac.

@xsh310
xsh310 added this pull request to stack #576 September 12, 2026 05:37
@xsh310
xsh310 marked this pull request as ready for review September 12, 2026 07:13
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from d4e6fb4 to 0a3ef3f Compare September 12, 2026 07:14
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 0a3ef3f to b3cf561 Compare September 12, 2026 07:17
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from b3cf561 to ee3dc27 Compare September 14, 2026 03:08
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from ee3dc27 to ac863e4 Compare September 14, 2026 20:09
[
Window(height=Dimension.exact(1)),
Window(
height=Dimension.exact(2),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2 (UX): the description footer window is fixed at Dimension.exact(2). A UC description containing embedded newlines will have its later lines clipped even when it's well under the 240-char budget. UC descriptions are usually single-line, so minor — but consider collapsing whitespace/newlines into spaces before preview so the 2-line budget is spent on content rather than a hard-wrapped first line.

@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from ac863e4 to 4a40600 Compare September 14, 2026 22:32
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 4a40600 to 2c4e0cb Compare September 14, 2026 23:20
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 2c4e0cb to 79bb936 Compare September 15, 2026 00:53
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 79bb936 to 7c8ce62 Compare September 15, 2026 01:17
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 7c8ce62 to 063b7ce Compare September 15, 2026 01:41
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 063b7ce to f2a018d Compare September 15, 2026 03:30
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from f2a018d to 1260870 Compare September 15, 2026 03:40
xsh310 and others added 4 commits September 15, 2026 04:41
Add a footer to the download picker that previews the description of the
highlighted skill, so a picker row is more than a bare FQN.

- SkillRef gains a description field, populated by _skill_ref from the
  ListSkills response, so it rides in on the same streaming walk with no
  per skill GetSkill.
- _skill_download_choice passes it as the Choice description.
- scrolling_checkbox gains show_description (default False, so the MCP
  picker is unchanged). It renders the highlighted row's description in its
  own footer window rather than questionary's inline show_description, whose
  extra line the fixed-height choices window would clip. A ~1024 char
  description is truncated to a bounded preview (_description_preview).

Co-authored-by: Isaac <no-reply@databricks.com>
Address two picker paper cuts: prefix the preview with a bold
`Skill description:` label so it reads as the skill's description, and move
the left margin into get_line_prefix so wrapped continuation lines keep the
indent instead of falling back to column 0.

Co-authored-by: Isaac <no-reply@databricks.com>
Move the scroll and loading footers back above the description, and put the
description in its own bottom block with a blank line above it, so it reads as
a detail pane separated from the navigation hints rather than crowding them.

Co-authored-by: Isaac <no-reply@databricks.com>
Replace the static `Skill description:` prefix with the highlighted skill's
bundle name, since the row shows the FQN and the bundle name (the on-disk dir)
is the one identifier not otherwise on screen. The picker footer now bolds a
leading `label:` in the description generically; the skills layer formats the
description as `<bundle_name>: <description>`.

Co-authored-by: Isaac <no-reply@databricks.com>
Drop the skill-specific aside from the preview-cap comment; the picker is a
generic primitive and shouldn't reference skills.

Co-authored-by: Isaac <no-reply@databricks.com>
@xsh310
xsh310 force-pushed the skills-picker-download-preview branch from 1260870 to 3e8a19a Compare September 15, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants