Yaojia Wang
cdec19a256
test: T15 integration/E2E (real WS, M2/M4/L3/L5, F5/F6)
...
6 cases against real startServer via ws client:
①bad-origin 401 ②wrong-path destroy ③oversized-frame 1009 ④spawn-fail exit(-1)
— all pass in sandbox; ⑤attach->output ⑥reconnect-replay gated by PTY_AVAILABLE
(auto-skip where posix_spawn is blocked). Orchestrator verified ⑤⑥ sandbox-off:
6/6 pass with real shell — F5/F6 confirmed (replay incl CJK/ANSI intact).
2026-06-17 10:16:14 +02:00
Yaojia Wang
a2897b2e12
feat: T13 session/manager.ts — session table (M3/L1/L2)
...
handleAttach 4 paths (new/alive/exited-L1/not-found); reapIdle uses
now-max(detachedAt,lastOutputAt)>idleTtl (M3); shutdown kills all; injected
onExit removes from table when attached, keeps for L1 replay when detached (L2);
createSession errors propagate (M4). 21 tests; full suite 181 green.
2026-06-16 18:58:14 +02:00
Yaojia Wang
20212dd7f6
feat: T12 session/session.ts — PTY lifecycle (M4/M5/L1/L4)
...
createSession/attachWs/detachWs/writeInput/resize/kill; node-pty spawn (throws
on failure/M4), onData->buffer+forward, onExit->exitedAt+exit+injected onExit;
sendIfOpen guards readyState (M5); detach never kills PTY; write/resize no-op
after exit (L4); detach-then-exit keeps session (L1).
Tests vi.mock node-pty -> mock IPty (no real spawn): 19 tests. Full suite green.
2026-06-16 18:54:15 +02:00
Yaojia Wang
326d3472dd
feat: W1 frontend — index.html, style.css, keybar, main.ts (esbuild entry)
...
- T8 public/index.html — #term/#keybar, loads ./build/main.js (type=module)
- T9 public/style.css — fullscreen term, keybar fixed bottom, hidden >768px
- T10 public/keybar.ts — key→byte map + mountKeybar (13 tests)
- T11 public/main.ts — xterm+fit, WS client (wss on https/M6), reconnect
backoff, resize debounce, mountKeybar wiring
Verified by orchestrator: backend+frontend tsc clean; full suite 141 tests;
npm run build:web bundles main.ts -> public/build/main.js (430kb).
Note: main.ts uses one @ts-ignore for the CSS import (minor; future: *.css d.ts).
2026-06-16 18:36:32 +02:00
Yaojia Wang
0fa0b69ce9
feat: W1 batch — config, protocol, ring-buffer, origin, mock-pty (TDD)
...
Parallel module-builder subagents, disjoint file ownership, shared tree:
- T4 src/config.ts — loadConfig+M1 origins (32 tests)
- T5 src/protocol.ts — parse/serialize+SESSION_ID_RE+M7 (60 tests)
- T6 src/session/ring-buffer.ts — byte-accurate, no UTF-8/ANSI split+M2 (15 tests)
- T7 src/http/origin.ts — host+port match, undefined rejected (12 tests)
- T3 test/helpers/mock-pty.ts — IPty double w/ emitData/emitExit (9 tests)
Verified by orchestrator: tsc --noEmit clean; full suite 128 tests pass.
2026-06-16 08:09:40 +02:00
Yaojia Wang
b126cf0e42
feat: T1 scaffold — package.json, tsconfig (backend+web), vitest, dirs
...
- All deps declared once (express5, ws, node-pty, @xterm/xterm6, addon-fit;
dev: typescript6, tsx, vitest4, @types/node|ws|express)
- postinstall chmod +x node-pty spawn-helper (prebuild ships it non-exec → posix_spawnp fails)
- node-pty verified: require + real PTY spawn (exitCode 0)
- npm test passes with no tests (passWithNoTests)
- tsconfig.web.json type-checks frontend; browser bundling strategy still TBD (see log)
T1 of docs/PLAN.md
2026-06-16 07:21:42 +02:00