Skip to content

feat(review): unified review inbox + confidence gate on extracted children (Phase 2B)#19

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

feat(review): unified review inbox + confidence gate on extracted children (Phase 2B)#19
gurdenbatra merged 1 commit into
mainfrom
phase-2-inbox

Conversation

@gurdenbatra

Copy link
Copy Markdown
Member

Why

Review was fragmented: flagged_for_review nodes got one-tap Accept/Edit/Archive, but document/meeting-extracted children were all forced to llm_reviewed — bypassing the maturity gate single captures get, reachable only via a separate per-child page, and (for non-knowledge types) invisible to the queue entirely.

What

Backend — confidence gate on extracted children (capture/process)

  • New pure helper childTriage.childReviewStatus(level): confidence ≥ 4 → promoted, else flagged_for_review (threshold = named constant).
  • Both document and meeting child inserts use it instead of hardcoding llm_reviewed. Confident children auto-promote (matching the single-capture gate); the rest land in the inbox flagged. Parent source node unchanged. No new llm_reviewed children created.

Frontend — unified inbox (/review)

  • One "Review" queue merging flagged_for_review (all types) + legacy llm_reviewed knowledge nodes, each with uniform Accept (→promoted) / Edit & promote (→ per-child page) / Archive (→archived).
  • FlaggedItem generalised → ReviewItem (kind: 'flagged' | 'awaiting', reason tag — "Needs more evidence" / "Low extraction confidence" / "Awaiting sign-off" — and a "from <source>" tag for extracted children). The old Review-link-only "Awaiting" section folds into the queue.
  • page.tsx builds the queue and fetches source-document titles. Heading → "Review"; nav label "Health" → "Review" (nav consolidation stays piece C).

Decisions captured (yours)

  • Confidence gate (≥4 auto-promotes) for child triage.
  • Inbox UI + triage change in one PR.

Notes

  • Graph visibility of in-progress nodes is unchanged (separate concern).
  • PATCH /api/nodes/[id] already supports promoted/archived — no API change.

Test plan

  • childTriage unit test (boundary at 4)
  • FlaggedItem.testReviewItem.test — both kinds, reason + source tags, action callbacks
  • ReviewPage.test — merged queue (flagged + awaiting)
  • clean tsc → 0 · eslint . → 0 · vitest run → 557 pass

Spec: docs/superpowers/specs/2026-06-12-unified-review-inbox-design.md. Phase 2 piece B. Remaining: C (nav consolidation + mobile + light-mode), D (optional capture titles).

…ldren

Phase 2, piece B.

Backend — confidence gate on extracted children (capture/process):
- New pure helper childTriage.childReviewStatus(level): confidence >= 4 →
  'promoted', else 'flagged_for_review' (threshold a named constant).
- Document + meeting child inserts now use it instead of hardcoding
  'llm_reviewed'. Confident children auto-promote (matching the single-capture
  maturity gate); the rest land in the inbox flagged. Parent source node
  unchanged. No new llm_reviewed children are created.

Frontend — unified inbox (/review):
- One "Review" queue merging flagged_for_review (all types) + legacy
  llm_reviewed knowledge nodes, each with uniform Accept / Edit & promote /
  Archive. FlaggedItem generalised → ReviewItem (kind: 'flagged' | 'awaiting',
  reason tag, "from <source>" tag for extracted children). The old
  Review-link-only "Awaiting" section folds into the queue.
- page.tsx builds the queue and fetches source-document titles so children show
  their origin. Heading → "Review"; nav label "Health" → "Review".

Tests: childTriage unit test (boundary at 4); FlaggedItem.test → ReviewItem.test
covering both kinds, reason/source tags, and actions; ReviewPage.test updated
for the merged queue. tsc 0, lint 0, 557 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 7:50pm

Request Review

@gurdenbatra gurdenbatra merged commit 1a483f2 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