Skip to content

Subcomponent entities render no resource tabs in detail panel #74

@bburda

Description

@bburda

Bug report

Steps to reproduce

  1. Connect the web UI to a gateway that exposes aggregated subcomponents (via /components/{id}/subcomponents).
  2. In the entity tree, expand a component that hosts subcomponents.
  3. Click on a subcomponent node.

Expected behavior

The detail panel renders the same UI as for a top-level component: header card, the Data / Operations / Config / Faults / Logs tab bar, and the corresponding tab content. The gateway returns full capabilities for subcomponents through /api/v1/components/{id}, so the UI should treat them identically.

Actual behavior

The detail panel shows the entity header but no tab bar, and the body falls through to "No detailed information available for this entity." The Refresh button is also a no-op for subcomponents.

Root cause

EntityDetailPanel.tsx and store.ts gate behaviour on selectedEntity.type === 'component'. When the type is 'subcomponent':

  • prefetchResourceCounts / fetchEntityData short-circuit, so no tab counts are fetched.
  • The tab bar and <ComponentTabContent> are not rendered.
  • refreshSelectedEntity finds no entry in its typeMap and returns without re-fetching.
  • The icon / background helpers fall through to the default branch.

Environment

  • ros2_medkit_web_ui version: 0.1.0 (main)
  • Browser: any
  • OS: any

Additional information

Subcomponents originate from peer aggregation; the same /components/{id} endpoint serves them with identical capabilities, so the frontend can treat them as components for routing, fetching, and rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions