Add session eject feature and terminal UX improvements

- Add eject button for tmux sessions (keeps tmux running, removes from Spiceflow)
- Add refresh button to session settings for all providers
- Improve terminal controls: larger buttons, more zoom levels (50-150%), copy selection, paste clipboard, enter key
- Fix session navigation: properly reload when switching between sessions
- Update tmux screen presets to larger dimensions (fullscreen 260x48, desktop 120x48, landscape 80x24)
- Add testing documentation to CLAUDE.md
- Refactor E2E tests to use API-based cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 23:37:06 -05:00
parent 3d121c2e08
commit 5171059692
10 changed files with 448 additions and 131 deletions
+53
View File
@@ -123,6 +123,59 @@ Environment variables or `server/resources/config.edn`:
| `CLAUDE_SESSIONS_DIR` | ~/.claude/projects | Claude sessions |
| `OPENCODE_CMD` | opencode | OpenCode binary |
## Testing Changes
Always test changes before considering them complete. Choose the appropriate testing method:
### 1. E2E Tests (Playwright)
For UI changes, user flows, and integration between frontend/backend:
```bash
cd e2e && npm test # Run all E2E tests
cd e2e && npm run test:headed # Visible browser for debugging
cd e2e && npm test -- -g "test name" # Run specific test
```
### 2. Unit Tests (Clojure)
For backend logic, pure functions, and isolated components:
```bash
cd server && clj -M:test # Run all unit tests
```
### 3. REPL Testing
For quick one-off validation of Clojure code during development:
```clojure
;; In REPL (clj -M:dev, then (go))
(require '[spiceflow.some-ns :as ns])
(ns/some-function arg1 arg2) ; Test function directly
```
### 4. Manual API Testing
For testing HTTP endpoints directly:
```bash
# Health check
curl http://localhost:3000/api/health
# List sessions
curl http://localhost:3000/api/sessions
# Create session
curl -X POST http://localhost:3000/api/sessions \
-H "Content-Type: application/json" \
-d '{"provider": "claude"}'
# Get session
curl http://localhost:3000/api/sessions/:id
```
### When to Use Each
| Change Type | Recommended Testing |
|-------------|---------------------|
| UI component | E2E tests |
| API endpoint | Manual API + unit tests |
| Business logic | Unit tests + REPL |
| User flow | E2E tests |
| Bug fix | Add regression test + manual verify |
## Subdirectory CLAUDE.md Files
Each directory has specific details: