package server import "net/http" // GetSetupPage handles GET /operator/setup — the persistent, revisitable // setup checklist (openspec change ux-first-run). Unlike a wizard, this page // always renders, complete or not, and never gates or sequences any other // operator surface; an operator can leave any step undone and keep using // the rest of the console. // // It shares OperatorHandler with the landing surface (not // OperatorPartialsHandler) because both surfaces render from the same // SetupState so they can never disagree about what is or is not done. func (h *OperatorHandler) GetSetupPage(w http.ResponseWriter, r *http.Request) { page := BuildOperatorPageData(r, h.AuthConfig, h.Database, h.Logger) page.IAPosition = "runtime:setup" // No sidebar entry names "setup" — it is reached from the landing // region's link, not the flat capability list — so leaving // ActiveCapability unmatched lights nothing up, same as GetPersonPage's // sidebar-less person detail page. page.ActiveCapability = "setup" page.BodyTemplate = "operator_setup.html" state := h.DeriveSetupState(r.Context()) state.FullPage = true page.BodyData = state h.Templates.Render(w, "operator.html", page) }