rebrand + purge orphaned frontend: Chat Switchboard → Switchboard Core
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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:
|
||||
//
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 := `<!DOCTYPE html>
|
||||
<html><body style="font-family: sans-serif; padding: 20px;">
|
||||
<h2 style="color: #4a8af4;">` + instanceName + `</h2>
|
||||
<p>This is a test email from your Chat Switchboard instance.</p>
|
||||
<p>This is a test email from your Switchboard Core instance.</p>
|
||||
<p>If you received this, your SMTP configuration is working correctly.</p>
|
||||
</body></html>`
|
||||
textBody := instanceName + " — Test Email\n\nThis is a test email. Your SMTP configuration is working correctly."
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{}),
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content">
|
||||
<title>{{block "title" .}}Chat Switchboard{{end}}</title>
|
||||
<title>{{block "title" .}}Switchboard Core{{end}}</title>
|
||||
<link rel="icon" type="image/svg+xml" href="{{.BasePath}}/favicon.svg?v={{.Version}}">
|
||||
<link rel="icon" type="image/x-icon" href="{{.BasePath}}/favicon.ico?v={{.Version}}">
|
||||
{{/* Decomposed from monolithic styles.css (v0.22.9) */}}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Chat Switchboard</title>
|
||||
<title>Switchboard Core</title>
|
||||
<link rel="icon" type="image/svg+xml" href="{{.BasePath}}/favicon.svg?v={{.Version}}">
|
||||
<link rel="icon" type="image/x-icon" href="{{.BasePath}}/favicon.ico?v={{.Version}}">
|
||||
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<title>Chat Switchboard — API Docs</title>
|
||||
<title>Switchboard Core — API Docs</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" />
|
||||
<style>
|
||||
/* ── Palette — WCAG AA 4.5:1 minimum contrast ────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user