Brandon Zhang
9e2932fbc3
Use styled modal dialogs for confirmations
2026-03-27 18:51:34 +08:00
Brandon Zhang
920376449a
Hide the settings panel for now
2026-03-27 18:38:36 +08:00
Brandon Zhang
b0c24e10c8
Restore global instruction numbering
2026-03-27 18:38:28 +08:00
Brandon Zhang
c690d0c483
Hardcode agent stale timeout
2026-03-27 18:32:25 +08:00
Brandon Zhang
07e31ce215
Fix consumed instruction ordering and clear history
2026-03-27 18:32:18 +08:00
Brandon Zhang
27592f2750
Stop updating removed header badges
2026-03-27 18:21:47 +08:00
Brandon Zhang
18352a99d5
Show server type in the web UI
2026-03-27 18:19:26 +08:00
Brandon Zhang
7a8dd14bd3
Show server version in logs and UI
2026-03-27 18:16:30 +08:00
Brandon Zhang
65b29bcf03
Improve SSE status and event auth handling
2026-03-27 17:55:28 +08:00
Brandon Zhang
4db402f258
feat: hardcode wait time and default response as constants
...
Changes:
- Add DEFAULT_WAIT_SECONDS = 50 (replaces config.default_wait_seconds)
- Add DEFAULT_EMPTY_RESPONSE = 'call this tool... ' (replaces config.default_empty_response)
- Remove wait and empty response fields from WebUI Settings panel
(only agent_stale_after_seconds remains configurable)
Rationale:
These values are fundamental to the 60s timeout mitigation strategy and
should not be user-configurable. The 50s wait with 5s keepalives is the
optimal balance for staying under the Copilot 60s wall-clock limit while
providing responsive progress feedback.
2026-03-27 15:45:06 +08:00
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
Brandon Zhang
b1fdd98740
fix(script): add Windows .venv/Scripts path fallback in server.sh
...
On Windows the venv Python binary lives at .venv/Scripts/python.exe,
not .venv/bin/python. Fall back to the Windows path when the Unix
path does not exist so the script works cross-platform.
2026-03-27 13:53:38 +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
7de4a03d94
fix: Enter key confirms edit (Shift+Enter for newline)
...
Edit textarea now mirrors composer behavior:
- Enter alone → save the edit
- Shift+Enter → insert newline
- Escape → cancel edit
2026-03-27 04:17:57 +08:00
256a445e2f
feat: add Clear History button to delete all consumed instructions
...
- Backend: instruction_service.clear_consumed() bulk-deletes consumed rows
- Backend: DELETE /api/instructions/consumed route (preserves pending)
- Frontend: Clear button in consumed panel header (hidden when empty)
- Frontend: SSE handler for history.cleared event - instant UI update
- Frontend: api.clearConsumed() fetch wrapper
2026-03-27 04:16:24 +08:00
86eba27a24
init
2026-03-27 03:58:57 +08:00