Commit Graph
5 Commits
Author SHA1 Message Date
Brandon Zhang fa9d5c61c9 docs(agents): note that git commands require --no-pager to avoid terminal hang
git may invoke less as a pager which blocks the terminal waiting for
user interaction.  Always use 'git --no-pager <command>' or pipe
through Out-String/Format-List in PowerShell sessions.
2026-03-27 14:00:12 +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 056ae70e9a feat(mcp): add periodic SSE keepalive notifications during queue wait
When the tool is waiting for an instruction, send ctx.info() log
notifications to the client every KEEPALIVE_INTERVAL_SECONDS (default 20).
Purpose
-------
These notifications write bytes to the SSE stream, resetting any
transport-level HTTP read timeout on the client side (e.g. httpx
Timeout(read=N)).  This prevents premature connection drops when
wait periods exceed the client's inactivity window.
Caveat
------
Application-level wall-clock timers (anyio.fail_after / JS SDK
equivalents) are NOT affected by SSE events -- they count from
request start regardless.  This is confirmed by experiments in
tests/test_keepalive.py and tests/run_keepalive_experiments.py.
Experiment results (summarised in tests/run_keepalive_experiments.py)
----------------------------------------------------------------------
- Exp 1: anyio.fail_after(5s) fires at 5.98s with NO keepalives.
- Exp 2: anyio.fail_after(10s) fires at 10.90s WITH keepalives every 2s.
         Keepalives have ZERO effect on app-level timers.
- Exp 3b: httpx read=8s, keepalive=2s -> SUCCESS at 51s.
          Keepalives DO prevent transport-level read timeouts.
The Copilot extension 60s limit is almost certainly application-level
(hardcoded wall-clock), so default_wait_seconds=50 remains the correct
mitigation (returns before the 60s deadline).  The keepalives provide
defence-in-depth against any proxy/NAT inactivity drops.
2026-03-27 13:54:52 +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