Skip to content

feat(reflect): surface filterable reflection; Health becomes review-only (Phase 2A)#17

Merged
gurdenbatra merged 1 commit into
mainfrom
phase-2-reflect
Jun 12, 2026
Merged

feat(reflect): surface filterable reflection; Health becomes review-only (Phase 2A)#17
gurdenbatra merged 1 commit into
mainfrom
phase-2-reflect

Conversation

@gurdenbatra

Copy link
Copy Markdown
Member

Why

The team's highest-value reflection feature — filterable LLM synthesis ("What's the status of Madrid?") — was buried mid-page in /review (Health) as ReflectionSection, while the nav's /reflect page was a session ritual whose guided-question textareas were the friction Robyn pushed back on. The killer feature was behind the wrong door.

What

  • /reflect is now the filterable reflection tool: scope picker (whole system / sites / options / goal spaces) → POST /api/reflect/analyse → synthesis, now rendered as Markdown (upgrade from plain pre-wrapped text). page.tsx fetches the scope lists.
  • Retired the /reflect session ritual (convergence sparklines, guided-question textareas, decisions log, session save). Removed questions.ts; ReflectClient rewritten. ConvergenceSparkline/FeedbackWidget kept (used elsewhere — convergence still surfaces on dashboard/commitments).
  • /review (Health) is now review-only: flagged-for-review + tension alerts + awaiting-review. Removed ReflectionSection and its scope queries/props — which also pre-factors Health toward the unified inbox (piece B).
  • Deleted components/review/ReflectionSection.tsx (logic absorbed into ReflectClient; Health was its only other consumer) and its test.

Untouched (deliberately)

  • POST /api/reflect/analyse — the engine, unchanged.
  • POST /api/reflect/session + reflection_sessions table — the session endpoint loses its UI caller but stays (the table still backs reflection/run's 24h rate-limit check). reflect/types.ts is kept because that route imports ReflectionSessionPayload.
  • Nav still shows both Health and Reflect; consolidation is piece C.

Decisions captured (yours)

  • Replace /reflect entirely with the filterable tool (vs keeping the ritual).
  • Health becomes review-queue + tensions only.

Test plan

  • rewrote ReflectClient.test.tsx for the filterable flow — scope body ({type, value?, label}), synthesis render, error state, disabled-when-no-options
  • ReviewPage.test.tsx still green (asserts title + flagged/tensions only)
  • clean tsc --noEmit → 0 · eslint . → 0 · vitest run → 554 pass

Spec: docs/superpowers/specs/2026-06-12-surface-filterable-reflection-design.md. First slice of Phase 2 (UX). Pieces B (unified inbox), C (nav + mobile + light-mode), D (optional capture titles) follow as separate PRs.

…mes review-only

Phase 2, piece A. The highest-value reflection feature — filterable LLM
synthesis ("What's the status of Madrid?") — was buried mid-page in /review
(Health), while the nav's /reflect page was a session ritual whose
guided-question textareas were friction.

- /reflect is now the filterable reflection tool: scope picker (whole system /
  sites / options / goal spaces) → /api/reflect/analyse → synthesis, now
  rendered as Markdown. page.tsx fetches the scope lists.
- Retired the /reflect session ritual (convergence sparklines, guided-question
  textareas, decisions log, session save). Removed questions.ts; ReflectClient
  rewritten. ConvergenceSparkline/FeedbackWidget kept (used elsewhere).
- /review (Health) is now review-only: flagged + tensions + awaiting-review.
  Removed ReflectionSection and its scope queries/props — also pre-factors
  Health toward the unified inbox (piece B).
- Deleted components/review/ReflectionSection.tsx (logic absorbed into
  ReflectClient; Health was its only other consumer) and its test.

Untouched: /api/reflect/analyse (engine). /api/reflect/session + the
reflection_sessions table stay (table still backs reflection/run's 24h check);
reflect/types.ts kept because the session route imports ReflectionSessionPayload.

Tests: rewrote ReflectClient.test.tsx for the filterable flow (scope body,
synthesis render, error, disabled-when-empty). tsc 0, lint 0, 554 pass.
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cof-learning-system Ready Ready Preview, Comment Jun 12, 2026 11:29am

Request Review

@gurdenbatra gurdenbatra merged commit 046d7f3 into main Jun 12, 2026
3 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