Skip to content

Conversation

@bburda
Copy link
Contributor

@bburda bburda commented Dec 2, 2025

This change adds basic Web UI that consumes all available (so far) ros2_medkit REST API endpoints.
It adds basic folder structure and files.
It adds EntityTree components and renders them allowing to connect to SOVD Server and fetch data.

closes #1

This change introduces a new EntityTree model.
It consumes all endpoints that are available in ros2_medkit right now.
It also improve basic UI workflows and add Dockerfile.
@bburda bburda requested review from Copilot and mfaferek93 December 2, 2025 07:30
@bburda bburda self-assigned this Dec 2, 2025
@bburda bburda added the enhancement New feature or request label Dec 2, 2025
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 establishes the initial SOVD Web UI setup, providing a React-based frontend to consume the ros2_medkit REST API. It introduces a functional web application with entity tree browsing, server connection management, and basic component architecture using modern React patterns with TypeScript, Vite, and TailwindCSS.

Key Changes

  • React application scaffolding with Vite build system and TypeScript
  • State management using Zustand with persistence for server connection details
  • SOVD API client implementation for areas, components, and topic data
  • Entity tree navigation UI with collapsible hierarchy and detail panels

Reviewed changes

Copilot reviewed 39 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.ts Vite configuration with React and TailwindCSS plugins
tsconfig.*.json TypeScript configuration for app and node builds
package.json Dependencies for React 19, Zustand, Radix UI, and TailwindCSS
src/main.tsx Application entry point with React root rendering
src/App.tsx Main app component with layout and auto-connect logic
src/lib/types.ts TypeScript interfaces for SOVD entities and state
src/lib/sovd-api.ts API client for SOVD endpoints (health, areas, components)
src/lib/store.ts Zustand store for connection and entity tree state
src/components/* UI components (Button, Card, Dialog, Input, etc.)
src/components/EntityTreeSidebar.tsx Entity tree navigation sidebar
src/components/EntityTreeNode.tsx Recursive tree node component
src/components/EntityDetailPanel.tsx Entity details and topic viewer
src/components/ServerConnectionDialog.tsx Server connection dialog
src/components/EmptyState.tsx Empty state placeholders
nginx.conf Nginx configuration for SPA routing
.devcontainer/Dockerfile DevContainer setup with Ubuntu base

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- remove unnecesarry "use client"
- simplify status indicator logic
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

Copilot reviewed 39 out of 43 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Implement comprehensive error handling with toast notifications and
add timeout protection for all API requests to prevent infinite
loading states.

Toast notification system (react-toastify):
- Auto-connect failure now shows toast error and opens connection dialog
- Publish success/error messages replaced with toast notifications
- Entity loading errors display toast instead of console-only logging
- Removed inline error/success state in EntityDetailPanel
- Consistent UX for all error scenarios across the application

Connection timeouts:
- Added fetchWithTimeout wrapper with AbortController
- Health check (ping): 3 second timeout
- Entity loading: 5 second timeout (default)
- Topic publish: 10 second timeout
- Clear error message when server doesn't respond in time
- Prevents infinite "Connecting..." state for unreachable servers

Code cleanup:
- Removed unused publishErrors and publishSuccess state variables
- Removed inline error/success UI components (AlertCircle, CheckCircle2)
- Removed unused imports (cn utility from EntityTreeSidebar)
- Simplified error handling flow with centralized toast system
Copy link

@mfaferek93 mfaferek93 left a comment

Choose a reason for hiding this comment

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

LGTM!

@bburda bburda merged commit c125b52 into main Dec 2, 2025
1 check passed
@bburda bburda deleted the initial_setup branch December 2, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial project structure

3 participants