Skip to content

fix(agent-builder): don't auto-send prompt when opening the dock#3486

Draft
dmarticus wants to merge 1 commit into
mainfrom
posthog-code/agent-builder-no-autosend
Draft

fix(agent-builder): don't auto-send prompt when opening the dock#3486
dmarticus wants to merge 1 commit into
mainfrom
posthog-code/agent-builder-no-autosend

Conversation

@dmarticus

Copy link
Copy Markdown
Contributor

Problem

In the agent-platform Agent Builder UI, the "new agent" flow started with an automatic prompt: clicking the contextual header action (e.g. "New agent") opened the dock and immediately fired a canned prompt into the chat. Opening the sidebar shouldn't trigger a chat on its own — it should present an empty chat.

Changes

  • The seeded prompt now prefills the composer instead of being auto-sent. The user reviews it (and can edit it) and hits send. This keeps the contextual header buttons as a one-click "auto prompt" affordance without starting a conversation by itself.
  • Because prefilling is non-destructive, the start-fresh-vs-continue confirmation dialog is no longer needed and has been removed (AgentBuilderSeedDialog).
  • The empty-state suggestion chips are unchanged — they still send on an explicit click.

How did you test this?

  • pnpm --filter @posthog/ui typecheck — clean
  • pnpm biome lint on the changed files — clean
  • pnpm --filter @posthog/ui test — 1659 tests pass

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog from a Slack thread

Opening the Agent Builder dock via a contextual action ("New agent",
"Edit configuration", etc.) used to auto-send the seeded prompt, so the
sidebar started a chat on its own. Instead, prefill the composer with the
seeded prompt and let the user review and hit send.

Since prefilling is non-destructive, the start-fresh-vs-continue
confirmation dialog is no longer needed and is removed.

Generated-By: PostHog Code
Task-Id: fc2c5587-1464-4cb1-9116-0e7a34f70734
@trunk-io

trunk-io Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found 2 issues in 2 files · 2 warnings.

2 warnings

src/features/agent-applications/agent-builder/AgentBuilderDock.tsx

src/features/agent-applications/components/AgentChatSurface.tsx

Reviewed by React Doctor for commit aa4d5e8.

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