diff --git a/server/pages/pages.go b/server/pages/pages.go index 19dde05..4e51acd 100644 --- a/server/pages/pages.go +++ b/server/pages/pages.go @@ -4,8 +4,8 @@ // // templates/base.html — outer shell (banner + surface block + scripts) // templates/login.html — standalone login page -// templates/components/*.html — reusable partials (model-select, team-select, chat-pane, etc.) -// templates/surfaces/*.html — one per surface (chat, editor, notes, admin, etc.) +// templates/components/*.html — reusable partials (model-select, team-select, etc.) +// templates/surfaces/*.html — one per surface (admin, settings, team-admin, extension) package pages import ( @@ -46,12 +46,12 @@ type Engine struct { // registered in Go at startup. Extension surfaces will be registered from // manifest files (future). type SurfaceManifest struct { - ID string `json:"id"` // unique identifier: "chat", "editor", "my-dashboard" - Route string `json:"route"` // primary URL pattern: "/", "/editor/:wsId" - AltRoutes []string `json:"alt_routes"` // additional URL patterns: ["/chat/:chatID"] - Title string `json:"title"` // human-readable: "Chat", "Editor" - Template string `json:"template"` // Go template name: "surface-chat", "surface-editor" - Components []string `json:"components"` // component IDs used: ["chat-pane", "file-tree"] + ID string `json:"id"` // unique identifier: "admin", "settings", "my-dashboard" + Route string `json:"route"` // primary URL pattern: "/", "/admin" + AltRoutes []string `json:"alt_routes"` // additional URL patterns + Title string `json:"title"` // human-readable: "Admin", "Settings" + Template string `json:"template"` // Go template name: "surface-admin", "surface-extension" + Components []string `json:"components"` // component IDs used: ["file-tree"] DataRequires []string `json:"data_requires"` // data loader keys: ["workspace", "models"] Scripts []string `json:"scripts"` // JS files (surface-specific, beyond base.html common) Styles []string `json:"styles"` // CSS files (surface-specific) @@ -433,7 +433,7 @@ func (e *Engine) RenderExtensionSurface() gin.HandlerFunc { // PageRouteMiddleware holds middleware handlers for each auth level. // Passed to RegisterPageRoutes by main.go. type PageRouteMiddleware struct { - Authenticated gin.HandlerFunc // AuthOrRedirect — for chat, editor, notes, settings + Authenticated gin.HandlerFunc // AuthOrRedirect — for authenticated surfaces Admin []gin.HandlerFunc // AuthOrRedirect + RequireAdminPage Session gin.HandlerFunc // AuthOrSession — for workflow } diff --git a/server/pages/templates/components/chat-pane.html b/server/pages/templates/components/chat-pane.html deleted file mode 100644 index 26881dc..0000000 --- a/server/pages/templates/components/chat-pane.html +++ /dev/null @@ -1,38 +0,0 @@ -{{/* - Chat Pane Component - reusable chat scaffold. - Usage: {{template "chat-pane" dict "ID" "main"}} - Creates mount points: {ID}ChatMessages, {ID}ChatInput, {ID}SendBtn, {ID}ModelSel - ChatPane.create() in chat-pane.js binds to these IDs. - - The header bar ({ID}ChatHeader) is hidden by default. - Standalone panes (editor assist) show it for chat switching + model selection. -*/}} -{{define "chat-pane"}} -