Skip to content

Agent creation form UI polish: template grid, capability card, reasoning relocation - #2202

Merged
Maxime-DARAGON merged 3 commits into
swiftfrom
feature/agent-form-ui-polish
Aug 2, 2026
Merged

Agent creation form UI polish: template grid, capability card, reasoning relocation#2202
Maxime-DARAGON merged 3 commits into
swiftfrom
feature/agent-form-ui-polish

Conversation

@Maxime-DARAGON

Copy link
Copy Markdown
Contributor

Summary

  • Template picker: card title/description clamp to 2/4 lines with ellipsis; grid switches to a fixed 2-equal-column layout, left-aligned (a lone last-row card no longer stretches).
  • Toggle shape: the shared Switch atom now uses --radius-full instead of the oversized --radius-2xl token — fixes every toggle in the app.
  • Capability card: drops the border/transition (replaced by a surface-container fill + on-surface/8% hover layer), widens the toggle-to-content gap, tightens vertical padding, selected-state label now changes color only (not weight). The whole header (padding included) is now the click target — was a <div> whose padding sat outside a smaller inner <label>, swallowing clicks near the card's edges.
  • FullPageModal: reserves the scrollbar gutter so centered modal content stops shifting left when a scrollbar appears (shared by every full-page modal, including this form).
  • Reasoning relocation: the REASON-01 reasoning offer moves from the General section into the (renamed) Capabilities tab. CapabilityCard is generalized into one reusable component (name/description/checked/onToggle + a subForm slot) used for both real capabilities and the reasoning toggle — no reasoning-specific card component. Still not a real capability underneath (no ConfigModel/TurnOptionsModel/middleware) — see MODEL-REASONING-ENABLEMENT-RFC.md §17 (Amendment C) and COMPONENT-UX.md, both amended in this branch.

⚠️ Heads up for merge order: this PR and #2201/features-capabilities-relabel both independently touch the rework.teams.formAgent.sections.tools i18n key (both landing on the same final value) — expect a possible trivial conflict depending on merge order.

Test plan

  • make code-quality
  • make test
  • Manual check: agent creation form — template grid, Capabilities tab (card hover/click target, reasoning card + nested toggle), modal scroll behavior on a long form

🤖 Generated with Claude Code

Maxime-DARAGON and others added 3 commits August 2, 2026 13:14
…ty card, switch shape

- Template picker: card title/description clamp to 2/4 lines with
  ellipsis; grid switches from auto-fit(240px)+center to a fixed
  2-equal-column layout, left-aligned, so a lone last-row card doesn't
  stretch.
- Capability card: drop the border-color transition and outer border
  (replaced by a surface-container fill), widen the toggle-to-content
  gap 12->16px, tighten vertical padding to 8px, add an on-surface/8%
  hover layer on top of the fill. Also drops the now-redundant
  per-child border-radius on .header/.subForm — .card's own
  overflow:hidden already clips them, and the duplication was
  producing a stray rectangular seam on hover. Selected-state label
  now changes color only, not font-weight.
- Switch: replace the oversized --radius-2xl token with --radius-full
  (the actual pill/fully-rounded token) on the track and handle — the
  only shared Switch component, so this covers every toggle in the app.
- FullPageModal: reserve the scrollbar gutter (scrollbar-gutter:
  stable) so centered modal content stops shifting left when a
  scrollbar appears — shared by every full-page modal, including the
  agent form.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… tab label

This branch was cut from swift before the tab's i18n key (added in an
earlier fix, then relabeled Tools->Capabilities on a sibling branch)
existed there, so the raw key rendered again. Same fix, same "Capabilities"/
"Capacités" value as the sibling relabel branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…c CapabilityCard

Relocates the REASON-01 reasoning offer from the agent form's General
section into the Capabilities tab (renamed from Tools), reusing the
exact same card component as template-provided capabilities instead
of a reasoning-specific one. CapabilityCard is generalized to a plain
name/description/checked/onToggle + optional `subForm` slot; a real
capability passes CapabilityConfigForm (now exported separately) as
that slot, reasoning passes a SwitchRow for its nested default-on
toggle. One card component for the whole tab.

Also makes the card's header fully clickable, edge to edge: the
header is now the <label> itself (wrapping the Switch as a
descendant, same pattern as SwitchRow) instead of a plain <div> whose
padding sat outside a smaller inner label's box and swallowed clicks
near the card's border.

Amends MODEL-REASONING-ENABLEMENT-RFC.md (§17, Amendment C) and
COMPONENT-UX.md to record the relocation — a frontend-only reversal
of §15's tab-placement argument; reasoning is still not a capability
underneath (no ConfigModel/TurnOptionsModel/middleware, single
build_for_chat enforcement point).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Maxime-DARAGON
Maxime-DARAGON merged commit 3a78a1a into swift Aug 2, 2026
29 checks passed
@Maxime-DARAGON
Maxime-DARAGON deleted the feature/agent-form-ui-polish branch August 2, 2026 12:55
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