From c470037fb5d62e29b14cc705fb3b457cf0a1d448 Mon Sep 17 00:00:00 2001 From: Jeffrey Smith Date: Thu, 26 Mar 2026 10:28:09 +0000 Subject: [PATCH] =?UTF-8?q?rebrand=20+=20purge=20orphaned=20frontend:=20Ch?= =?UTF-8?q?at=20Switchboard=20=E2=86=92=20Switchboard=20Core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branding: bulk rename across 50+ files (Go, JS, CSS, HTML, YAML, JSON, shell scripts). Fix Helm chart description and git repo URLs. Fix test helper taglines. Admin surface: strip 14 gutted tabs (providers, models, personas, roles, knowledge, memory, tasks, health, routing, capabilities, channels, dashboard, usage, stats). Collapse to 4 categories: People, Workflows, System, Monitoring. Settings surface: strip 11 gutted tabs (models, personas, providers, roles, knowledge, memory, usage, workflows, tasks, data, gitkeys). Keep: general, appearance, profile, teams, connections, notifications. Team-admin surface: strip 5 gutted tabs (personas, providers, knowledge, tasks, usage). Keep: members, groups, connections, workflows, settings, activity. Components: delete chat-pane/ (13 files, 1938 lines) and notes-pane/ (10 files, 2381 lines). main.go: remove stale Health.Prune maintenance goroutine. Co-Authored-By: Claude Opus 4.6 (1M context) --- chart/Chart.yaml | 4 +- chart/alerting/switchboard-rules.yaml | 2 +- chart/dashboards/switchboard-overview.json | 2 +- chart/values.yaml | 6 +- ci/keycloak-realm.json | 2 +- k8s/backend.yaml | 2 +- k8s/frontend.yaml | 2 +- k8s/ingress.yaml | 2 +- k8s/middleware-retry.yaml | 2 +- k8s/storage-pvc.yaml | 2 +- packages/dashboard/js/main.js | 2 +- packages/dashboard/manifest.json | 2 +- packages/editor/css/main.css | 2 +- packages/editor/js/main.js | 2 +- packages/editor/manifest.json | 2 +- .../js/crud/dashboard-package.js | 2 +- .../icd-test-runner/js/crud/editor-package.js | 2 +- packages/icd-test-runner/js/ui.js | 2 +- scripts/db-bootstrap.sh | 2 +- scripts/db-migrate.sh | 2 +- scripts/db-validate.sh | 2 +- server/crypto/vault.go | 2 +- server/database/testhelper.go | 4 +- server/handlers/admin_email.go | 4 +- server/logging/logger.go | 2 +- server/main.go | 15 - server/metrics/metrics.go | 2 +- server/notifications/service.go | 2 +- server/notifications/templates.go | 6 +- server/notifications/templates_test.go | 2 +- server/pages/pages.go | 2 +- server/pages/templates/base.html | 2 +- server/pages/templates/login.html | 2 +- server/static/swagger.html | 2 +- src/css/admin-surfaces.css | 2 +- src/css/user-menu.css | 2 +- src/css/variables.css | 2 +- src/css/workflow.css | 2 +- src/dev.html | 4 +- src/index.html | 2 +- .../sw/components/chat-pane/chat-history.js | 57 -- src/js/sw/components/chat-pane/code-block.js | 142 ----- .../sw/components/chat-pane/emoji-picker.js | 205 ------- src/js/sw/components/chat-pane/index.js | 141 ----- src/js/sw/components/chat-pane/markdown.js | 90 --- .../components/chat-pane/message-actions.js | 108 ---- .../sw/components/chat-pane/message-bubble.js | 128 ---- .../sw/components/chat-pane/message-input.js | 294 --------- .../sw/components/chat-pane/message-list.js | 116 ---- .../sw/components/chat-pane/model-selector.js | 72 --- .../components/chat-pane/typing-indicator.js | 38 -- src/js/sw/components/chat-pane/use-chat.js | 426 ------------- src/js/sw/components/chat-pane/use-stream.js | 121 ---- src/js/sw/components/debug/engine.js | 2 +- src/js/sw/components/notes-pane/index.js | 201 ------- src/js/sw/components/notes-pane/markdown.js | 162 ----- .../sw/components/notes-pane/note-editor.js | 172 ------ src/js/sw/components/notes-pane/note-graph.js | 561 ------------------ .../components/notes-pane/note-list-item.js | 103 ---- src/js/sw/components/notes-pane/note-list.js | 169 ------ .../sw/components/notes-pane/note-reader.js | 184 ------ .../components/notes-pane/quick-switcher.js | 159 ----- .../sw/components/notes-pane/save-to-note.js | 188 ------ src/js/sw/components/notes-pane/use-notes.js | 482 --------------- src/js/sw/sdk/auth.js | 2 +- src/js/sw/sdk/can.js | 2 +- src/js/sw/sdk/events.js | 2 +- src/js/sw/sdk/pipe.js | 2 +- src/js/sw/sdk/rest-client.js | 2 +- src/js/sw/sdk/theme.js | 2 +- src/js/sw/surfaces/admin/capabilities.js | 105 ---- src/js/sw/surfaces/admin/channels.js | 87 --- src/js/sw/surfaces/admin/dashboard.js | 90 --- src/js/sw/surfaces/admin/health.js | 57 -- src/js/sw/surfaces/admin/index.js | 36 +- src/js/sw/surfaces/admin/knowledge.js | 132 ----- src/js/sw/surfaces/admin/memory.js | 76 --- src/js/sw/surfaces/admin/models.js | 95 --- src/js/sw/surfaces/admin/personas.js | 225 ------- src/js/sw/surfaces/admin/providers.js | 141 ----- src/js/sw/surfaces/admin/roles.js | 81 --- src/js/sw/surfaces/admin/routing.js | 159 ----- src/js/sw/surfaces/admin/settings.js | 2 +- src/js/sw/surfaces/admin/stats.js | 40 -- src/js/sw/surfaces/admin/tasks.js | 106 ---- src/js/sw/surfaces/admin/usage.js | 91 --- src/js/sw/surfaces/login/hero.js | 2 +- src/js/sw/surfaces/settings/data.js | 59 -- src/js/sw/surfaces/settings/gitkeys.js | 97 --- src/js/sw/surfaces/settings/index.js | 43 +- src/js/sw/surfaces/settings/knowledge.js | 186 ------ src/js/sw/surfaces/settings/memory.js | 117 ---- src/js/sw/surfaces/settings/models.js | 110 ---- src/js/sw/surfaces/settings/personas.js | 159 ----- src/js/sw/surfaces/settings/providers.js | 213 ------- src/js/sw/surfaces/settings/roles.js | 127 ---- src/js/sw/surfaces/settings/tasks.js | 71 --- src/js/sw/surfaces/settings/usage.js | 65 -- src/js/sw/surfaces/settings/workflows.js | 138 ----- src/js/sw/surfaces/team-admin/index.js | 30 +- src/js/sw/surfaces/team-admin/knowledge.js | 44 -- src/js/sw/surfaces/team-admin/personas.js | 106 ---- src/js/sw/surfaces/team-admin/providers.js | 123 ---- src/js/sw/surfaces/team-admin/tasks.js | 111 ---- src/js/sw/surfaces/team-admin/usage.js | 57 -- src/manifest.json | 2 +- src/sw.js | 2 +- 107 files changed, 83 insertions(+), 7744 deletions(-) delete mode 100644 src/js/sw/components/chat-pane/chat-history.js delete mode 100644 src/js/sw/components/chat-pane/code-block.js delete mode 100644 src/js/sw/components/chat-pane/emoji-picker.js delete mode 100644 src/js/sw/components/chat-pane/index.js delete mode 100644 src/js/sw/components/chat-pane/markdown.js delete mode 100644 src/js/sw/components/chat-pane/message-actions.js delete mode 100644 src/js/sw/components/chat-pane/message-bubble.js delete mode 100644 src/js/sw/components/chat-pane/message-input.js delete mode 100644 src/js/sw/components/chat-pane/message-list.js delete mode 100644 src/js/sw/components/chat-pane/model-selector.js delete mode 100644 src/js/sw/components/chat-pane/typing-indicator.js delete mode 100644 src/js/sw/components/chat-pane/use-chat.js delete mode 100644 src/js/sw/components/chat-pane/use-stream.js delete mode 100644 src/js/sw/components/notes-pane/index.js delete mode 100644 src/js/sw/components/notes-pane/markdown.js delete mode 100644 src/js/sw/components/notes-pane/note-editor.js delete mode 100644 src/js/sw/components/notes-pane/note-graph.js delete mode 100644 src/js/sw/components/notes-pane/note-list-item.js delete mode 100644 src/js/sw/components/notes-pane/note-list.js delete mode 100644 src/js/sw/components/notes-pane/note-reader.js delete mode 100644 src/js/sw/components/notes-pane/quick-switcher.js delete mode 100644 src/js/sw/components/notes-pane/save-to-note.js delete mode 100644 src/js/sw/components/notes-pane/use-notes.js delete mode 100644 src/js/sw/surfaces/admin/capabilities.js delete mode 100644 src/js/sw/surfaces/admin/channels.js delete mode 100644 src/js/sw/surfaces/admin/dashboard.js delete mode 100644 src/js/sw/surfaces/admin/health.js delete mode 100644 src/js/sw/surfaces/admin/knowledge.js delete mode 100644 src/js/sw/surfaces/admin/memory.js delete mode 100644 src/js/sw/surfaces/admin/models.js delete mode 100644 src/js/sw/surfaces/admin/personas.js delete mode 100644 src/js/sw/surfaces/admin/providers.js delete mode 100644 src/js/sw/surfaces/admin/roles.js delete mode 100644 src/js/sw/surfaces/admin/routing.js delete mode 100644 src/js/sw/surfaces/admin/stats.js delete mode 100644 src/js/sw/surfaces/admin/tasks.js delete mode 100644 src/js/sw/surfaces/admin/usage.js delete mode 100644 src/js/sw/surfaces/settings/data.js delete mode 100644 src/js/sw/surfaces/settings/gitkeys.js delete mode 100644 src/js/sw/surfaces/settings/knowledge.js delete mode 100644 src/js/sw/surfaces/settings/memory.js delete mode 100644 src/js/sw/surfaces/settings/models.js delete mode 100644 src/js/sw/surfaces/settings/personas.js delete mode 100644 src/js/sw/surfaces/settings/providers.js delete mode 100644 src/js/sw/surfaces/settings/roles.js delete mode 100644 src/js/sw/surfaces/settings/tasks.js delete mode 100644 src/js/sw/surfaces/settings/usage.js delete mode 100644 src/js/sw/surfaces/settings/workflows.js delete mode 100644 src/js/sw/surfaces/team-admin/knowledge.js delete mode 100644 src/js/sw/surfaces/team-admin/personas.js delete mode 100644 src/js/sw/surfaces/team-admin/providers.js delete mode 100644 src/js/sw/surfaces/team-admin/tasks.js delete mode 100644 src/js/sw/surfaces/team-admin/usage.js diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 913ab9f..fa41040 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,11 +1,11 @@ apiVersion: v2 name: switchboard -description: Chat Switchboard — self-hosted enterprise AI chat platform +description: Switchboard Core — self-hosted extension platform type: application version: 0.1.0 appVersion: "0.0.0" # Patched at CI/release time from /VERSION home: https://gobha.ai sources: - - https://git.gobha.me/xcaliber/chat-switchboard + - https://git.gobha.me/switchboard/core maintainers: - name: xcaliber diff --git a/chart/alerting/switchboard-rules.yaml b/chart/alerting/switchboard-rules.yaml index 339aaa4..7a86bee 100644 --- a/chart/alerting/switchboard-rules.yaml +++ b/chart/alerting/switchboard-rules.yaml @@ -1,4 +1,4 @@ -# Chat Switchboard — PrometheusRule alerts (v0.33.0) +# Switchboard Core — PrometheusRule alerts (v0.33.0) # Source file for the Helm template. Deploy via: # monitoring.prometheusRule.enabled: true apiVersion: monitoring.coreos.com/v1 diff --git a/chart/dashboards/switchboard-overview.json b/chart/dashboards/switchboard-overview.json index f889929..67192a5 100644 --- a/chart/dashboards/switchboard-overview.json +++ b/chart/dashboards/switchboard-overview.json @@ -18,7 +18,7 @@ ], "id": null, "uid": "switchboard-overview", - "title": "Chat Switchboard — Overview", + "title": "Switchboard Core — Overview", "description": "System overview: request rates, latency, provider health, token usage, DB pool.", "tags": ["switchboard"], "timezone": "browser", diff --git a/chart/values.yaml b/chart/values.yaml index 134a2d1..2edb5a8 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,10 +1,10 @@ -# Chat Switchboard — Helm values +# Switchboard Core — Helm values # helm install switchboard ./chart # ── Images ───────────────────────────────── backend: image: - repository: git.gobha.me/xcaliber/chat-switchboard + repository: git.gobha.me/switchboard/core tag: "" # defaults to Chart.appVersion pullPolicy: IfNotPresent replicaCount: 2 # v0.32.0: multi-replica HA @@ -19,7 +19,7 @@ backend: frontend: image: - repository: git.gobha.me/xcaliber/chat-switchboard-frontend + repository: git.gobha.me/switchboard/core tag: "" # defaults to Chart.appVersion pullPolicy: IfNotPresent replicaCount: 1 diff --git a/ci/keycloak-realm.json b/ci/keycloak-realm.json index e384528..7730c0a 100644 --- a/ci/keycloak-realm.json +++ b/ci/keycloak-realm.json @@ -30,7 +30,7 @@ "clients": [ { "clientId": "switchboard", - "name": "Chat Switchboard", + "name": "Switchboard Core", "enabled": true, "publicClient": false, "secret": "switchboard-secret", diff --git a/k8s/backend.yaml b/k8s/backend.yaml index 3fc8904..d57958d 100644 --- a/k8s/backend.yaml +++ b/k8s/backend.yaml @@ -1,6 +1,6 @@ # k8s/backend.yaml # ============================================ -# Chat Switchboard - Backend Deployment +# Switchboard Core - Backend Deployment # ============================================ # Secrets: # switchboard-db-credentials - POSTGRES_USER, POSTGRES_PASSWORD diff --git a/k8s/frontend.yaml b/k8s/frontend.yaml index fff4509..5e23be9 100644 --- a/k8s/frontend.yaml +++ b/k8s/frontend.yaml @@ -1,6 +1,6 @@ # k8s/frontend.yaml # ============================================ -# Chat Switchboard - Frontend Deployment +# Switchboard Core - Frontend Deployment # ============================================ # nginx serving the SPA + proxying page routes # to the backend for Go template rendering. diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml index e7ba5d4..59df944 100644 --- a/k8s/ingress.yaml +++ b/k8s/ingress.yaml @@ -1,6 +1,6 @@ # k8s/ingress.yaml # ============================================ -# Chat Switchboard - Ingress +# Switchboard Core - Ingress # ============================================ # Path-based routing on a single domain: # switchboard.DOMAIN/ → production diff --git a/k8s/middleware-retry.yaml b/k8s/middleware-retry.yaml index dae9626..42e245b 100644 --- a/k8s/middleware-retry.yaml +++ b/k8s/middleware-retry.yaml @@ -1,6 +1,6 @@ # k8s/middleware-retry.yaml # ============================================ -# Chat Switchboard - Traefik Retry Middleware +# Switchboard Core - Traefik Retry Middleware # ============================================ # Retries failed requests (502, connection reset) once before giving up. # Applies to API + WebSocket paths via the Ingress annotation. diff --git a/k8s/storage-pvc.yaml b/k8s/storage-pvc.yaml index 87836cf..cd590c1 100644 --- a/k8s/storage-pvc.yaml +++ b/k8s/storage-pvc.yaml @@ -1,6 +1,6 @@ # k8s/storage-pvc.yaml # ============================================ -# Chat Switchboard - Storage PVC +# Switchboard Core - Storage PVC # ============================================ # Persistent storage for file attachments, extraction queue, # and future knowledge base / compaction data. diff --git a/packages/dashboard/js/main.js b/packages/dashboard/js/main.js index b0f3cc8..861a773 100644 --- a/packages/dashboard/js/main.js +++ b/packages/dashboard/js/main.js @@ -1,5 +1,5 @@ // ========================================== -// Chat Switchboard — Dashboard Package (v0.31.1) +// Switchboard Core — Dashboard Package (v0.31.1) // ========================================== // SDK Exercise Surface. Exercises every sw.* primitive with ZERO // component CSS overrides. All styling comes from the SDK itself. diff --git a/packages/dashboard/manifest.json b/packages/dashboard/manifest.json index bcd68e2..04073f0 100644 --- a/packages/dashboard/manifest.json +++ b/packages/dashboard/manifest.json @@ -4,7 +4,7 @@ "type": "full", "version": "0.31.1", "tier": "browser", - "author": "Chat Switchboard", + "author": "Switchboard Core", "description": "Project dashboard exercising all SDK primitives", "route": "/s/dashboard", "permissions": [], diff --git a/packages/editor/css/main.css b/packages/editor/css/main.css index 1fd3370..b73cea3 100644 --- a/packages/editor/css/main.css +++ b/packages/editor/css/main.css @@ -1,5 +1,5 @@ /* ========================================== - Chat Switchboard — Editor Surface (v0.25.0) + Switchboard Core — Editor Surface (v0.25.0) ========================================== Replaces editor-mode.css for the pane-based editor. Covers: topbar, bootstrap, and component-specific diff --git a/packages/editor/js/main.js b/packages/editor/js/main.js index 948d9e9..d2b75c9 100644 --- a/packages/editor/js/main.js +++ b/packages/editor/js/main.js @@ -1,5 +1,5 @@ // ========================================== -// Chat Switchboard — Editor Package (v0.31.0) +// Switchboard Core — Editor Package (v0.31.0) // ========================================== // Installable .pkg that provides the code editor surface. // Mounts into #extension-mount (surface-extension template). diff --git a/packages/editor/manifest.json b/packages/editor/manifest.json index 1f4b107..c1efe6e 100644 --- a/packages/editor/manifest.json +++ b/packages/editor/manifest.json @@ -4,7 +4,7 @@ "type": "full", "version": "0.31.0", "tier": "browser", - "author": "Chat Switchboard", + "author": "Switchboard Core", "description": "Code editor with workspace management, file tree, and AI assist", "route": "/s/editor", "layout": "editor", diff --git a/packages/icd-test-runner/js/crud/dashboard-package.js b/packages/icd-test-runner/js/crud/dashboard-package.js index bfd934b..af9c06c 100644 --- a/packages/icd-test-runner/js/crud/dashboard-package.js +++ b/packages/icd-test-runner/js/crud/dashboard-package.js @@ -27,7 +27,7 @@ type: 'full', version: '0.31.1', tier: 'browser', - author: 'Chat Switchboard', + author: 'Switchboard Core', description: 'Project dashboard exercising all SDK primitives', route: '/s/dashboard', permissions: [], diff --git a/packages/icd-test-runner/js/crud/editor-package.js b/packages/icd-test-runner/js/crud/editor-package.js index 35a44c6..a4ee91a 100644 --- a/packages/icd-test-runner/js/crud/editor-package.js +++ b/packages/icd-test-runner/js/crud/editor-package.js @@ -27,7 +27,7 @@ type: 'full', version: '0.31.0', tier: 'browser', - author: 'Chat Switchboard', + author: 'Switchboard Core', description: 'Code editor with workspace management', route: '/s/editor', layout: 'editor', diff --git a/packages/icd-test-runner/js/ui.js b/packages/icd-test-runner/js/ui.js index 455a0ce..460dfee 100644 --- a/packages/icd-test-runner/js/ui.js +++ b/packages/icd-test-runner/js/ui.js @@ -368,7 +368,7 @@ var totalMs = T.results.reduce(function (s, r) { return s + r.duration; }, 0); var lines = []; - lines.push('=== Chat Switchboard ICD Test Report ==='); + lines.push('=== Switchboard Core ICD Test Report ==='); lines.push('Generated: ' + now); lines.push('Platform: v' + (T.manifest.version || '0.28.0')); lines.push('User: ' + T.user.username + ' (' + T.user.role + ')'); diff --git a/scripts/db-bootstrap.sh b/scripts/db-bootstrap.sh index e94d312..b00fca8 100644 --- a/scripts/db-bootstrap.sh +++ b/scripts/db-bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================ -# Chat Switchboard - Database Bootstrap +# Switchboard Core - Database Bootstrap # ============================================ # Idempotent: safe to run on every CI build. # Creates the app role and database if they diff --git a/scripts/db-migrate.sh b/scripts/db-migrate.sh index 83024bf..13efcdb 100644 --- a/scripts/db-migrate.sh +++ b/scripts/db-migrate.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================ -# Chat Switchboard - Database Migration Runner +# Switchboard Core - Database Migration Runner # ============================================ # NOTE: The Go backend auto-migrates on startup. # This script is for manual/emergency use only. diff --git a/scripts/db-validate.sh b/scripts/db-validate.sh index df9ddeb..68988b0 100644 --- a/scripts/db-validate.sh +++ b/scripts/db-validate.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============================================ -# Chat Switchboard - Schema Validation (v0.16) +# Switchboard Core - Schema Validation (v0.16) # ============================================ # Verifies the database schema is correct after # migration. Checks expected tables, key columns, diff --git a/server/crypto/vault.go b/server/crypto/vault.go index b67bf68..9d4da6b 100644 --- a/server/crypto/vault.go +++ b/server/crypto/vault.go @@ -1,4 +1,4 @@ -// Package crypto provides API key encryption primitives for Chat Switchboard. +// Package crypto provides API key encryption primitives for Switchboard Core. // // Two-tier model: // diff --git a/server/database/testhelper.go b/server/database/testhelper.go index 128906d..cd8a3ff 100644 --- a/server/database/testhelper.go +++ b/server/database/testhelper.go @@ -309,7 +309,7 @@ func TruncateAll(t *testing.T) { DB.Exec(` INSERT INTO global_settings (key, value) VALUES ('registration', '{"enabled": true}'), - ('site', '{"name": "Chat Switchboard", "tagline": "Multi-Model AI Chat"}'), + ('site', '{"name": "Switchboard Core", "tagline": "Self-hosted extension platform"}'), ('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}'), ('model_roles', '{"utility":{"primary":null,"fallback":null},"embedding":{"primary":null,"fallback":null},"generation":{"primary":null,"fallback":null}}') ON CONFLICT (key) DO NOTHING @@ -328,7 +328,7 @@ func TruncateAll(t *testing.T) { DB.Exec(` INSERT INTO global_settings (key, value) VALUES ('registration', '{"enabled": true}'::jsonb), - ('site', '{"name": "Chat Switchboard", "tagline": "Multi-Model AI Chat"}'::jsonb), + ('site', '{"name": "Switchboard Core", "tagline": "Self-hosted extension platform"}'::jsonb), ('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}'::jsonb), ('model_roles', '{ "utility": { "primary": null, "fallback": null }, diff --git a/server/handlers/admin_email.go b/server/handlers/admin_email.go index 1ecf3f9..ca36bbb 100644 --- a/server/handlers/admin_email.go +++ b/server/handlers/admin_email.go @@ -53,7 +53,7 @@ func (h *AdminEmailHandler) TestEmail(c *gin.Context) { } // Get instance name - instanceName := "Chat Switchboard" + instanceName := "Switchboard Core" if branding, err := h.stores.GlobalConfig.Get(context.Background(), "branding"); err == nil { if name, ok := branding["instance_name"].(string); ok && name != "" { instanceName = name @@ -64,7 +64,7 @@ func (h *AdminEmailHandler) TestEmail(c *gin.Context) { htmlBody := `

