docs(19-02): create InboxList/MessageCard plan summary and update state

This commit is contained in:
Lukas May
2026-02-04 21:52:55 +01:00
parent 648f9db230
commit aa93efaf65
2 changed files with 50 additions and 5 deletions

View File

@@ -9,10 +9,10 @@ See: .planning/PROJECT.md (updated 2026-02-04)
## Current Position
Phase: 18 of 21 (Initiative Detail) - COMPLETE
Plan: 4 of 4 in current phase
Status: Phase complete
Last activity: 2026-02-04 - Completed 18-04-PLAN.md (Initiative Detail page assembly)
Phase: 19 of 21 (Agent Inbox) - IN PROGRESS
Plan: 2 of 4 in current phase
Status: Plan 19-02 complete
Last activity: 2026-02-04 - Completed 19-02-PLAN.md (InboxList and MessageCard components)
Progress: █████████░ 98%
@@ -213,6 +213,10 @@ Recent decisions affecting current work:
- 18-04: Task counts aggregated via callback from PhaseWithTasks to page-level state
- 18-04: DecisionList passed empty array — no backend endpoint for decisions yet
- 18-04: Phase/task dependencies simplified (empty arrays) for v1 — full dependency resolution deferred
- 19-02: Inline formatRelativeTime helper in MessageCard (no separate utils file per plan spec)
- 19-02: Filter/sort as button groups (not dropdowns) for simplicity per plan spec
- 19-02: Count badge shows total joined entries (not filtered count) to match wireframe "Agent Inbox (3)"
- 19-02: cn() import from @/lib/utils for className merging (consistent with all other components)
### Pending Todos
@@ -235,5 +239,5 @@ None.
## Session Continuity
Last session: 2026-02-04
Stopped at: Completed Phase 18 (Initiative Detail) - all 4 plans done
Stopped at: Completed 19-02 (InboxList and MessageCard) - continuing with Plan 03
Resume file: None

View File

@@ -0,0 +1,41 @@
# Plan 19-02 Summary: InboxList and MessageCard Components
## What was built
Created the two core list-view components for the agent inbox:
1. **MessageCard** (`packages/web/src/components/MessageCard.tsx`) — Individual message row showing:
- Status indicator: filled circle (requires response) vs empty circle (informational)
- Agent name with parenthesized status label (e.g., "gastown (waiting for input)")
- Message preview truncated to 80 chars with ellipsis
- Relative timestamp via inline `formatRelativeTime` helper
- Selected state with accent background
2. **InboxList** (`packages/web/src/components/InboxList.tsx`) — Container list component providing:
- Header with "Agent Inbox" title, count badge, and Refresh button
- Filter buttons: All / Waiting / Completed
- Sort buttons: Newest / Oldest
- Agent-message joining (matches `message.senderId` to `agent.id`, picks latest)
- Empty state: "No pending messages" with subtitle
## Decisions
- 19-02: Inline `formatRelativeTime` helper in MessageCard (no separate utils file per plan spec)
- 19-02: Filter/sort as button groups (not dropdowns) for simplicity per plan spec
- 19-02: Count badge shows total joined entries (not filtered count) to match wireframe "Agent Inbox (3)"
- 19-02: `cn()` import from `@/lib/utils` for className merging (consistent with all other components)
## Verification
- `npx tsc --noEmit -p packages/web/tsconfig.app.json` — passes (exit 0)
- `npx vite build` — passes (exit 0, 520 kB bundle)
## Commits
- `6450e40`: feat(19-02): create MessageCard component for agent inbox
- `bf3521e`: feat(19-02): create InboxList component with filter/sort controls
## Files modified
- `packages/web/src/components/MessageCard.tsx` (new)
- `packages/web/src/components/InboxList.tsx` (new)