Skip to content

fix(canvas): name the canvas before creating its generation task#3360

Draft
k11kirky wants to merge 1 commit into
mainfrom
posthog-code/canvas-name-before-generation-task
Draft

fix(canvas): name the canvas before creating its generation task#3360
k11kirky wants to merge 1 commit into
mainfrom
posthog-code/canvas-name-before-generation-task

Conversation

@k11kirky

Copy link
Copy Markdown
Contributor

Problem

Every canvas generation task kicked off from the channel composer's Canvas mode (#3348) gets the title Generate canvas "Untitled canvas", and that placeholder also shows as the first prompt bubble before the agent starts. The composer creates the dashboard with the placeholder name at submit time, and auto-naming only ran after the task was created — renaming the dashboard but never the task, its backend description, or the generation prompt's header.

Changes

  • useGenerateFreeformCanvas: for a still-unnamed canvas, generate the name from the instruction before creating the task (concurrently with model resolution, so the common path adds no latency). The real name now feeds the task title/description, the prompt header, the channel filing, and the completion toast; the dashboard rename is fired best-effort. Falls back to the placeholder if name generation fails, as before.
  • Removed the now-unused post-task rename block and the tracker store's updateName.

How did you test this?

  • pnpm --filter @posthog/ui typecheck — clean
  • biome check on the changed files — clean
  • pnpm --filter @posthog/ui test — 164 files / 1458 tests passed

Automatic notifications

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

Created with PostHog Code

Since the composer's Canvas mode creates the dashboard as "Untitled canvas" right at submit, every generation task was titled `Generate canvas "Untitled canvas"` — and that placeholder also leaked into the backend task description (shown as the optimistic first-message bubble on cloud runs) and the generation prompt's header. Auto-naming now runs before task creation, concurrently with model resolution, so the task title, description, prompt, channel filing, and completion toast all carry the real name from the start.

Generated-By: PostHog Code
Task-Id: ba8c30b5-6388-4d27-995d-e665d51138dd
@trunk-io

trunk-io Bot commented Jul 10, 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 no issues in the changed files. 🎉

Reviewed by React Doctor for commit 75f04da.

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