Changed

  • Replaced old template-based UI with modern data-star reactive UI

  • Now uses data-star framework (1.0.0-RC.8) for reactive updates

  • Real-time updates via Server-Sent Events at /ui/stream

  • Cleaner, more maintainable codebase (~400 lines removed)

    Endpoint Changes

  • /ui now serves data-star UI (previously served template-based UI)

  • Removed /ui/v2 endpoint (data-star UI is now the default)

  • SSE endpoint changed from /ui/events to /ui/stream for consistency

Removed

  • Old template-based UI code (~400 lines of template HTML)

  • uiData struct and uiTemplate variable (no longer needed with data-star)

  • handleUIDataStar function (merged into handleUI)

  • Unused imports: html/template, os

    Technical Details

    Data-Star Integration

    The new UI uses the data-star reactive framework:

    <script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@1.0.0-RC.8/bundles/datastar.js"></script>
    

    Features:

  • Reactive state management

  • Real-time SSE updates from /ui/stream

  • Automatic DOM updates without page refresh

  • Modern, declarative templating

    Migration Notes

    For API consumers:

  • ✅ No breaking changes - all JSON endpoints remain unchanged

  • /status, /metrics, /health work exactly as before For Web UI users:

  • Navigate to /ui for the new reactive interface

  • Old bookmarks to /ui will automatically show the new UI

  • /ui/v2 endpoint removed (no longer needed)

    Files Modified

    internal/watcher/api.go     -432 lines, +14 lines (net: -418 lines)
    internal/watcher/static/    +1 file (datastar.js, for future vendoring)
    

    Testing

    # Build and test
    go build -o dockward ./cmd/dockward
    ./dockward -config config.json
    # Access new UI
    open http://localhost:8080/ui
    # Verify SSE updates
    curl http://localhost:8080/ui/stream
    

    This release completes the Web UI modernization effort started in alpha.8, providing a more reactive and maintainable interface for monitoring dockward services. The data-star framework enables a better user experience with automatic updates and cleaner code architecture.