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
- Open the web UI, select any function entity.
- Look at DevTools network panel: a
GET /functions/{id}/configurations request returns 404.
- 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.
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}/configurationscollection.FunctionsPanelstill fetches it in parallel on mount and renders a Config tab that always stays at 0.Steps to reproduce
GET /functions/{id}/configurationsrequest returns 404.Expected
No Config tab and no
/configurationsfetch for function entities.2.
transformFaultis brittle on unexpectedfirst_occurredshapestransformFaultdoesnew Date(apiFault.first_occurred * 1000).toISOString()unconditionally. If the gateway sendsfirst_occurredas a string (ISO 8601),0, a negative number, or omits it, the UI either throws or rendersInvalid Date.Expected
Fault rendering tolerates unix seconds, ISO 8601 strings, and falls back to the current time for invalid or missing values.
3.
transformDataResponseassumes ROS 2 semantics for every data itemRawDataItemandtransformDataResponseonly readx-medkit.ros2.*fields and always returnstatus: 'metadata_only'even when the gateway inlines avalue. Gateways exposing non-streaming data items through the generic SOVDx-medkitvendor extension show up with no value and no type label.Expected
The transform respects generic
x-medkitfields (middleware,access,type,direction,encoding), marks the topic asstatus: 'data'when avalueis inlined, and acceptsinput/outputas alternative direction terms alongsidepublish/subscribe/both.Environment
Additional information
Fix proposed in follow-up PR: drop the Config tab for functions, defensive
first_occurredparsing with tests, and generic vendor-extension handling intransformDataResponsewith tests. ROS 2 behaviour unchanged.