fix(canvas): name the canvas before creating its generation task#3360
Draft
k11kirky wants to merge 1 commit into
Draft
fix(canvas): name the canvas before creating its generation task#3360k11kirky wants to merge 1 commit into
k11kirky wants to merge 1 commit into
Conversation
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
|
Merging to
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 |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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.
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.updateName.How did you test this?
pnpm --filter @posthog/ui typecheck— cleanbiome checkon the changed files — cleanpnpm --filter @posthog/ui test— 164 files / 1458 tests passedAutomatic notifications
Created with PostHog Code