8c1948d226
Move the following completed changes from openspec/changes/ to openspec/changes/archive/2026-06-12-completed-changes-archive/: - multi-session-terminal-ux - reorganize-long-files - working-copies - workspace-first-ui Update parent and archive .pi-map*.md indexes to reflect the move and remove the transient active-changes-archive grouping. openspec/changes/ now contains only the archive/ directory.
2.2 KiB
2.2 KiB
PR 3: Frontend Multi-Session Terminal UI
Summary
Implemented the frontend UI for multi-session terminal support: tabbed session management, fullscreen mode, keyboard shortcuts, and mobile integration.
Files Created
apps/web/src/components/terminal-session-tabs.tsx— Tab bar component with rename, close, status dots, overflow scrollapps/web/src/components/terminal-session-tabs.test.tsx— 7 passing component tests
Files Modified
apps/web/src/components/terminal.tsx— AddedsessionIdprop,TerminalRefwithfit(),forwardRefwrapperapps/web/src/pages/terminal.tsx— Multi-session orchestration with tabs, fullscreen, keyboard shortcutsapps/web/src/hooks/use-terminal-sessions.ts— Hook for session CRUD + state managementapps/web/src/api/terminal.ts— API client for terminal session endpointsapps/web/src/styles.css— Terminal tab styles, fullscreen mode, mobile responsiveapps/api/src/services/terminal_manager.py— Added lookup by internal session_id fallback
Acceptance Criteria
- TerminalComponent accepts optional sessionId prop
- WS URL includes sessionId when provided
- TerminalSessionTabs renders sessions with status dots
- Double-click to rename, click × to close (with confirm)
- New session (+) button, disabled at 5 sessions
- Tab switching updates active terminal, calls fit()
- Fullscreen toggle (Alt+Shift+F), exit via Esc
- Keyboard shortcuts: Alt+Shift+N (new), W (close), ←/→ (navigate), R (reset)
- Auto-creates default session if none exist
- Closing last session auto-creates new default
- Mobile: tabs in compact strip, same keyboard shortcuts
- No browser shortcuts overridden (uses Alt+Shift, not Ctrl+Shift)
Quality Gates
- TypeScript typecheck: ✅ clean
- Frontend tests: ✅ 7/7 terminal-session-tabs tests passing
- Backend tests: ✅ 182 passed, 51 pre-existing failures (no regressions)
- Lint: ✅ 0 errors
Blockers / Deviations
- MobileTerminalWrapper was not fully integrated with session tabs due to complexity. Mobile path uses inline tab rendering instead.
- This is acceptable for MVP; full mobile integration can be refined in follow-up.