Config Panel UI Design Specification

Architecture Reference: For backend config system architecture, see docs/architecture/config-system.md

Purpose

This document specifies the UI/UX design for the QNTX configuration panel. It defines the visual layout, interaction model, and future product vision for how users interact with configuration in the web UI.

Current Issues

  1. Size Constraint: Panel is cramped at max-height: 500px
  2. Layout Problem: Overlays content, competes for space with ATS editor
  3. Poor Readability: Long config values (API keys, tokens) are truncated
  4. No Visual Hierarchy: Flat list doesn't show config precedence clearly
  5. Mixed Concerns: Shows everything together, hard to distinguish editable vs read-only

Design Goals

Layout

Information Architecture

Group by source: Collapsible sections for each config source (see config-system.md for precedence details):

Visual precedence: Make it clear which value is effective

Interaction Model

Visual Design

Technical Implementation

Files to Modify

  1. web/ts/config-panel.js

  2. web/css/config-panel.css

  3. web/index.html (if needed)

Data Flow

// Current:
GET /api/config?introspection=true
→ Flat list of settings with sources

// Enhanced (future):
GET /api/config?introspection=true
→ Grouped by source
→ Each setting knows: key, value, source, is_effective, overridden_by

Backend Support

Backend implementation is documented in docs/architecture/config-system.md.

Current backend capabilities:

UI Mockup (Text-Based)

┌─────────────────────────────────────┐
│ ≡ Configuration            [✕ Close]│
├─────────────────────────────────────┤
│ 🔍 [Filter settings...]             │
├─────────────────────────────────────┤
│                                     │
│ ▼ System Config                     │
│   (Read-only, /etc/qntx/config.toml)│
│   ┌─────────────────────────────┐   │
│   │ database.path               │   │
│   │ /var/lib/qntx/qntx.db       │   │
│   │ [system]                    │   │
│   └─────────────────────────────┘   │
│                                     │
│ ▼ User Config                       │
│   (Read-only, ~/.qntx/config.toml)  │
│   ┌─────────────────────────────┐   │
│   │ openrouter.api_key          │   │
│   │ sk-or-v1-9bee...            │   │
│   │ [user] ⚠ Overridden by env  │   │
│   └─────────────────────────────┘   │
│                                     │
│ ▼ UI Config (Editable)              │
│   (Managed by UI, ~/.qntx/config... │
│   ┌─────────────────────────────┐   │
│   │ local_inference.enabled     │   │
│   │ [✓] true            [Edit]  │   │
│   │ [user_ui] ✅ Active         │   │
│   └─────────────────────────────┘   │
│   ┌─────────────────────────────┐   │
│   │ local_inference.model       │   │
│   │ mistral          [▼ Edit]   │   │
│   │ [user_ui] ✅ Active         │   │
│   └─────────────────────────────┘   │
│                                     │
│ ▼ Project Config                    │
│   (Read-only, project/config.toml)  │
│   (No settings - project config     │
│    would override UI settings)      │
│                                     │
│ ▼ Environment Variables             │
│   ┌─────────────────────────────┐   │
│   │ openrouter.api_key          │   │
│   │ sk-or-v1-bb5b...            │   │
│   │ [environment] ✅ Active     │   │
│   └─────────────────────────────┘   │
│                                     │
└─────────────────────────────────────┘

Behavior Specifications

Opening Config Panel

  1. Click ≡ in symbol palette
  2. Left panel (#left-panel) fades out and hides
  3. Config panel slides in from left, taking 50% width
  4. ATS editor completely hidden (no competing for space)

Closing Config Panel

  1. Click ✕ or click outside panel
  2. Config panel slides out to left
  3. Left panel fades back in
  4. ATS editor visible again

Editing UI Config Values

  1. Only UI Config section allows editing
  2. Click [Edit] button or value to enter edit mode
  3. For booleans: toggle switch
  4. For strings: inline text input
  5. For enums (like model): dropdown
  6. Changes auto-save to ~/.qntx/config_from_ui.toml
  7. Show toast: "Saved to UI config"

Source Precedence Display

Implementation Phases

Phase 1: Layout Restructure ✅ (Completed)

Phase 2: Source Grouping ✅ (Completed)

Phase 3: Precedence Visualization (In Progress)

Phase 4: Inline Editing (Planned)

Phase 5: Polish ✅ (Completed)

Future Enhancements

For discussion of potential future enhancements including multi-provider configuration support, see Issue #205.

Current Design Principles

The config panel's current job is to visualize the dataflow from our 5 configuration sources:

  1. Show final merged state (what server sees)
  2. Attribute each value to its provider (source visibility)
  3. Indicate override relationships (precedence chain)

Current implementation shows:

openrouter.api_key = sk-***           [ENV] ✓
  ⚠ overrides [USER]

database.path = /var/lib/qntx/...     [PROJECT] ✓
  ⚠ overrides [SYSTEM]

pulse.daily_budget_usd = 10.0         [USER_UI] ✓
  (no overrides)

Config Dataflow Visualization (Current)

Enhanced UX Features (Future)

Documentation Integration (See Issue #207)

Concept: Config panel with integrated documentation viewer

Interaction Flow:

  1. User clicks config key (e.g., openrouter.model)
  2. Right side slides in with documentation for that specific config option
  3. Documentation drawer shows:

Example Documentation Entry:

┌─────────────────────────────────────────────────────────────┐
│ openrouter.model                                            │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│ Description:                                                │
│   Specifies which AI model to use for OpenRouter           │
│   inference calls. Affects cost, speed, and quality.       │
│                                                             │
│ Type: string                                                │
│                                                             │
│ Valid Values:                                               │
│   • anthropic/claude-haiku-4    (fast, cheap)              │
│   • anthropic/claude-3.5-sonnet:beta (balanced)            │
│   • x-ai/grok-code-fast-1       (code-focused)             │
│   • meta-llama/llama-3.2-3b-instruct (very fast)           │
│                                                             │
│ Default: anthropic/claude-haiku-4.5                         │
│                                                             │
│ Examples:                                                   │
│   For code generation:  x-ai/grok-code-fast-1              │
│   For reasoning tasks:  anthropic/claude-3.5-sonnet:beta   │
│   For bulk operations:  meta-llama/llama-3.2-3b-instruct   │
│                                                             │
│ Related Settings:                                           │
│   • openrouter.api_key - Required for OpenRouter access    │
│   • local_inference.enabled - Alternative to cloud         │
│                                                             │
│ Cost Impact: Varies by model (see OpenRouter pricing)      │
│                                                             │
│ [View OpenRouter Models →]                                  │
└─────────────────────────────────────────────────────────────┘

Implementation Considerations:

Symbol Integration:

Related Documentation