Skip to content

feat(mecatui): bound MCP resource and prompt browsers - #2763

Merged
jbeda merged 4 commits into
mainfrom
impl/2175-mcp-pickers
Nov 18, 2026
Merged

jbeda merged 4 commits into
mainfrom
impl/2175-mcp-pickers

Conversation

@jbeda

@jbeda jbeda commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #2175.

  • Bound the MCP resource (Ctrl+R) and prompt (F8) inventories with keyboard paging, overflow indicators, and wheel browsing that does not change selection. Wrapped and multiline entries use hanging indentation; a clipped continuation is identified without adding visual noise to flat lists.
  • Show all already-loaded resource text in a scrollable preview with distinct metadata/content sections and explicit Insert/Back actions. Preserve list and reading positions; keep the original insertion payload separate from sanitized display text.
  • Keep required prompt arguments in a persistent Bubbles form with focus-revealing scrolling and explicit Cancel/Submit actions. Enter advances from the last field rather than submitting; prompts without required arguments fetch directly.
  • Add click-to-select without activation to both inventories and clickable argument-form actions. Pointer targets belong to the displayed frame; resize, compact views, and pending requests cannot activate stale or hidden controls.
  • Correlate RPC and clipboard results with their owning picker, request, view, and focused field. Abandoned or duplicate results cannot overwrite the draft. Accepted insertion uses a synchronous surface intent; root intent dispatch now uses a type switch.

Existing /mcp status, authorization, refresh, and direct/broker capability behavior are unchanged. Optional arguments, search, pagination, and backend/API expansion are out of scope. Broader mouse-contract work remains in #769; /mcp status-panel modernization remains in #2768.

Verification

  • Earlier implementation revisions passed full offline test/lint/race gates, golden and documentation checks, and the offline demo. Follow-up indentation changes passed focused regressions, UI/client/bounded race checks, aggregate tests, lint, and documentation checks; see the implementation notes below for the key regression cases.
  • Rebased onto origin/main at e056c29a1 without conflicts; range-diff confirmed all three implementation commits replayed unchanged. The final follow-up only converts five intent type assertions into a type switch, preserving helper dispatch and return behavior.
  • Local lint and whitespace checks passed after the rebase/refactor. At the operator's request, complete local test/race gates were not completed again for final head 98d2b5eed; final full-suite validation is left to CI. Earlier gate results are not a claim of full local validation of this head.

API compatibility

UI-local and wire-compatible. No protobuf, feature identifier, API major, server authorization/capability, or stored-data changes. RPC identities remain byte-exact; request correlation and pointer geometry are private UI state. Explicit Submit and select-without-activate are intentional UI behavior changes. No server/client upgrade ordering is required.

Implementation notes

Design choices, regression coverage, and follow-ups.

@jbeda

jbeda commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Implementation notes

This replaces the original planning archive with a summary of what was built and why.

  • Reuse the existing UI machinery. Both inventories use bounded navigation inside the existing MCP surface; required arguments remain Bubbles text inputs. No new widget framework or backend API was needed.
  • Separate browsing from activation. Wheel scrolling moves the window, row clicks select, and keyboard activation reads/fetches. Resource insertion and argument submission are explicit actions. Returning from a preview or form preserves the inventory position.
  • Separate identity, payload, and presentation. Raw server/item identities drive selection and RPCs. Sanitized, wrapped text is only for display; resource insertion retains the original loaded payload and existing prompt-editor normalization.
  • Treat delayed work as owned work. RPC results carry picker/request/view provenance; editor receipts also carry form/focus provenance. Cancellation is cleanup, not the correctness guard. Pointer hits likewise belong only to the displayed frame.

Regression coverage includes stale results after Back/close/reopen, duplicate submission, late clipboard input, compact resize/restoration, wrapped and partially visible row hits, and preview text beyond the former display cutoff. Manual review refined preview hierarchy, argument buttons, and hanging indentation for multiline inventory entries.

The final review follow-up simplifies root intent dispatch to a type switch. The branch is rebased on origin/main; final full-suite validation is delegated to CI rather than repeating all local gates.

Follow-ups: #769 owns cross-surface mouse-contract rationalization; #2768 owns the separate /mcp status/inventory modernization. Neither is required by this change.

jbeda and others added 4 commits November 17, 2026 15:21
Add bounded resource and prompt lists, full-text resource inspection, explicit required-argument form actions, and surface-owned asynchronous result and clipboard routing.

Co-authored-by: Mecatl <[email protected]>
Group multiline inventory rows, separate preview metadata from content, and add current-frame mouse selection and argument actions. Document incremental mouse support for modernized surfaces and cover routed geometry and stale-input regressions.

Co-authored-by: Mecatl <[email protected]>
Keep single-line inventory rows plain, indent multiline continuations, and mark only a clipped item's first visible continuation. Preserve select-only mouse behavior and cover narrow/wide-text rendering and clipped-marker isolation.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda force-pushed the impl/2175-mcp-pickers branch from d10cb2b to 98d2b5e Compare November 17, 2026 23:30
@jbeda
jbeda enabled auto-merge (squash) November 17, 2026 23:48
@jbeda
jbeda merged commit bb7767e into main Nov 18, 2026
46 checks passed
@jbeda
jbeda deleted the impl/2175-mcp-pickers branch November 18, 2026 00:09
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Nov 18, 2026
2 tasks
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.

mecatui: evaluate bounded MCP resource and prompt pickers

1 participant