# Changelog ## [0.37.7] — 2026-03-21 ### Summary Scorched earth: all legacy admin JS removed. Team Admin becomes a standalone surface. Settings bridge sections replaced with native Preact components. Chat surface stripped of all admin/settings script dependencies. 16 legacy JS files deleted (~5,400+ lines). ### New - **Team Admin surface** (`src/js/sw/surfaces/team-admin/`) — standalone at `/team-admin`, 10 native Preact sections: - `TeamAdminSurface` — root with team picker (multi-team admins), tab sidebar nav, lazy `import()` per section - `MembersSection` — list, add, change role, remove via `sw.api.teams.members/addMember/updateMember/removeMember` - `ProvidersSection` — CRUD provider configs, card layout, model sync - `PersonasSection` — CRUD personas with KB bindings - `KnowledgeSection` — read-only team KB list - `GroupsSection` — read-only team groups list - `WorkflowsSection` — full CRUD + publish, stage viewer - `TasksSection` — CRUD + run/kill, schedule display - `SettingsSection` — team name/description form - `UsageSection` — stat cards + usage-by-day table - `ActivitySection` — paginated audit log with filters - **7 native settings sections** (replace all bridge sections): - `WorkflowsSection` — user's visible workflows (read-only) - `TasksSection` — user tasks with run/stop actions - `GitKeysSection` — SSH credential management - `DataSection` — data export + account deletion (danger zone) - `KnowledgeSection` — personal KB CRUD with document upload - `MemorySection` — memory list with inline edit, status badges - `NotificationsSection` — toggle-based notification preferences - **SDK additions** (`api-domains.js`): - `teams.workflows/createWorkflow/getWorkflow/updateWorkflow/ deleteWorkflow/publishWorkflow` — team-scoped workflow CRUD - `teams.tasks/createTask/updateTask/deleteTask/runTask/killTask` — team-scoped task CRUD - `teams.knowledgeBases` — team KB list - `teams.update` — team settings update - `teams.updatePersona` — team persona update - `git.credentials.list/create/del` — git SSH credentials - `dataPortability.exportMe/deleteAccount` — data portability - **Go template** — `server/pages/templates/surfaces/team-admin.html` (Preact mount + vendor boot, no legacy modals) - **Surface registration** — `team-admin` surface registered in `pages.go`, `loaders.go`, `base.html` template dispatch, `nginx.conf` proxy rule ### Changed - `server/version.go` — `0.37.6` → `0.37.7` - `VERSION` — `0.37.6` → `0.37.7` - `settings/index.js` — removed `BridgeSection` import, emptied `bridgeSections` object, added 7 native section modules to `sectionModules`, removed bridge rendering ternary, added Knowledge Bases / Memory / Notifications / Data & Privacy to `NAV_ITEMS` - `chat.js` — menu handlers navigate to `/admin/users`, `/team-admin/members`, `/settings/general` instead of opening modals. Removed `UI.initAppearance()` call (was in deleted settings-handlers). - `app.js` — removed `_initSettingsListeners()` and `_initAdminListeners()` calls - `chat.html` — stripped 5 legacy admin script tags (`ui-settings.js`, `ui-admin.js`, `settings-handlers.js`, `admin-handlers.js`, `workflow-admin.js`) + `memory-ui.js`, `persona-kb.js`, `notification-prefs.js`. Removed team admin modal HTML (~110 lines). - `admin.html` — removed 7 legacy modal overlays (~130 lines of HTML): createUserModal, resetPwModal, approveUserModal, createTeamModal, createGroupModal, providerFormModal, personaFormModal - `settings.html` — removed 9 bridge loader script tags, updated docstring to reflect full Preact (no bridges) - `base.html` — added `team-admin` surface template + scripts dispatch - `nginx.conf` — added `/team-admin` proxy rule to Go backend ### Deleted - `ui-admin.js` (1,690 lines) — old admin panel, team admin modal, ADMIN_LOADERS - `ui-settings.js` (867 lines) — team management functions - `admin-handlers.js` (~900 lines) — admin event listeners - `settings-handlers.js` (908 lines) — settings save/load, bridge loaders - `admin-scaffold.js` (367 lines) — old admin DOM scaffolding - `admin-packages.js` — old package management UI - `broadcast-admin.js` — old broadcast admin UI - `task-admin.js` — old task admin UI - `task-settings.js` — old task settings UI - `workflow-admin.js` — old workflow admin builder - `workflow-team-admin.js` — old team workflow builder - `memory-ui.js` — old memory management UI - `notification-prefs.js` — old notification preferences UI - `persona-kb.js` — old persona KB binding UI - `data-portability.js` — old data export/import UI - `git-credentials-ui.js` — old git credentials UI - `bridge-section.js` — settings bridge wrapper (no longer needed) ### Retained (chat surface still uses) - `knowledge-ui.js` — `KnowledgeUI.onChatChanged()` called by chat.js for channel KB popup. Dies in v0.37.10 (chat surface rebuild). - `channel-models.js` — `ChannelModels.*` used by chat.js for @mention autocomplete. Dies in v0.37.10. - `notifications.js` — `Notifications.init()` called by app.js for notification badge/list. Dies in v0.37.10. ## [0.37.5] — 2026-03-21 ### Summary Login + Settings surface rebuild (Phase 3 begins). First surfaces converted from server-rendered Go templates + imperative DOM JS to Preact component trees consuming the v0.37.3 SDK (`sw.api.*`, `sw.auth.*`, `sw.theme.*`). ### New - **Login surface** (`src/js/sw/surfaces/login/`) — 5 Preact components: - `LoginSurface` — root, auth mode switching (builtin/oidc/mtls), OIDC callback hash handler - `Hero` — left panel with branding, feature pills, version display - `LoginForm` — username/password, calls `sw.api.auth.login()` - `RegisterForm` — registration flow with validation, pending approval - `SSOPanel` — OIDC redirect + mTLS continue button - **Settings surface** (`src/js/sw/surfaces/settings/`) — 12 files: - `SettingsSurface` — left nav + section routing via `__SECTION__` - `GeneralSection` — model select, system prompt, max tokens, temperature slider, thinking toggle. Uses `sw.api.models.enabled()` + `sw.api.profile.settings()` - `AppearanceSection` — theme toggle (light/dark/system) via `sw.theme.set()`, UI scale + message font size sliders - `ProfileSection` — avatar (upload/remove), display name, email, password change. Uses `sw.api.profile.*` - `ModelsSection` — searchable model table with visibility toggles. Uses `sw.api.models.enabled()` + `sw.api.models.setPref()` - `TeamsSection` — read-only team membership list via `sw.api.teams.mine()` - `BridgeSection` — thin Preact wrapper for deferred sections that call old JS loaders (Tasks, Git Keys, Workflows, Data & Privacy) - **`sw.toast()`** — imperative toast API on the SDK. Dynamic import from primitives. `sw.emit('toast', { message, variant })` event listener for surface-agnostic toast firing. - **Nav gating** — Personas tab hidden when `allow_user_personas` policy is false. BYOK section (Providers, Roles, Usage) hidden when `allow_user_byok` is false. Fetched from `sw.api.admin.settings.public()`. - **ToastContainer + DialogStack** mounted in settings surface root (not via shell ``, since surfaces render standalone). - **`sw-login.css`** — login-specific styles extracted from inline `