Delete orphaned chat-pane component template

Remove chat-pane.html (defined but never invoked by any surface).
Update doc comments in pages.go to reflect current surfaces.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 12:58:14 +00:00
parent e925f32777
commit 43d6768685
2 changed files with 9 additions and 47 deletions

View File

@@ -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
}

View File

@@ -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"}}
<div class="chat-pane" id="{{.ID}}ChatPane">
<div class="chat-pane-header" id="{{.ID}}ChatHeader" style="display:none;">
<div class="chat-pane-header-left">
<select class="chat-pane-chat-select" id="{{.ID}}ChatSelect" title="Switch chat">
<option value="">New conversation</option>
</select>
<button class="chat-pane-new-btn" id="{{.ID}}ChatNewBtn" title="New chat">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
</button>
</div>
<div class="chat-pane-header-right">
<div class="chat-pane-model-sel" id="{{.ID}}ModelSel"></div>
</div>
</div>
<div class="chat-pane-messages" id="{{.ID}}ChatMessages"></div>
<div class="chat-pane-input-bar">
<div class="chat-pane-input-wrap">
<div class="chat-pane-input" id="{{.ID}}ChatInput"></div>
<button class="chat-pane-send" id="{{.ID}}SendBtn" title="Send">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/>
</svg>
</button>
</div>
<div class="chat-pane-toolbar" id="{{.ID}}Toolbar"></div>
</div>
</div>
{{end}}