Account settings live at autoblocks.run/settings. Here you view your profile, switch theme, manage notification preferences, read your in-app inbox, and sign out.
UI: apps/product-web/src/features/settings/settings-panel.tsx. API: apps/api/src/modules/auth/routes.ts, apps/api/src/modules/notifications/routes.ts.
Settings sections
| Section | What you control |
|---|---|
| Account | Display name and email (read-only in Phase 1 UI) |
| Appearance | Light / dark theme toggle |
| Notifications | Email on failure, email on complete, in-app enabled |
| In-app inbox | Recent notifications; mark read |
| Sign out | End session |
Account profile
| Field | Source | Editable in UI |
|---|---|---|
| Name | displayName from session | Display only (Phase 1) |
| Auth user record | Display only (Phase 1) | |
| Workspace | tenantId from session | Automatic on signup |
Session endpoint: GET /auth/session (requires login).
sequenceDiagram
participant You
participant Settings
participant API
You->>Settings: Open /settings
Settings->>API: GET /auth/session
API-->>Settings: user + tenantId
Settings->>API: GET /tenants/:id/notification-preferences
API-->>Settings: preferences
Settings-->>You: Render panels
Appearance
Theme preference is stored locally in your browser via the theme controller (apps/product-web/src/components/theme-controller.tsx).
| Mode | Behavior |
|---|---|
| Light | Default calm palette |
| Dark | Reduced glare for evening use |
Tap Theme: Light/Dark to toggle. Does not sync across devices in Phase 1.
Notification preferences
| Toggle | API field | Recommended |
|---|---|---|
| Email when a run fails | emailOnFailure | On (default) |
| Email when a run completes | emailOnRoutineComplete | Off unless you want every success email |
| In-app notifications | inAppEnabled | On (default) |
Changes save via PATCH /tenants/:tenantId/notification-preferences.
Email delivery uses Resend in production (RESEND_API_KEY, RESEND_FROM_EMAIL in render.yaml).
In-app inbox
When in-app notifications are enabled, the inbox section on Settings lists recent items.
| Action | API |
|---|---|
| List | GET /tenants/:tenantId/notifications |
| Mark read | PATCH /tenants/:tenantId/notifications/:notificationId/read |
Component: apps/product-web/src/features/notifications/in-app-inbox.tsx.
Sign out
| Step | Result |
|---|---|
| Tap Sign out on Settings | POST /auth/sign-out |
| Session cookie cleared | Redirect to login |
Sign out from the dashboard nav area on mobile via Settings.
Auth routes reference
| Method | Path | Purpose |
|---|---|---|
| POST | /auth/sign-up | Register + create tenant |
| POST | /auth/sign-in | Login |
| POST | /auth/sign-out | Logout |
| GET | /auth/session | Current session |
Product forms: apps/product-web/src/features/auth/auth-form.tsx.
Billing vs settings
| Concern | Route |
|---|---|
| Plan, trial, usage, checkout | /billing |
| Profile, theme, notifications | /settings |
Do not expect plan changes under Settings — use Billing and plans.
Security practices
| Practice | Why |
|---|---|
| Sign out on shared devices | Session cookie grants full access |
| Keep webhook URLs private | Path token is a secret |
| Review notification emails | Confirms unexpected failures quickly |