feat(web): add a capability menu to the composer - #109
Closed
elkaix wants to merge 3 commits into
Closed
Conversation
The chat column was 760px and the composer card read as a small box with a fixed-height input. Widen `--read-max` to 928px, which the message list and the composer dock both derive from, so one value moves both. The card takes a 24px radius from the new `--r-xl` token, a translucent blurred surface, and a border that strengthens on hover and focus-within. The input grows with its content up to 384px and scrolls past that. Toolbar controls become 30px circles, with a divider after the attachment button and a 20px send glyph in 5px of padding. The send button keeps the theme accent rather than an inverted fill: the Pythinker theme defines that colour as its brand periwinkle. Behaviour is unchanged; this is geometry and colour only.
There was no way to see or change which tools and MCP servers a session may use. The data was reachable and unused: `GET /tools` had no client method at all. Add `CapabilityMenu`, built on the shared `Popover`, `MenuRow`, `SwitchToggle` and `Chip` primitives. It lists tools and MCP servers with switches, the session's skills, and the daemon's plugins, and drills down one level with a back row. Selected tools and servers show as chips in the composer toolbar. Groups with nothing in them are omitted rather than rendered empty. Each group says how far its change reaches, because the three are not alike: tool and MCP changes apply to this session immediately, skills are read-only here because no write endpoint exists, and plugin changes are global to the daemon. Toggles apply optimistically and roll back when the write fails. Client: add `listTools`, and let `updateSession` carry `agent_config.tools` and `agent_config.mcp_servers`. Each key is sent only when supplied, since the server merges the two independently.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
commit: |
5 tasks
Member
Author
|
Closing: merged locally into main; a new PR will follow. |
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.
Related Issue
No issue. The problem is described below.
Problem
There is no way in the web app to see which tools and MCP servers a session may use, let alone change them. The data was already reachable and unused —
GET /toolshad no client method at all — and the session profile route accepts a tool selection that nothing ever sent.What changed
CapabilityMenu, built on the sharedPopover,MenuRow,SwitchToggleandChipprimitives from #107. It lists tools and MCP servers with switches, the session's skills, and the daemon's plugins, drilling down one level with a back row. Selected tools and servers render as chips in the composer toolbar. A group with nothing in it is omitted rather than shown empty.Client:
listToolsis new, andupdateSessionnow carriesagent_config.toolsandagent_config.mcp_servers. Each key is sent only when supplied — the server merges the two independently, so an unintended empty array would clear the other half.Two things worth calling out:
Toggles apply optimistically and roll back when the write fails.
Merge order
This branch is stacked, and its diff is currently wider than its own work.
feat/web-ui-primitivesandfeat/web-composer-shell, because the capability trigger anchors to the toolbar divider that feat(web): widen the reading column and soften the composer card #108 introduces. GitHub diffs head against base, so the composer-shell files appear here too. Retargeting the base cannot fix that — the head has two parents, so no single base excludes both. Once feat(web): add shared menu, switch and chip primitives #107 and feat(web): widen the reading column and soften the composer card #108 are inmain, this diff collapses to only the capability files.agent_config.toolsandagent_config.mcp_servers, and only feat(core): apply session tool and MCP selections to the running agent #104 makes those reach the running agent and come back on the session read. Merged before it, the switches would move and change nothing — worse than having no menu.Order: #104, #107, #108 → then this.
Verified locally: 353 web tests, typecheck and lint all pass, and the suite passes again after the pre-commit autofix.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.