3.6 KiB
3.6 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-establish-transcript-start | Establish the true transcript start | done | 1 | plan.md |
|
|
|
Task 01: Establish the true transcript start
Summary
Record when session message history has authoritative pagination metadata and
use that state to prevent a bounded tool-only window from synthesizing the task
description. Preserve bounded opening and prompt-#1 behavior.
In scope
- Add and maintain per-session message-history initialization state.
- Expose initialized and raw-history state through the session hook.
- Gate task-description fallback on initialized, exhausted history.
- Preserve stored user prompts as authoritative.
- Add the failing tool-only-window regression before implementation.
Out of scope
- Sentinel continuation and retry-control behavior.
- Backend message APIs or persistence.
- Eager history loading.
Acceptance
- An initialized window with older history and no user row renders no synthetic task description.
- Exhausted legacy history with no user row renders one non-empty fallback.
- Uninitialized, refetching, prompt-
#1, and empty-description cases do not produce a misleading or duplicate fallback.
Verification
cd apps/web
pnpm exec vitest run \
hooks/use-processed-messages-fallback.test.ts \
hooks/domains/session/use-session-messages.test.ts \
hooks/domains/session/use-session-message-fetch.test.ts \
lib/state/slices/session/session-slice.merge-messages.test.ts \
components/task/chat/message-list-shared.test.tsx
pnpm run typecheck
Files likely touched
apps/web/lib/state/slices/session/types.tsapps/web/lib/state/slices/session/session-slice.tsapps/web/lib/state/slices/session/session-slice.merge-messages.test.tsapps/web/lib/state/hydration/merge-strategies.tsapps/web/hooks/domains/session/use-session-messages.tsapps/web/hooks/domains/session/use-session-message-fetch.test.tsapps/web/components/task/chat/use-chat-panel-state.tsapps/web/hooks/use-processed-messages.tsapps/web/hooks/use-processed-messages-fallback.test.tsapps/web/components/task/chat/message-list-shared.test.tsx
Dependencies
None.
Risks
- Boot-hydrated and client-fetched sessions must set the same initialization state.
- Live rows arriving before the newest snapshot must not claim that history is initialized or exhausted.
- Purged sessions must not retain metadata that affects a later session.
Parallelism
sequential
Inputs
REQ-UI-TASK-PROMPT-TRANSCRIPT-VISIBILITY-001acceptance criteria.1to.4and.10.- History state and opening boundary sections of the system design.
- Existing message-window reconciliation and processed-message fallback tests.
Results
- Added per-session
historyInitializedmetadata with safe defaults, live-row isolation, newest-window fetch/boot hydration, and purge-compatible state. - Gated the task-description fallback on initialized, exhausted history while
preserving stored user prompts and the prompt-
#1visible boundary. - Added regressions for older history, uninitialized history, live inserts, and authoritative fetch metadata.
- The focused Task 01 Vitest suite passed (5 files, 87 tests).
pnpm run typecheckpassed.