Skip to content

[UI] Add network asset: post-create HTTP-check hand-off panel never renders — page refresh remounts the modal #5265

Description

@ToddHebebrand

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.onCreatedDevicesPage.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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions