Skip to content

docs: add session activity plan#39

Merged
moose-lab merged 2 commits into
mainfrom
codex/session-activity-plan-doc
Jun 9, 2026
Merged

docs: add session activity plan#39
moose-lab merged 2 commits into
mainfrom
codex/session-activity-plan-doc

Conversation

@moose-lab

Copy link
Copy Markdown
Owner

Summary

Test Plan

  • git diff --cached --check
  • bun run typecheck
  • TZ=Asia/Shanghai bun run test (224 passed)

@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown

Code Review

  • Gather context
  • Read changed file
  • Review document

View job run

@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown

Claude finished @moose-lab's task in 1m 24s —— View job


Code Review

  • Gather context
  • Read changed file
  • Review document

Documentation-only plan for the session activity stream feature. Well-structured with clear task breakdown, test-first approach, and explicit checkpoints. A few issues to address before implementation begins.

Findings

  • [must-fix] Task 1, Step 1 — test assertion vs. fixture mismatch (docs/superpowers/plans/2026-06-03-session-agent-activity-stream.md:68–103): The session INSERT does not include a started_at column, so it will be NULL in the DB. But the assertion at line 96–103 expects started_at: "2026-06-03 00:41:14". The replay helper queries started_at directly from the sessions table, so this assertion will fail on first run. Fix: either add started_at to the INSERT ('2026-06-03 00:41:14'), or update the assertion to expect null. Fix this →

  • [should-fix] Task 4, Step 3 — nextId() is unspecified (docs/superpowers/plans/2026-06-03-session-agent-activity-stream.md:574): nextId() is called inside appendActivity but never defined or imported. If an implementor picks Date.now(), millisecond collisions are possible under fast replay. Recommend defining it explicitly as a useRef counter: const idRef = useRef(0); const nextId = useCallback(() => ++idRef.current, []);.

  • [nit] Task 2, Step 1 — overly broad catch {} (docs/superpowers/plans/2026-06-03-session-agent-activity-stream.md:289–291): The comment says // DB might not be ready, but the catch swallows all errors from the entire replay loop, including programming errors (e.g., a bad SQL query). Consider narrowing to log unexpected errors: catch (err) { if (!(err instanceof DatabaseError)) console.error('replay error', err); }.

  • [nit] Task 4, Step 4 — TerminalIcon import not specified (docs/superpowers/plans/2026-06-03-session-agent-activity-stream.md:663): TerminalIcon is used in ActivityTimeline but the plan doesn't show where it's imported from. Since the project uses lucide-react elsewhere, this is likely import { Terminal as TerminalIcon } from "lucide-react", but the plan should make this explicit to avoid ambiguity.

Verdict: COMMENT

@moose-lab moose-lab merged commit 396d8e8 into main Jun 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant