Siso's web UI is an experimental visualizer for Siso build metrics.
It also provides a replacement for Ninja's ninja -t browse.
Siso does not have dedicated web frontend engineers, and it is not intended for the web UI to be a substitute for systems such as CI.
As such, the web UI is developed as a server-side rendered webapp, keeping external dependencies as minimal as reasonably possible.
The only two major dependencies at time of writing are:
Prefer writing as little custom JavaScript as possible.
Frontend web frameworks add a burden of additional domain-specific expertise. Without dedicated web frontend engineers, this adds maintenance overhead that this project is not staffed to handle.
The modern web platform provides features that support rich client-side interactivity with less overhead than historically required:
Unavoidable cases of custom JavaScript include:
Avoid technologies that require a web bundler.
Keeping the web UI buildable via the standard Go toolchain keeps development and maintenance simpler.
The current web UI takes advantage of modern web platform features that obviate historical reasons to use a web bundler, such as:
& selector), one historically common reason to require a build step for CSS preprocessing, is available as part of Baseline 2023.sse.go provides an SSE (Server-Sent Events) endpoint at /events/ that can be used to push updates to the browser, where polling would be inefficient or cumbersome.
This endpoint is not coupled to any specific features in the Siso web UI. Any handler may broadcast a message to all listeners by sending a message to the Go channel:
s.sseServer.messages <- sseMessage{"yourevent", "yourmessage"}
Templates may consume this using HTMX's SSE attributes, without requiring additional custom JavaScript.
Given the above example, the below snippet would listen for the corresponding event name, and display its contents in the <div> upon receipt:
<div hx-ext="sse" sse-connect="/events/"> <div sse-swap="yourevent" hx-target="this" hx-swap="innerHTML"></div> </div>
All event filtering is performed client-side; all open instances of the Siso web UI listening to the same endpoint will receive all messages. The sse-swap attribute determines which of them are responded to.