agent-orchestrator/packages
Prateek 8d4b26c44e fix: comprehensive code review fixes — tests, timestamps, UI correctness
Address gaps identified in code review of the ActivityDetection PR:

Core / Session Manager:
- Add `timestamp` to all `{ state: "exited" }` returns in all 4 agent plugins
  (claude-code, aider, codex, opencode) using consistent `exitedAt = new Date()` pattern
- Add 2 new session-manager tests: timestamp propagation when detection timestamp
  is newer, and no-downgrade when detection timestamp is older
- Fix `parseJsonlFileTail` lint error: remove useless `= 0` initializer (value was
  always overwritten before use; catch block returns early)

Web package — tests:
- Fix 3 `api-routes.test.ts` failures: `sessionsGET()` needs a Request object since
  the route reads `request.url` for `?active=true` query param
- Fix `serialize.test.ts` rate-limit test: spy on `console.warn` (what the code uses)
  not `console.error`
- Add 5 `ActivityDot` component tests covering all activity states, unknown states,
  null activity, and dotOnly mode

Web package — UI correctness:
- Fix `relativeTime()` in SessionDetail to guard against invalid/empty ISO strings
- Fix timer Map leak: add `timersRef.current.clear()` in cleanup effect after forEach
- Add `encodeURIComponent` to sessionId in message fetch URL

Server — race condition fix:
- Guard `activeSessions.delete` in pty.onExit, ws.on("close"), and ws.on("error")
  against stale handlers deleting a newly-registered session with the same ID.
  Fixes flaky integration test where afterEach's pty.kill() fired asynchronously
  after the next test had already set up a new session with the same session ID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 10:32:25 +05:30
..
agent-orchestrator feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
cli fix: auto-detect free port in `ao init` instead of hardcoding 3000 (#120) 2026-02-19 07:27:39 +05:30
core fix: comprehensive code review fixes — tests, timestamps, UI correctness 2026-02-20 10:32:25 +05:30
integration-tests fix(ci): resolve lint, typecheck, and test failures 2026-02-20 03:50:05 +05:30
plugins fix: comprehensive code review fixes — tests, timestamps, UI correctness 2026-02-20 10:32:25 +05:30
web fix: comprehensive code review fixes — tests, timestamps, UI correctness 2026-02-20 10:32:25 +05:30