Commit 02e1a5b
committed
feat: Phase 1 — cancel button, UI overhaul, test fixes
Backend:
- Add POST /api/cancel endpoint that cancels the running agent prompt
- Use atomic.Value to store/clear the cancel function per prompt
- Cancel propagates through the agent loop (LLM HTTP request aborted, context canceled)
Frontend:
- Cancel button in topbar (appears when busy, red X + pulse animation)
- Floating scroll-to-bottom button (appears when scrolled up)
- Message fade-in animation (opacity + translateY)
- Collapsible long messages (auto-collapse at 500px, Show more/less toggle)
- Copy button on message hover (clipboard API, Copied feedback)
- Visual differentiation (colored left borders, sender dots, accent tints)
- Loading skeleton (pulsing shimmer bars while WebSocket connects)
- Mobile responsive (slide-in sidebar with hamburger, overlay, single-column)
Tests:
- 5 new cancel tests (GET 405, POST 204, idle noop, WS cancel, E2E mock LLM)
- New mockLLM helper that auto-handles GET /models discovery call
- Fix 3 previously-failing E2E tests (callCount off-by-one from discovery)
- All 15 serve tests pass (excluding pre-existing Docker/Learn failures)1 parent 3d74ec3 commit 02e1a5b
3 files changed
Lines changed: 575 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
399 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
400 | 415 | | |
401 | 416 | | |
402 | 417 | | |
| |||
687 | 702 | | |
688 | 703 | | |
689 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
690 | 722 | | |
691 | 723 | | |
692 | 724 | | |
| |||
0 commit comments