Repository navigation
feat(workbench): view open agent hosts in a grouped dialog - #994
Merged
Merged
Conversation
DeanCen
force-pushed
the
perf/mcp-host-access-large-lists
branch
2 times, most recently
from
November 19, 2026 15:40
e1f1cf5 to
18a9a48
Compare
With thousands of saved hosts, choosing Allow all in MCP agent host access paused the UI and listed every name in one unbounded block. Replace the inline list with a View button beside the mode choice that opens a read-only dialog borrowing the monitor panel creator's grouped cards, host icons and color marks. Search filters the view without touching permissions, an internal draggable scrollbar and viewport culling paint only the visible hosts, and Escape clears the query then closes. Cleaning stale permissions on save now builds an SSH id set once instead of scanning the catalog for each permission.
The cards were sized from the dialog's nominal width less the surface padding, which is wider than the body the dialog gives its content, so the last column ran under the right edge. Size them from the body rect, less the list's scrollbar lane.
t8y2
force-pushed
the
perf/mcp-host-access-large-lists
branch
from
November 23, 2026 13:59
18a9a48 to
37bd6b7
Compare
Owner
|
Thanks for the contribution! Merged in a977d90, will be released in the next version. I rebased it onto the latest main (one adjacent enum conflict in connection.go) and added a small commit that sizes the host cards from the dialog body, so the last column no longer runs under the dialog's right edge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #942.
With thousands of saved hosts, choosing Allow all in MCP agent host access
paused the UI and rendered every host name in one unbounded block with no
internal scrollbar. This replaces that inline block with an on-demand,
read-only dialog and fixes the quadratic save cleanup.
What changed
Viewbutton to the left ofNone / Per host / Allow all, plus a liveN hosts opencount. The button is disabled when no host is open.panel creator's visual language: hosts bucketed by catalog group with a
folder header (
group shown / total), tinted host cards carrying eachhost's catalog icon and color. It only reads — permissions are still changed
by the mode choice and each host's Advanced switch.
the count switches to
matched / total. Escape clears the query first, thencloses the dialog.
ui.Dialogwhose body is a virtualized
ui.List(group headers + multi-column cardrows), so a catalog of thousands paints only the rows on screen. The page
owns focus, hits, keyboard and scrolling; the wheel is routed through
windowPage().Wheel, consistent with the dashboard dialog. The row model iscached and rebuilt only when the open hosts, query or column count change.
the SSH id set once instead of scanning the catalog for each permission
(previously O(N²)).
Design notes
workbench page (
declareAgentHostsDialog) rather than painted as a canvasoverlay, so it shares the page's focus trap, scroll routing and keyboard
handling with the other dialogs.
unchanged.
Test plan
go build ./...go test ./internal/i18ngo test ./internal/workbench -run 'Agent|MCP'(
TestMCPAgentHostsLargeListUsesVirtualizedScrolling): open via View,viewport culling, wheel to the last host, drag the scrollbar, search
filters without changing stored permissions, Escape clears then closes,
narrow layout keeps the mode choice intact
Modal|Settings|Dashboard|Persist|ConnectionCatalog|HostShared|HostMerge|Select|Menugo vet ./internal/workbench ./internal/i18nNote: the platform-pinned paint goldens are generated on the CI platform; this
change does not alter their fixtures.