fix(web): restore deploy state across drawer open-close cycles#399
Open
fix(web): restore deploy state across drawer open-close cycles#399
Conversation
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Move deploy target UI from inline feature-drawer-client into BaseDrawer header prop and add initial deployment status fetch on mount so useDeployAction picks up already-running dev servers when the drawer reopens. Adds 7 new unit tests for initial status fetch behavior. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
Dev Release Published
|
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.
Summary
deployTargetprop toBaseDrawer, removing ~40 lines of duplicated deploy UI fromfeature-drawer-client.tsxuseDeployAction— when the drawer opens, the hook now callsgetDeploymentStatus()to discover any already-running dev server, preventing the "lost" deploy state bug when closing and reopening the feature drawerRoot Cause
When the feature drawer was closed and reopened,
useDeployActionwas called fresh with no knowledge of any previously started dev server. The deploy state (Booting/Ready + URL) was only tracked in-memory during the hook's lifecycle, so closing the drawer destroyed it.Fix
On mount (or when
input.targetIdchanges), the hook now proactively fetches the current deployment status viagetDeploymentStatus(). If a non-Stopped deployment is found, the hook restores the status and URL and starts polling to keep the state fresh.Evidence
Control center with deploy status badges visible on canvas nodes

Feature drawer with deploy target play button in BaseDrawer header

Feature drawer with active deployment persisted across open/close

Unit tests: 28 tests passing across 2 test files (25 in use-deploy-action including 7 new initial-status-fetch tests, 3 in control-center with getDeploymentStatus mock)
Test plan
🤖 Generated with Claude Code