Skip to content

feat(web): add a capability menu to the composer - #109

Closed
elkaix wants to merge 3 commits into
feat/web-ui-primitivesfrom
feat/web-capability-menu
Closed

feat(web): add a capability menu to the composer#109
elkaix wants to merge 3 commits into
feat/web-ui-primitivesfrom
feat/web-capability-menu

Conversation

@elkaix

@elkaix elkaix commented Aug 17, 2026

Copy link
Copy Markdown
Member

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 /tools had no client method at all — and the session profile route accepts a tool selection that nothing ever sent.

What changed

CapabilityMenu, built on the shared Popover, MenuRow, SwitchToggle and Chip primitives 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: listTools is new, and updateSession now carries agent_config.tools and agent_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:

  • The three capability kinds do not behave alike, and the menu says so. Tool and MCP changes apply to this session immediately; skills are read-only here; plugin changes are global to the daemon and affect every session. A menu that rendered all three as identical switches would actively mislead, so each group carries a caption.
  • Skills are read-only because no write endpoint exists. There is no enable/disable API for skills anywhere in the repo. Rather than invent one, the group shows what the session has and says it cannot be changed here.

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.

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

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

elkaix added 3 commits August 17, 2026 02:47
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.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c652aa5-6118-4f35-9412-7b65c9a2bc87

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 17, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@27880c3
npx https://pkg.pr.new/@pymodel/pythinker-code@27880c3

commit: 27880c3

@elkaix

elkaix commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

Closing: merged locally into main; a new PR will follow.

@elkaix elkaix closed this Aug 17, 2026
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.

1 participant