Skip to content

feat(agents): agent builder polish — alignment, naming, landing copy#2770

Merged
benjackwhite merged 2 commits into
posthog-code/m3a-finalfrom
dylan/agent-builder-polish
Jun 19, 2026
Merged

feat(agents): agent builder polish — alignment, naming, landing copy#2770
benjackwhite merged 2 commits into
posthog-code/m3a-finalfrom
dylan/agent-builder-polish

Conversation

@dmarticus

Copy link
Copy Markdown
Contributor

Stacked on top of #2700. Three small, related cleanups to the agent-applications surface.

Summary

1. One close button, aligned to the dock header

The page header had a sidebar-toggle next to "New agent" that did the same thing as the dock's own close button — two ways to close the same dock. And the two halves of the agents UI sat on different vertical rows, so the controls looked offset.

  • AgentBuilderHeaderControls is now absolutely pinned to the top-right of the nearest relative ancestor with py-2, so "New agent" / "Edit configuration" / "Explain this session" sit on the same row as the dock's "Agent Builder" header.
  • When the dock is open, the trailing sidebar-toggle is hidden — the dock's own close button is the single way to close.
  • When the dock is closed, the split button "[✦ New agent | ▢]" stays as the entry point.
  • Scouts (no contextual action) collapses to the lone sparkle toggle when the dock is closed, nothing when it's open.

AgentsTabLayout, AgentDetailLayout, and AgentSessionTranscriptView each got relative on their header container and pr-44 on the title block so the absolute controls don't overlap long titles.

2. "Agent concierge" → "Agent Builder" in user-facing copy

The meta-agent ships with backend slug agent-concierge and the same name in the database. Everywhere a human reads it, we want "Agent Builder" instead.

New displayAgentName(app) helper in utils/format.ts returns "Agent Builder" when app.slug === AGENT_BUILDER_SLUG, else app.name. Backend slug is unchanged.

Applied at every render site:

  • AgentFleetLiveSessionsPanel (Live now row)
  • AgentApplicationsListView (applications list)
  • AgentDetailLayout (detail page title + global app header)
  • AgentObservabilityPane (subtitle)
  • AgentFleetApprovalsPane (approval row label)
  • AgentRevisionBar (promote-to-live confirm body)

Also updated the dock's "no ingress" empty-state copy from "The agent-concierge deployment..." to "The Agent Builder deployment...".

Added format.test.ts with 6 cases locking in the contract (concierge slug, non-concierge slug, with/without name, null/undefined app).

3. Applications tab description rewrite

Old:

Deployed agents triggered by chat, Slack, webhooks, or cron — preview, approve, and edit with the Agent Builder.

New:

Talk it through. Ship it. Watch it work. The Agent Builder turns ideas into production agents.

Punchier rhythm, leans into the conversational ("no-code-feel-without-the-word") pitch, fits on one line at the usual viewport.

Known fragility

pr-44 is a magic number sized to the absolute-positioned controls' width. If a future contextual header action gets a noticeably longer label ("Edit and explain this configuration"), the title might collide. Cheap to widen if needed.

Test plan

  • Typecheck (pnpm --filter @posthog/ui typecheck) clean
  • Biome (pnpm lint) clean
  • displayAgentName unit tests pass (6/6)
  • Dogfooded against the running dev app via CDP — verified:
    • Cold-start build flow: clicking "New agent" seeds the prompt; builder loads skills, produces a design table, asks clarifying questions
    • Live now panel updates in real time during streaming
    • Page-header action is contextual per tab (New agent / Explain this agent / Edit configuration / Review approvals / Explain this session)
    • Dock chat persists across 5+ nav hops
    • Cmd+Shift+I toggles the dock
    • Seed-prompt collision modal pops correctly mid-conversation
    • Scouts copy is untouched
    • Approval queue → Approve / Reject both transition states correctly
    • Session transcript view renders with the new layout
    • Promote-to-live confirm shows the right agent name via displayAgentName
    • Meta-agent now reads "Agent Builder" everywhere it surfaces

🤖 Generated with Claude Code

- Drop the redundant sidebar-toggle from the page header when the dock is
  open; the dock owns its own close button. When the dock is closed, the
  split button is the entry point.
- Pin AgentBuilderHeaderControls absolutely at the top-right of each
  agents-page header so "New agent" / "Edit configuration" / "Explain this
  session" sit on the same row as the dock's "Agent Builder" header.
- Centralise the meta-agent display name in displayAgentName(app): wherever
  the agent-concierge slug surfaces in user-visible copy it now reads
  "Agent Builder" (Live now row, Applications list, detail title, header,
  Observability subtitle, Approvals row, promote-to-live confirm). Backend
  slug unchanged.
- Tighten the Applications tab description to lean into the pitch:
  "Talk it through. Ship it. Watch it work. The Agent Builder turns ideas
  into production agents."
- Update the dock's no-ingress empty-state copy to match.
- Add format.test.ts covering displayAgentName.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit ee7a6b6.

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/ui/src/features/agent-applications/components/AgentApplicationsListView.tsx:200
`displayAgentName(application) ?? application.name` is redundant: `displayAgentName` already returns `application.name` (or `undefined` if it's null) for non-concierge apps, so the fallback `?? application.name` resolves to the same null/undefined value and never adds anything. The same pattern appears in `AgentRevisionBar.tsx` (`displayAgentName(agent) ?? agent.name`). Drop the fallback or replace it with a more meaningful one like `application.slug`.

```suggestion
              {displayAgentName(application)}
```

### Issue 2 of 2
packages/ui/src/features/agent-applications/utils/format.ts:17-23
The function returns `undefined` for the "no result" case, but the project convention is to use `null` instead of `undefined` to indicate an intentional absence of a result. The return type and all three early-return sites should use `null`, and callers' `??` chains are unaffected since nullish coalescing treats both the same.

```suggestion
export function displayAgentName(
  app: { slug?: string | null; name?: string | null } | null | undefined,
): string | null {
  if (!app) return null;
  if (app.slug === AGENT_BUILDER_SLUG) return "Agent Builder";
  return app.name ?? null;
}
```

Reviews (1): Last reviewed commit: "feat(agents): agent builder polish — ali..." | Re-trigger Greptile

Comment thread packages/ui/src/features/agent-applications/utils/format.ts Outdated
…builder slug

The meta-agent now ships with the proper name ("Agent Builder") and slug
(`agent-builder`) at the source, so the UI no longer needs to special-case
the `agent-concierge` slug to display a product name.

- Remove `displayAgentName` from utils/format.ts (+ its test); render
  `app.name` directly at all 6 call sites (detail title, applications list,
  live-sessions row, approvals row, observability subtitle, promote confirm).
- `AGENT_BUILDER_SLUG` now points at `agent-builder`; update the dock comment.

Source rename lives in the posthog repo (example bundle + seed metadata).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benjackwhite benjackwhite merged commit 4a7fc65 into posthog-code/m3a-final Jun 19, 2026
19 checks passed
@benjackwhite benjackwhite deleted the dylan/agent-builder-polish branch June 19, 2026 09:34
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.

2 participants