# S3 Settings tab — proposed structure

## Current chaos (5 affordances, 4 different shapes)

```
S1 sidebar (Threads)                S3 header tabs                Input bar
┌──────────────┐                    ┌─────────────────┐           ┌──────────┐
│ Light Remit… │ ←─ 3 quick chips   │ Files│Tasks│…  │           │🎤 🔖  ✏  │ ←─ mic, bookmark, send
│ 4.5⚡          │   (settings)      │ Diff│Term│ P… │           └──────────┘
│ + New Chat   │                    │ (P cut off!)   │
│ thread list  │                    └─────────────────┘
│              │  S3 footer:                         
│              │  Autonomy: Guided  ⚙ ←─ gear
└──────────────┘
```

5 settings affordances: `Light` (theme), `Remit` (budget), `4.5⚡` (model),
`Autonomy` dropdown, `⚙` (full settings). Plus `🔖` (bookmark — content action,
stays in input bar).

---

## Proposed — 1 place, 1 entry point, 6 sections

```
S1 sidebar (Threads)                S3 header tabs                       Input bar
┌──────────────┐                    ┌──────────────────────────┐         ┌──────────┐
│ Light  4.5⚡  │ ←─ 2 quick chips   │ Files│Tasks│Diff│Term│…│Set │        │🎤 🔖  ✏  │ ←─ unchanged
│ (Remit → ⚡) │   (theme + model)   │                       │ ⚙ │      └──────────┘
│ + New Chat   │                    │  (last tab = Settings)  │
│ thread list  │                    │                         │
│              │                    └──────────────────────────┘
│              │
│              │  S3 footer:
│              │  Autonomy: Guided  ←─ moved to Settings tab
│              │  (no more gear icon — redundant)
└──────────────┘
```

**Quick changes in S1** (kept as 1-click shortcuts, not moved to Settings):
- `Light` / `Dark` — theme toggle
- `4.5⚡` — model pill (click → model picker in Settings, but quick-switch from here)

**S3 tabs** (added `Settings` as the rightmost tab):
- `Files` — file editor / preview
- `Tasks` — task progress
- `Diff` — file diff
- `Terminal` — terminal output
- `Preview` — live preview iframe
- `⚙ Settings` — **(NEW)** the proper settings panel

**`🔖` in input bar** — STAYS. It's a content action ("save this message as a
template / favorite"), not an app setting. The name is confusing but the
behavior is right; we'll rename it to "Save" with a tooltip.

---

## Settings tab content (6 sections)

When the operator clicks `⚙ Settings` in the S3 tab bar, the S3 panel content
switches to the settings view. Sections, in order:

### 1. ⚙ General
- **Theme**: Light / Dark / System (radio chips with preview swatch)
- **Accent color**: 6 preset swatches (purple default, blue, green, pink, amber, slate)
- **Compact mode**: off / on (less padding, smaller bubbles)
- **Default landing view**: Chat / Files / Tasks (where the chat opens to)

### 2. 🧠 Model
- **Provider**: Z.AI / Groq / Anthropic (radio chips with status dot)
- **Model**: depends on provider (dropdown showing tier + speed)
  - Z.AI: glm-4.5 / glm-4.5-flash / glm-4.7-flash
  - Groq: llama-3.3-70b / mixtral-8x7b
  - Anthropic: claude-sonnet-4 / claude-haiku-4
- **Temperature**: slider 0–2 (default 0.7)
- **Max tokens**: number input (default 4096)
- **Quick-pick shortcuts** (the existing "4.5⚡" chip is replaced by this)

### 3. 🤖 Autonomy
- **Level** (radio cards with description):
  - **Guided** — "ask me for medium/high risk actions" (default)
  - **Semi-auto** — "do safe stuff, ask for risky"
  - **Full-auto** — "go for it, only stop for irreversible actions"
- **Auto-approve plans** (toggle, default off)
- **Max plan steps** (number input, default 8)

### 4. 💸 Remit & Budget
- **Today's spend**: 1.24 / 5.00 USD (progress bar)
- **Daily limit**: 5.00 USD (number input)
- **Weekly limit**: 25.00 USD (number input)
- **Alert at**: 80% / 90% / 100% (radio)
- **Show spend in header** (toggle)
- **Reset schedule** (display: "Resets in 14h 23m")

### 5. 👤 Account & Sync
- **Email**: admin@freshvibeapps.local (editable)
- **Thread sync**: PocketBase / localStorage / off (radio)
- **Sync status**: ✓ last synced 2m ago (refresh button)
- **Export threads** (button: "Download all as JSON")
- **Clear local data** (button, confirmation)

### 6. ⌨️ Shortcuts
A static list of keyboard shortcuts, each in a row:
- `Enter` — Send message
- `Shift+Enter` — New line
- `Cmd/Ctrl+K` — Quick switcher
- `Cmd/Ctrl+/` — Toggle this Settings tab
- `Cmd/Ctrl+B` — Toggle Threads sidebar
- `Cmd/Ctrl+Shift+B` — Toggle Tools panel
- `Esc` — Close drawer / modal

### 7. ℹ️ About (collapsed by default at the bottom)
- **Version**: v2026.07.27
- **Build**: 2aeeed7
- **Bridge**: 185.249.73.178:3003
- **Documentation**: link to docHub
- **Report issue**: link

---

## Migration / what disappears

- **Removed**: `Remit` quick-chip in S1 (moved to Settings → Remit & Budget)
- **Removed**: `Autonomy` dropdown in S3 footer (moved to Settings → Autonomy)
- **Removed**: `⚙` gear icon in S3 footer (the Settings tab is one click away)
- **Renamed**: `🔖` bookmark in input bar → "Save" with tooltip "Save this message as a template"
- **Kept**: `Light`/`Dark` chip in S1 (1-click theme toggle, not in Settings)
- **Kept**: `4.5⚡` model chip in S1 (1-click model switch, deeper version in Settings)

**Net effect**: 5 scattered affordances → 1 proper Settings tab + 2 quick-toggle chips.

---

## Open questions for the operator

1. **Should the S3 tabs collapse to icons when narrow?** (e.g. 320px is too
   narrow for `Files | Tasks | Diff | Terminal | Preview | Settings` text labels.
   I'd suggest: at < 480px, show icons only with tooltips. The panel itself
   becomes icon-rail-style on narrow widths.)

2. **Should the Settings tab be sticky across threads?** (Right now switching
   threads probably resets the S3 tab. Should "Settings" persist? I think yes
   — operators will want it open while chatting.)

3. **The `🔖` rename — is "Save" too generic?** Alternatives:
   - "Save" with tooltip "Save this message as a template"
   - "Template" (descriptive but less common)
   - "Bookmark" (current name, descriptive but unclear)
   - Keep the icon but no label (just tooltip on hover)

4. **Should the S1 sidebar's `Light` and `4.5⚡` chips also stay in the
   S3 Settings tab? Or only in one place?**
   - Option A: both (1-click in S1, full picker in Settings) — what I drafted
   - Option B: only Settings (cleaner S1, but two clicks to toggle theme)
   - Option C: only S1 (no Settings entry for these — but then why have Settings?)