` + instanceName + `

-

This is a test email from your Chat Switchboard instance.

+

This is a test email from your Switchboard Core instance.

If you received this, your SMTP configuration is working correctly.

` textBody := instanceName + " — Test Email\n\nThis is a test email. Your SMTP configuration is working correctly." diff --git a/server/logging/logger.go b/server/logging/logger.go index c136246..619a2a7 100644 --- a/server/logging/logger.go +++ b/server/logging/logger.go @@ -1,5 +1,5 @@ // Package logging provides structured logging configuration for -// Chat Switchboard using the standard library's log/slog package. +// Switchboard Core using the standard library's log/slog package. // Configured via LOG_FORMAT ("text"|"json") and LOG_LEVEL env vars. package logging diff --git a/server/main.go b/server/main.go index 795184e..89b9841 100644 --- a/server/main.go +++ b/server/main.go @@ -109,21 +109,6 @@ func main() { // v0.33.0: Start Prometheus DB pool collector metrics.StartDBCollector(database.DB, 15*time.Second) - // Kernel maintenance: prune stale data every 6 hours - go func() { - ticker := time.NewTicker(6 * time.Hour) - defer ticker.Stop() - for range ticker.C { - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - if n, err := stores.Health.Prune(ctx, time.Now().UTC().Add(-7*24*time.Hour)); err != nil { - log.Printf("⚠ maintenance prune failed: %v", err) - } else if n > 0 { - log.Printf("🧹 maintenance: pruned %d stale rows", n) - } - cancel() - } - }() - // Bootstrap admin from env (K8s secret) — upserts on every restart handlers.BootstrapAdmin(cfg, stores, uekCache) diff --git a/server/metrics/metrics.go b/server/metrics/metrics.go index a560218..5727d85 100644 --- a/server/metrics/metrics.go +++ b/server/metrics/metrics.go @@ -1,4 +1,4 @@ -// Package metrics defines all Prometheus metrics for Chat Switchboard. +// Package metrics defines all Prometheus metrics for Switchboard Core. // All metrics use the "switchboard_" prefix. Registered via promauto // so they are available on the default registry's /metrics endpoint. package metrics diff --git a/server/notifications/service.go b/server/notifications/service.go index a5e587d..1fa12b2 100644 --- a/server/notifications/service.go +++ b/server/notifications/service.go @@ -53,7 +53,7 @@ func NewService(s store.NotificationStore, hub *events.Hub) *Service { return &Service{ store: s, hub: hub, - instanceName: "Chat Switchboard", + instanceName: "Switchboard Core", retentionDays: 90, stopCleanup: make(chan struct{}), } diff --git a/server/notifications/templates.go b/server/notifications/templates.go index bcd07b8..2b2d104 100644 --- a/server/notifications/templates.go +++ b/server/notifications/templates.go @@ -54,7 +54,7 @@ Adjust your notification preferences in Settings. // RenderHTML renders an HTML email body for a notification. func RenderHTML(n *models.Notification, instanceName string) string { if instanceName == "" { - instanceName = "Chat Switchboard" + instanceName = "Switchboard Core" } data := emailData{ Title: n.Title, @@ -73,7 +73,7 @@ func RenderHTML(n *models.Notification, instanceName string) string { // RenderText renders a plaintext email body for a notification. func RenderText(n *models.Notification, instanceName string) string { if instanceName == "" { - instanceName = "Chat Switchboard" + instanceName = "Switchboard Core" } data := emailData{ Title: n.Title, @@ -92,7 +92,7 @@ func RenderText(n *models.Notification, instanceName string) string { // SubjectForNotification returns an email subject line. func SubjectForNotification(n *models.Notification, instanceName string) string { if instanceName == "" { - instanceName = "Chat Switchboard" + instanceName = "Switchboard Core" } prefix := "[" + instanceName + "] " switch { diff --git a/server/notifications/templates_test.go b/server/notifications/templates_test.go index 0d277ef..7c4adba 100644 --- a/server/notifications/templates_test.go +++ b/server/notifications/templates_test.go @@ -28,7 +28,7 @@ func TestRenderHTML_Basic(t *testing.T) { func TestRenderHTML_DefaultInstanceName(t *testing.T) { n := &models.Notification{Title: "Test"} html := RenderHTML(n, "") - if !strings.Contains(html, "Chat Switchboard") { + if !strings.Contains(html, "Switchboard Core") { t.Error("expected default instance name") } } diff --git a/server/pages/pages.go b/server/pages/pages.go index bdbf7dc..fa332df 100644 --- a/server/pages/pages.go +++ b/server/pages/pages.go @@ -840,7 +840,7 @@ func (e *Engine) loadFooter() FooterConfig { // loadBranding reads instance branding from global settings. func (e *Engine) loadBranding() (name, logoURL, tagline string) { - name = "Chat Switchboard" // default + name = "Switchboard Core" // default if e.stores.GlobalConfig == nil { return } diff --git a/server/pages/templates/base.html b/server/pages/templates/base.html index b808b4c..09deba1 100644 --- a/server/pages/templates/base.html +++ b/server/pages/templates/base.html @@ -4,7 +4,7 @@ - {{block "title" .}}Chat Switchboard{{end}} + {{block "title" .}}Switchboard Core{{end}} {{/* Decomposed from monolithic styles.css (v0.22.9) */}} diff --git a/server/pages/templates/login.html b/server/pages/templates/login.html index a1d826d..cfe72ae 100644 --- a/server/pages/templates/login.html +++ b/server/pages/templates/login.html @@ -4,7 +4,7 @@ - Chat Switchboard + Switchboard Core diff --git a/server/static/swagger.html b/server/static/swagger.html index 7f4d820..1556b74 100644 --- a/server/static/swagger.html +++ b/server/static/swagger.html @@ -4,7 +4,7 @@ - Chat Switchboard — API Docs + Switchboard Core — API Docs