feat(api): add terminal session persistence with Prisma model and CRUD #517

Merged
jason.woltje merged 1 commits from feat/ms19-terminal-persistence-v2 into main 2026-02-26 02:49:32 +00:00
Owner

Summary

  • Add TerminalSession Prisma model with TerminalSessionStatus enum (ACTIVE/CLOSED)
  • Add manual migration SQL for terminal_sessions table
  • Add TerminalSessionService with CRUD: create, findByWorkspace, close, findById
  • Add terminal-session.dto.ts with class-validator decorators
  • Update TerminalModule to register and export TerminalSessionService
  • 12 new unit tests for all CRUD operations

Test plan

  • 12 unit tests for TerminalSessionService
  • 48 existing terminal gateway/service tests still pass (60 total)
  • TypeScript typecheck clean
  • Lint clean

Relates to #508

## Summary - Add TerminalSession Prisma model with TerminalSessionStatus enum (ACTIVE/CLOSED) - Add manual migration SQL for terminal_sessions table - Add TerminalSessionService with CRUD: create, findByWorkspace, close, findById - Add terminal-session.dto.ts with class-validator decorators - Update TerminalModule to register and export TerminalSessionService - 12 new unit tests for all CRUD operations ## Test plan - [x] 12 unit tests for TerminalSessionService - [x] 48 existing terminal gateway/service tests still pass (60 total) - [x] TypeScript typecheck clean - [x] Lint clean Relates to #508
jason.woltje added the databaseapiapidatabase labels 2026-02-26 02:49:23 +00:00
jason.woltje added 1 commit 2026-02-26 02:49:24 +00:00
feat(api): add terminal session persistence with Prisma model and CRUD service
Some checks failed
ci/woodpecker/push/api Pipeline failed
12d3f6ea35
Adds database-backed TerminalSession model with ACTIVE/CLOSED status enum,
migration SQL, TerminalSessionService (create/findByWorkspace/close/findById),
DTO file with class-validator decorators, unit tests (12 tests), and module
registration. Workspace relation and indexed columns enable efficient session
listing and recovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 8128eb7fbe into main 2026-02-26 02:49:32 +00:00
jason.woltje deleted branch feat/ms19-terminal-persistence-v2 2026-02-26 02:49:33 +00:00
Sign in to join this conversation.