Description
After creating a network asset from the Devices page, the post-create "enable monitoring / HTTP check" hand-off panel (data-testid="asset-post-create") never appears. Creation itself succeeds (201, status: 'unknown'). Shipped in #5260 (W03 of #5228); e2e-tests/tests/manual-network-asset.spec.ts is red on main at 6dbded0 for exactly this step.
Root Cause
AddNetworkAssetModal.onCreated → DevicesPage.refreshDevices() → fetchDevices() → setLoading(true). DevicesPage early-returns a skeleton while loading, so <AddNetworkAssetModal> unmounts and remounts with createdAsset back to null. Proven by running the spec against plain origin/main in a fresh worktree + stack (identical failure, identical locator) — see the merge-resolution comment on PR #5261.
Proposed Fix
Keep the modal mounted across the refresh: render the skeleton inside the page body instead of early-returning above the modal, or defer refreshDevices() until the hand-off panel is dismissed, or lift createdAsset into page state. Add a unit test that the panel survives a parent loading flip, and make manual-network-asset.spec.ts green.
Affected Files
apps/web/src/components/devices/DevicesPage.tsx (loading early-return)
apps/web/src/components/devices/AddNetworkAssetModal.tsx
e2e-tests/tests/manual-network-asset.spec.ts
Reported By
Merge-resolution fixer on PR #5261 (feature #4622 W04), 2026-09-08. Refs #5228, #5213.
Description
After creating a network asset from the Devices page, the post-create "enable monitoring / HTTP check" hand-off panel (
data-testid="asset-post-create") never appears. Creation itself succeeds (201,status: 'unknown'). Shipped in #5260 (W03 of #5228);e2e-tests/tests/manual-network-asset.spec.tsis red onmainat 6dbded0 for exactly this step.Root Cause
AddNetworkAssetModal.onCreated→DevicesPage.refreshDevices()→fetchDevices()→setLoading(true).DevicesPageearly-returns a skeleton whileloading, so<AddNetworkAssetModal>unmounts and remounts withcreatedAssetback tonull. Proven by running the spec against plainorigin/mainin a fresh worktree + stack (identical failure, identical locator) — see the merge-resolution comment on PR #5261.Proposed Fix
Keep the modal mounted across the refresh: render the skeleton inside the page body instead of early-returning above the modal, or defer
refreshDevices()until the hand-off panel is dismissed, or liftcreatedAssetinto page state. Add a unit test that the panel survives a parentloadingflip, and makemanual-network-asset.spec.tsgreen.Affected Files
apps/web/src/components/devices/DevicesPage.tsx(loading early-return)apps/web/src/components/devices/AddNetworkAssetModal.tsxe2e-tests/tests/manual-network-asset.spec.tsReported By
Merge-resolution fixer on PR #5261 (feature #4622 W04), 2026-09-08. Refs #5228, #5213.