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/streamCleaner, more maintainable codebase (~400 lines removed)
Endpoint Changes
/uinow serves data-star UI (previously served template-based UI)Removed
/ui/v2endpoint (data-star UI is now the default)SSE endpoint changed from
/ui/eventsto/ui/streamfor consistency
Removed
Old template-based UI code (~400 lines of template HTML)
uiDatastruct anduiTemplatevariable (no longer needed with data-star)handleUIDataStarfunction (merged intohandleUI)Unused imports:
html/template,osTechnical 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/streamAutomatic DOM updates without page refresh
Modern, declarative templating
Migration Notes
For API consumers:
✅ No breaking changes - all JSON endpoints remain unchanged
✅
/status,/metrics,/healthwork exactly as before For Web UI users:Navigate to
/uifor the new reactive interfaceOld bookmarks to
/uiwill automatically show the new UI/ui/v2endpoint 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/streamRelated Changes
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.