Files
brain-of-reese/.agents/reports/06_story_loading_feedback.a1.md
T
ducoterra dbf2af26c6 refactor(agents): migrate .agent/ planning tree to .agents/
Standardize on the .agents/ directory (shared with project skills):
phases/, user_stories/, reports/, screenshots/, validate.sh, and
phase-sessions/ + pipeline.log all move to .agents/ (git mv preserves
history; runtime artifacts move alongside).

Updates every reference in AGENTS.md, README.md, .gitignore, app
docstrings, and test story headers. Historical KB content in data/
and the runtime pipeline.log transcript are left untouched.
2026-09-05 10:57:07 -04:00

1.7 KiB

Phase 06 complete and committed (e5810b0).

Implemented

  • app.js: single setUiState(state) state machine (idle → thinking → streaming → done|error → idle) driving typing indicator, button disabled/spinner/label, and #send-status; 10s elapsed-seconds aria-label hint; exported TURN_TIMEOUT_MS = 120000 guard (cleared on first delta); error banner with actionable hint; reduced-motion-aware scrolling; ad-hoc setBusy removed
  • Server: ChatErrorEvent schema (exact {type, detail} SSE error wire shape) used in all 3 chat error branches; embed_ms/total_ms added to error-path logs (per-turn line already had both — confirmed)
  • Mock LLM: additive POST /__shutdown__ hook; E2E llm_down fixture stops the mock and restores a fresh instance for later tests
  • Tests: SSE error-event serialization (unit + integration), frontend contract unit tests, tests/e2e/test_loading_feedback.py (5 tests: slow-think indicator, button machine, live streaming, reduced motion, LLM-down recovery)

Results

  • uv run ruff check . → all checks passed; uv run pyright → 0 errors
  • uv run pytest --cov=app --cov-report=term-missing → 123 passed, coverage 99% (>90% gate)
  • uv run pytest tests/e2e/test_loading_feedback.py -v --no-cov → 5 passed in isolation
  • Regression check: all 5 prior story E2E suites re-run in isolation → 16 passed

Decisions: no CSS changes needed (tokens + reduced-motion fallbacks already met spec); error→idle settles in the turn handler's finally so the banner persists while the button always recovers; committed only phase-06 files (.agents/ file moves are harness-managed; the unrecorded phase-05 move predates this phase).

Next pending phase: .agents/phases/todo/07_story_responsive_polish.md