Skip to content

Conversation

@bburda
Copy link
Contributor

@bburda bburda commented Jan 30, 2026

Pull Request

Summary

  • Add store-level polling for async action execution status
  • Fix ExecutionStatus type to include 'completed' (SOVD standard)
  • Add TrackedExecution interface with metadata for polling
  • Fix OperationResponseDisplay to show live status from store for actions
  • Fix service response display (handle 'parameters' field format)
  • Remove auto-refresh checkbox, hide ActionStatusPanel when terminal
  • Fix ConfigurationPanel overflow with scrollable container
  • Clean up unused imports and debug logs

Issue

Link the related issue (required):


Type

  • Bug fix
  • New feature
  • Breaking change
  • Documentation only

Testing

How was this tested / how should reviewers verify it?
manually tested with Turtlebot3 demo


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Docs were updated if behavior or public API changed

…se display

- Add store-level polling for async action execution status
- Fix ExecutionStatus type to include 'completed' (SOVD standard)
- Add TrackedExecution interface with metadata for polling
- Fix OperationResponseDisplay to show live status from store for actions
- Fix service response display (handle 'parameters' field format)
- Remove auto-refresh checkbox, hide ActionStatusPanel when terminal
- Fix ConfigurationPanel overflow with scrollable container
- Clean up unused imports and debug logs
@bburda bburda requested a review from mfaferek93 January 30, 2026 20:25
@bburda bburda self-assigned this Jan 30, 2026
Copilot AI review requested due to automatic review settings January 30, 2026 20:25
@bburda bburda added the bug Something isn't working label Jan 30, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where async operation execution status was not updating correctly (issue #22). The fix introduces store-level polling to automatically track and update execution statuses, adds the 'completed' status to the ExecutionStatus type per SOVD standards, and improves the UI display for both service and action responses.

Changes:

  • Added store-level polling mechanism for tracking async action execution status with automatic cleanup
  • Added 'completed' status to ExecutionStatus type and normalized status mapping from API responses
  • Refactored operation response display to show live status from store and handle service/action response formats differently
  • Simplified ActionStatusPanel by removing manual auto-refresh controls and moving it outside CollapsibleContent
  • Added scrollable containers to ConfigurationPanel, OperationsPanel, and EntityDetailPanel to prevent UI overflow

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/lib/types.ts Added 'completed' to ExecutionStatus type for SOVD compliance
src/lib/store.ts Added TrackedExecution interface, polling logic (startExecutionPolling/stopExecutionPolling), changed autoRefreshExecutions default to true, cleanup in disconnect
src/lib/sovd-api.ts Added normalizeExecutionStatus method to map API status values and extract x-medkit metadata, updated getExecution and cancelExecution to use normalization
src/components/OperationsPanel.tsx Moved ActionStatusPanel outside CollapsibleContent to keep polling active, removed unused entityId/entityType from OperationRow props, added scrollable container with sticky headers
src/components/OperationResponse.tsx Added live status subscription from store, service/action response format handling, displays execution results dynamically
src/components/ActionStatusPanel.tsx Simplified props (only executionId needed), removed auto-refresh checkbox, returns null for terminal executions, uses store-managed polling
src/components/EntityDetailPanel.tsx Added scrollable containers to prevent overflow in data topics list
src/components/ConfigurationPanel.tsx Added scrollable container to prevent overflow in parameters list
Comments suppressed due to low confidence (1)

src/components/OperationsPanel.tsx:117

  • The type declaration still includes 'entityId' and 'entityType' parameters (lines 114, 117), but these are not included in the destructured function parameters (lines 108-112). Since these parameters were removed from the function signature, they should also be removed from the type declaration to maintain consistency.
}: {
    operation: Operation;
    entityId: string;
    onInvoke: (opName: string, payload: unknown) => Promise<CreateExecutionResponse | null>;
    defaultExpanded?: boolean;
    entityType?: SovdResourceEntityType;

- Change unknown status fallback from 'running' to 'pending' with warning log
- Make CreateExecutionResponse.id optional for service calls
- Add optional parameters field to CreateExecutionResponse type
- Filter internal envelope fields (status, kind, error) from service results
- Extract getBorderClass helper to improve readability
- Fix race condition in parallel execution status updates (batch updates)
- Fix race condition in startExecutionPolling (atomic check + set)
- Add execution cleanup after 5 minutes to prevent memory growth
- Add 3-second delay before hiding terminal state panels for better UX
@mfaferek93 mfaferek93 self-requested a review January 31, 2026 11:59
@bburda bburda merged commit 1047137 into main Jan 31, 2026
3 checks passed
@bburda bburda deleted the fix/operations-status branch January 31, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Operations execution is not updating status correctly

3 participants