fix(app): prompt to connect when creating a browser automation with no connection - #3518
Merged
Merged
Conversation
…ction With no connections, the task still showed 'Create Browser Automation', but the composer only opens when a connection exists (composerConnection resolves to null otherwise) — so the button silently did nothing. Decide the empty state by whether a connection actually exists: no connection (and none just made) now shows 'Connect a vendor login' first; drafts are still surfaced to resume.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 3.110.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
The bug
On an evidence task with no connections (e.g. after deleting them), the Browser Automations section still showed "Create Browser Automation" — but clicking it did nothing.
Root cause
The button sets
composer.open = true, but the composer only renders whencomposer.open && composerConnection(BrowserAutomations.tsx:365). With no connections,composerConnectionresolves tonull(buildConnectionReffalls through toreturn null), so the composer never opens and the screen falls back to itself — a silent no-op.The deeper issue: an automation can only be built on an existing connection, but the empty-state offered "Create" regardless of whether one existed.
The fix
Decide the no-automations empty state by whether a connection actually exists:
Verification
Typecheck clean. No test harness exists for this orchestrator component (wires ~10 hooks); verified by tracing the render/composer conditions. Best confirmed live: on a task with zero connections, the section now shows the clickable "Connect a vendor login" instead of a dead "Create" card.
Summary by cubic
Fixes a dead "Create Browser Automation" button by prompting to connect a vendor login when the task has no connections. Drafts still show, and "Create" appears once a connection exists.
Written for commit 2b1dcad. Summary will update on new commits.