Skip to content

Make the agent panel's copy button a secondary control - #48

Merged
botre merged 3 commits into
masterfrom
fix/agent-panel-design-system
Aug 9, 2026
Merged

Make the agent panel's copy button a secondary control#48
botre merged 3 commits into
masterfrom
fix/agent-panel-design-system

Conversation

@botre

@botre botre commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #47, correcting it against DESIGN.md. I built the panel from the surrounding markup and the technical spec's §3.7 snippet without checking that snippet against the design system.

One brand-filled button per view

DESIGN.md: "Don't add a second brand-filled button to a view. One primary action per screen; everything else is an outlined, bare, or destructive control."

The endpoint page already spends its primary on the Send submit, so the panel's btn-primary was the second. It is also wrong on its own terms: DESIGN.md lists Copy among the text-only and secondary actions, and the copy button one panel above it, on the endpoint URL, is already btn-secondary.

Now btn btn-secondary. Verified computationally identical to the copy-url button: white fill, neutral-300 stroke, control-ink label, 0.375rem control radius. Each view now carries exactly one btn-primary.

Spacing expresses grouping

The panel body used space-y-3, giving the intro paragraph, the prompt block and the copy button one even gap. DESIGN.md on the same problem: a stack that "distributes one gap evenly cannot express the grouping", which is why the endpoint URL panel carries an explicit comment choosing explicit margins over space-y.

The intro now sits 0.5rem above the block it introduces and the action 0.75rem below it, both on the 0.25rem base scale. Measured in the browser: 8px above, 12px below.

Dropping space-y-3 also removes the only new utility #47 added, so public/app.css returns to what it was.

Verification

go vet, go test, npm run lint, prettier and the npm run css staleness check all pass. 64/64 Playwright tests pass. Checked in the browser that the button matches its sibling and that the gaps land where intended.

Nothing else from #47 is affected: the icons already met the 24×24 / stroke-width="2" / fill="none" / aria-hidden rule, the panel reuses .panel, .code-block, .icon and .btn rather than respelling them, the homepage card is a copy of its three siblings, and no new colour, shadow, breakpoint or uppercase text was introduced.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XkbFE6pgcxRfsMAvnwyuqS

botre added 3 commits August 9, 2026 10:36
The panel shipped with a brand-filled Copy prompt button, taken from the
technical spec's illustrative markup rather than from the design system.
DESIGN.md allows one brand-filled button per view, and the endpoint page
already spends it on the Send submit. Copy is listed there among the
secondary and text-only actions, and the copy button directly above this
one, on the endpoint URL, is already secondary.

The panel body also stacked its intro, its prompt and its action on one
even gap. A stack that distributes one gap evenly cannot express which
things belong together, so the intro now sits 0.5rem above the block it
introduces and the action 0.75rem below it, matching the endpoint URL
panel.

Claude-Session: https://claude.ai/code/session_01XkbFE6pgcxRfsMAvnwyuqS
The two panels disagreed on where their action lives. Connect an agent
opened on the left with an icon; Send a test request pushed its submit to
the right edge with no icon, so the eye had to cross the panel to find the
control and the two panels read as different kinds of thing.

Send now sits on the left with the paper plane its own panel header
already uses, and the status message follows it rather than being pushed
away from it: the status is a consequence of the button, not a caption for
the form.

The fills still differ, and deliberately. Send is the endpoint page's one
brand-filled action; the copy button is secondary.

Claude-Session: https://claude.ai/code/session_01XkbFE6pgcxRfsMAvnwyuqS
DESIGN.md contradicted itself on how far "one primary action" reaches.
The Buttons entry scopes .btn-primary to a panel; the Don'ts scoped it to
a screen. The panel reading is the right one: these panels are collapsed
by default, and an opened one is the thing the reader is working in, so it
carries its own primary rather than deferring to whatever else the page
holds. The rule now says so, and Copy prompt is brand-filled again.

Send a test request also moves above Connect an agent. Sending a request
is how someone confirms the endpoint works at all, so it comes before
handing the endpoint to something else.

Claude-Session: https://claude.ai/code/session_01XkbFE6pgcxRfsMAvnwyuqS
@botre
botre merged commit d3ca10f into master Aug 9, 2026
4 checks passed
@botre
botre deleted the fix/agent-panel-design-system branch August 9, 2026 09:00
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