feat(agents): agent builder polish — alignment, naming, landing copy#2770
Merged
Conversation
- 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>
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix 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 |
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
AgentBuilderHeaderControlsis now absolutely pinned to the top-right of the nearestrelativeancestor withpy-2, so "New agent" / "Edit configuration" / "Explain this session" sit on the same row as the dock's "Agent Builder" header.AgentsTabLayout,AgentDetailLayout, andAgentSessionTranscriptVieweach gotrelativeon their header container andpr-44on 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-conciergeand the same name in the database. Everywhere a human reads it, we want "Agent Builder" instead.New
displayAgentName(app)helper inutils/format.tsreturns"Agent Builder"whenapp.slug === AGENT_BUILDER_SLUG, elseapp.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.tswith 6 cases locking in the contract (concierge slug, non-concierge slug, with/without name, null/undefined app).3. Applications tab description rewrite
Old:
New:
Punchier rhythm, leans into the conversational ("no-code-feel-without-the-word") pitch, fits on one line at the usual viewport.
Known fragility
pr-44is 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
pnpm --filter @posthog/ui typecheck) cleanpnpm lint) cleandisplayAgentNameunit tests pass (6/6)displayAgentName🤖 Generated with Claude Code