Skip to content

feat(site): wrap behavior page sections in CollapsibleSection cards#23991

Closed
DanielleMaywood wants to merge 1 commit into
danielle/collapsible-sectionfrom
danielle/behavior-collapsible
Closed

feat(site): wrap behavior page sections in CollapsibleSection cards#23991
DanielleMaywood wants to merge 1 commit into
danielle/collapsible-sectionfrom
danielle/behavior-collapsible

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agent on behalf of Danielle Maywood 🤖

PR 2/4 in a stack to unify agent settings pages.

What

Wraps all Behavior page sections in CollapsibleSection cards and cleans up the compaction settings component.

Why

The settings pages currently use flat <hr> dividers between sections, which makes it hard to visually group related controls. Wrapping each section in a collapsible bordered card gives clearer visual boundaries and lets users collapse sections they are not actively editing. This is the same pattern the Spend page (PR 4) uses, so applying it to Behavior first establishes consistency across the settings area.

Changes

AgentSettingsBehaviorPageView — each section (Instructions, Context Compaction, System Instructions, Virtual Desktop, Workspace Autostop, Kyleosophy) wrapped in <CollapsibleSection>. Admin sections show AdminBadge in the badge slot and toggle switches in the action slot. The AdminBadge component has a built-in ml-auto class that would push it to the right inside the CollapsibleSection header — the badge slot wraps it with [&>*]:ml-0 to neutralize this.

UserCompactionThresholdSettings — gains a hideHeader prop so the CollapsibleSection card can provide the header instead. The header block (title + description) was previously duplicated 3 times across loading/error/success branches; now hoisted to a single const headerBlock at the top of the component. Cancel/Save buttons moved out of TableFooter into a standalone <div className="flex justify-end gap-2 pt-2"> — Save is always visible (disabled when dirtyRows.length === 0) so users can see the action exists without needing to make edits first.

Stories — updated 3 play functions that referenced the renamed section title ("Personal Instructions" → "Instructions"), and 3 UserCompactionThresholdSettings assertions that expected the Save button to be absent when no rows are dirty (it is now always rendered but disabled).

Stack

  1. CollapsibleSection + shared fixes (feat(site): add CollapsibleSection component and shared utilities #23990)
  2. ➡️ This PR — Behavior page CollapsibleSection cards
  3. Analytics DateRangePicker (feat(site): add DateRangePicker to analytics page #23992)
  4. Unified Spend page (feat: merge Limits + Usage into unified Spend page #24093)

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Apr 2, 2026
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch 2 times, most recently from d1126ba to 5a71b01 Compare April 2, 2026 18:20
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from 9091556 to b4985b7 Compare April 7, 2026 12:13
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch 2 times, most recently from 2df2da3 to 8c37a80 Compare April 7, 2026 12:58
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from 4f8626a to d26f486 Compare April 7, 2026 13:23
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from 8c37a80 to 4a8ae12 Compare April 7, 2026 13:23
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from d26f486 to 2e423be Compare April 7, 2026 13:35
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from 4a8ae12 to 1339fdf Compare April 7, 2026 13:35
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from 2e423be to bcc3f46 Compare April 7, 2026 13:40
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from 1339fdf to c9b492e Compare April 7, 2026 13:40
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from bcc3f46 to b6bee09 Compare April 7, 2026 13:51
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch 2 times, most recently from d763bdd to fcfb877 Compare April 7, 2026 13:56
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from b6bee09 to 8f3b539 Compare April 7, 2026 13:56
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from fcfb877 to 254e305 Compare April 7, 2026 15:54
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from 8f3b539 to c9ce05b Compare April 7, 2026 15:54
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch 3 times, most recently from f79e590 to be3c23d Compare April 7, 2026 16:17
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch 2 times, most recently from a28536d to fcfa599 Compare April 7, 2026 16:24
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from be3c23d to 646b432 Compare April 7, 2026 16:24
@DanielleMaywood DanielleMaywood force-pushed the danielle/collapsible-section branch from fcfa599 to de846d8 Compare April 7, 2026 17:54
@DanielleMaywood DanielleMaywood force-pushed the danielle/behavior-collapsible branch from 646b432 to 669328e Compare April 7, 2026 17:54
@jakehwll jakehwll removed the community Pull Requests and issues created by the community. label Apr 8, 2026
@github-actions github-actions Bot added the stale This issue is like stale bread. label Apr 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants