Skip to content

[BUG] Empty function Config tab, brittle fault timestamps, ROS-2-only data transforms #65

@bburda

Description

@bburda

Bug report

Three related UI polish issues surfaced while browsing entities against a live gateway.

1. Functions panel renders an always-empty Config tab and spams 404s

SOVD functions are capability aggregations and do not expose a /functions/{id}/configurations collection. FunctionsPanel still fetches it in parallel on mount and renders a Config tab that always stays at 0.

Steps to reproduce

  1. Open the web UI, select any function entity.
  2. Look at DevTools network panel: a GET /functions/{id}/configurations request returns 404.
  3. The Config tab in the function detail view renders empty.

Expected

No Config tab and no /configurations fetch for function entities.

2. transformFault is brittle on unexpected first_occurred shapes

transformFault does new Date(apiFault.first_occurred * 1000).toISOString() unconditionally. If the gateway sends first_occurred as a string (ISO 8601), 0, a negative number, or omits it, the UI either throws or renders Invalid Date.

Expected

Fault rendering tolerates unix seconds, ISO 8601 strings, and falls back to the current time for invalid or missing values.

3. transformDataResponse assumes ROS 2 semantics for every data item

RawDataItem and transformDataResponse only read x-medkit.ros2.* fields and always return status: 'metadata_only' even when the gateway inlines a value. Gateways exposing non-streaming data items through the generic SOVD x-medkit vendor extension show up with no value and no type label.

Expected

The transform respects generic x-medkit fields (middleware, access, type, direction, encoding), marks the topic as status: 'data' when a value is inlined, and accepts input/output as alternative direction terms alongside publish/subscribe/both.

Environment

  • ros2_medkit_web_ui version: 0.1.0 (main)
  • Browser: Chromium / Firefox
  • OS: Linux

Additional information

Fix proposed in follow-up PR: drop the Config tab for functions, defensive first_occurred parsing with tests, and generic vendor-extension handling in transformDataResponse with tests. ROS 2 behaviour unchanged.

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