Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UI server with real-time updates and update-ui command #8

Merged
merged 20 commits into from
Feb 26, 2025

Conversation

wesen
Copy link
Contributor

@wesen wesen commented Feb 26, 2025

This PR introduces a significantly enhanced UI server with real-time update
capabilities and a new update-ui command:

UI Server Improvements

  • Implemented Server-Sent Events (SSE) for real-time UI updates without page
    refreshes
  • Added file watching to automatically reload pages when YAML files change
  • Improved routing with proper URL paths and handler registration
  • Added structured logging with different log levels for actions
  • Implemented proper error handling and graceful shutdown
  • Enhanced component styling and rendering for lists and forms
  • Added support for nested lists and improved visual hierarchy

New Update-UI Command

  • Added new MCP command to dynamically update UI components
  • Supports YAML input for defining components
  • Converts YAML to JSON before sending to the server
  • Includes comprehensive documentation in README
  • Provides multiple conversion methods (Python, yq, or basic sed)

UI Action Handling

  • Added /api/ui-action endpoint for component event handling
  • Implemented comprehensive form data collection
  • Added smart logging that prioritizes important events
  • Added tracking of which button triggered form submissions
  • Maintained backward compatibility with existing console logging

Example Pages

  • Added dinosaur and farm-themed example pages showcasing UI capabilities
  • Includes interactive forms, quizzes, and information displays
  • Demonstrates nested components and list structures

Documentation

  • Enhanced UI DSL documentation with better examples
  • Added comprehensive documentation for UI action handling
  • Added structured metadata for better document retrieval
  • Created developer documentation for SSE page handling

@wesen wesen merged commit 5c8a162 into go-go-golems:main Feb 26, 2025
2 checks passed
@wesen wesen deleted the task/add-ui-server-update-ui branch February 26, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant