Brandon Zhang
|
298ad54b5c
|
fix(ui/theme): replace light theme with clean material design palette
The previous light theme used warm/organic off-whites and muted tones
that felt muddy. Replaced with a crisp material-inspired palette:
Surfaces
- bg-void #f0f2f5 (cool-grey base)
- bg-base #f5f7fa (very light cool background)
- bg-raised #ffffff (pure white cards)
- bg-hover #e3e8f0 (clear interactive hover)
Typography
- text-primary #1a202c (near-black, high contrast)
- text-secondary #4a5568 (balanced mid-grey)
- text-muted #8896a7 (clear but soft)
Accents (Material Design colour values)
- cyan #0277bd Blue 700 (replaces washed-out #007fa8)
- green #388e3c Green 700
- amber #e65100 Deep Orange 900 (warmer, more material)
- red #d32f2f Red 700
Shadows
Dual-layer transparent shadows for better depth perception on light
backgrounds.
Also adds @keyframes fade-in-up used by the shortcuts add form.
|
2026-03-27 13:55:36 +08:00 |
|
Brandon Zhang
|
93bce1521b
|
feat(ui): add quick shortcuts panel with add/edit/delete support
Adds a compact shortcuts row inside the composer panel for one-click
instruction queuing, with full lifecycle management stored in localStorage.
Features
--------
- Six built-in defaults (Stop, Summarize, Explain error, Undo, Continue, etc.)
- Click any chip → instantly POSTs to /api/instructions, no typing required
- Cyan border pulse on fire; green glow flash on success
- Edit mode (toggle button in header):
- Per-chip edit (✏) button → replaces chip with inline input, Enter to save
- Per-chip delete (✕) button → removes with vanish animation
- '+ Add' chip → inline form appended below rail
- All changes persisted to localStorage key 'local-mcp-shortcuts'
- Accessible: button elements, aria-labels, keyboard support (Enter/Escape)
Files
-----
- static/js/shortcuts.js new module (loadShortcuts, renderShortcuts,
startInlineEdit, showAddPrompt, initShortcuts)
- static/index.html #shortcuts-container inside composer .panel-body
- static/js/app.js import + initShortcuts() in bootstrap()
- static/css/components.css .shortcuts-container, .shortcut-chip variants,
.shortcut-inline-edit, keyframes chip-fire/sent/vanish
|
2026-03-27 13:55:22 +08:00 |
|
|
|
009fd039a2
|
feat: optional Bearer-token authentication via API_TOKEN env var
Disabled by default (empty API_TOKEN). When set:
- All /api/* and /mcp requests require: Authorization: Bearer <token>
- Public exemptions: /, /healthz, /static/*, /auth-check
- Web UI: pre-flight /auth-check on load; shows token modal if required
- Token stored in sessionStorage, sent on every API request
- Mid-session 401s re-trigger the token modal
- MCP clients must pass the header: Authorization: Bearer <token>
Files changed:
- app/config.py: api_token field + API_TOKEN env var
- app/api/auth.py: Starlette BaseHTTPMiddleware for token enforcement
- main.py: register middleware + /auth-check public endpoint
- static/js/api.js: token storage, auth header, 401 handler hook
- static/js/app.js: auth pre-flight, showTokenModal(), bootstrap()
- static/css/components.css: .auth-overlay / .auth-card styles
- README.md: API_TOKEN env var docs + MCP client header example
|
2026-03-27 04:28:12 +08:00 |
|