# Changelog ## [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 `