refactor(archied): cut the dashboard over to the archie-ui process
PRD gate 7 (docs/prds/ui-service-boundary.md): the daemon's in-process webui.Run listener is deleted in the same change that wires the UI process, so no fallback or second HTTP authority remains. The daemon's webui.Server stays only as the configuration snapshot's renderer (archie-core-ymut): it keeps the config Holder, provenance, reload status and the override list, and drops the store surfaces, event broadcast, chat/task wiring that only fed the listener. The bus drain becomes persistence-only -- the store is the single fan-out point the UI process reads through its event pump. The dashboard's configuration write path (PATCH /api/config, per-row reset, per-repo field update) is deleted rather than left as dead policy: the writes are descoped for the UI process (archie-core-ymut) and no route reaches them. Editing is config.toml plus reload; the overlay store stays for reload wiring.
This commit is contained in:
1 parent
428a7879f6
commit
d36073528d
9 files changed
+65
-468
No files matched your search
@@ -15,7 +15,6 @@ import (
|
||||
"net/http"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/samcharles93/archie-core/internal/channels"
|
||||
"github.com/samcharles93/archie-core/internal/config"
|
||||
@@ -387,22 +386,6 @@ func trimLeadingSlash(p string) string {
|
||||
return p
|
||||
}
|
||||
|
||||
// Run serves until ctx ends.
|
||||
func (s *Server) Run(ctx context.Context, listen string) error {
|
||||
srv := &http.Server{Addr: listen, Handler: s.Handler(), ReadHeaderTimeout: 5 * time.Second}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
shutdownCtx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 2*time.Second)
|
||||
defer cancel()
|
||||
_ = srv.Shutdown(shutdownCtx)
|
||||
}()
|
||||
s.Log.Info("web ui listening", "addr", "http://"+listen)
|
||||
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeJSON(w http.ResponseWriter, v any) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_ = json.NewEncoder(w).Encode(v)
|
||||
|
||||
Reference in new issue
Block a user