Skip to content

Move streaming picker primitives into ui.interactive_picker - #575

Open
xsh310 wants to merge 1 commit into
mainfrom
skills-picker-ui-package
Open

xsh310 wants to merge 1 commit into
mainfrom
skills-picker-ui-package

Conversation

@xsh310

@xsh310 xsh310 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

What changed, and why?

Change: Turn src/ucode/ui.py into a ui/ package and move the streaming multi-select picker primitives — scrolling_checkbox, StreamingInquirerControl, merge_new_choices, picker_style, and PICKER_VISIBLE_ROWS (renamed from MCP_PICKER_VISIBLE_ROWS) — out of mcp.py into a new src/ucode/ui/interactive_picker.py, re-exported from ucode.ui. Added a loading_noun parameter (default "MCP services") so a non-MCP picker can label its loading footer.

Why: These primitives are source-agnostic UI. Extracting them lets the upcoming ug skill add (download path) picker reuse them without importing from mcp.py. This is the first PR (PR A) in the ug skill add interactive-picker stack; it is a pure refactor with no behavior change.

How do you know it works?

Testing: ruff check . is clean and the full uv run pytest suite passes, except two pre-existing e2e failures (test_e2e_user_agent, test_claude_smart_routing_v2) that also fail on main. The picker unit tests moved to tests/test_interactive_picker.py; the MCP picker tests in tests/test_mcp.py, retargeted to the moved symbols, stay green.

This pull request and its description were written by Isaac.

@xsh310
xsh310 added this pull request to stack #576 September 11, 2026 21:08
@xsh310
xsh310 marked this pull request as ready for review September 12, 2026 07:13
@xsh310
xsh310 force-pushed the skills-picker-ui-package branch 2 times, most recently from 1bdcfcd to 57a9a3e Compare September 14, 2026 03:08
@xsh310
xsh310 force-pushed the skills-picker-ui-package branch from 57a9a3e to ce2c6c7 Compare September 14, 2026 20:09
@xsh310
xsh310 force-pushed the skills-picker-ui-package branch 8 times, most recently from 576c37c to 58353b8 Compare September 15, 2026 04:42
Turn ui.py into a ui/ package and move the streaming multi-select picker primitives (scrolling_checkbox, StreamingInquirerControl, merge_new_choices, picker_style, PICKER_VISIBLE_ROWS) out of mcp.py into ui/interactive_picker.py, re-exported from ucode.ui. Add a loading_noun parameter so non-MCP pickers can label the loading footer. No behavior change; picker unit tests move to tests/test_interactive_picker.py.

Co-authored-by: Isaac <no-reply@databricks.com>
@xsh310
xsh310 force-pushed the skills-picker-ui-package branch from 58353b8 to 0e016c8 Compare September 15, 2026 14:43
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