SIGN IN SIGN UP

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

0 0 73 Python

refactor(frontend/library): extract briefing tab sub-components and reorganize panel (#13213)

### Why / What / How

**Why:** `BriefingTabContent` had grown into a single ~260-line file
mixing tab routing, execution lists, agent lists, copilot library
summary, and shared helpers. A mistaken `StripeItem` rename also made
the situation-report UI read like the payments product.

**What:** Extract `BriefingTabContent` sub-components into a local
`components/` folder, reorganize `AgentBriefingPanel` children under
`components/`, keep Sitrep naming consistent, and extract
`buildAutoPilotPrompt` into `SitrepItem/helpers.ts`.

**How:** `BriefingTabContent` is now a thin router;
`CopilotLibrarySummary`, `ExecutionListSection`, `AgentListSection`, and
`EmptyMessage` each live in their own file. Shared tab helpers
(`getAgentStatusLabel`, empty messages, `MAX_VISIBLE`) sit in
`helpers.ts`. `CostsBreakdown` and `StatsGrid` moved under
`AgentBriefingPanel/components/` to match the panel layout pattern.

### Changes ๐Ÿ—๏ธ

- Split `BriefingTabContent` into `BriefingTabContent.tsx` +
`components/{CopilotLibrarySummary,ExecutionListSection,AgentListSection,EmptyMessage}.tsx`
+ `helpers.ts`
- Move `CostsBreakdown`, `StatsGrid`, and briefing tests under
`AgentBriefingPanel/components/`
- Extract `buildAutoPilotPrompt` from `SitrepItem.tsx` into
`SitrepItem/helpers.ts`
- Remove the unused `SitrepList` component
- Remove the animated briefing-panel border
(`AgentBriefingPanel.module.css` + the `styles.glassPanel` class) โ€” an
intentional visual simplification; the same rotating-border effect still
lives in `PulseChips`
- Update imports to use `SitrepItem` (not `StripeItem`) and
`@/app/(platform)/library/types` where relative paths were wrong

### Checklist ๐Ÿ“‹

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  - [ ] `pnpm types` โ€” passes
- [ ] `pnpm test:unit --
src/app/(platform)/library/components/AgentBriefingPanel` โ€” passes
(BriefingTabContent + CostsBreakdown helpers)

#### For configuration changes:

- [ ] `.env.default` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
U
Ubbe committed
7d8eee1471f1b63636eee83b8b47aa50b5c09c9f
Parent: baef6f8
Committed by GitHub <noreply@github.com> on 5/26/2026, 10:08:20 AM