FE-674: Show pending review rows in the patch overlay#116
Conversation
2784229 to
6b94227
Compare
e11e4ed to
5704a0b
Compare
6b94227 to
fd82cc7
Compare
5704a0b to
0a6b7d4
Compare
PR SummaryMedium Risk Overview Updates the client to fetch and invalidate these open needs via new Reworks Reviewed by Cursor Bugbot for commit 994c3f3. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: This PR adds the first UI “reader” for V3.0 hard-impact reconciliation needs and removes the legacy V2 deferred banner. Changes:
Technical Notes: The reconciliation needs list is scoped by specification and excludes resolved rows; the overlay fetch is non-blocking (initial data 🤖 Was this summary useful? React with 👍 or 👎 |
fd82cc7 to
9755778
Compare
0a6b7d4 to
01be53b
Compare
9755778 to
9944024
Compare
6bc0376 to
fa2e56b
Compare
…V3.0 card 2)
The V3.0 hard-impact apply contract no longer carries a `deferred: true` shape
or any "Hard impact — coming in V3" banner copy. Open reconciliation_need rows
opened by card 1 now render in a "Pending review" section inside the patch
list overlay, satisfying the second clause of invariant I112 ("never returns
deferred: true") and the read side of the queue.
Server:
- New GET /api/specifications/:id/reconciliation-needs (handler in
src/server/reconciliation-needs-route.ts) returns { openNeeds: [...] } for
the spec; resolved rows excluded; cross-spec leakage prevented at the
application layer; 404 / 400 on missing or non-numeric spec id.
Shared:
- New src/shared/reconciliation-need.ts — ReconciliationNeedRecord type so
the client doesn't import server types.
Client:
- specificationQueryKeys gains `reconciliationNeeds(specId)`.
- New useSpecificationOpenReconciliationNeeds hook (non-suspending; initial
data []) and invalidateOpenReconciliationNeeds() helper.
- edit-applier: hard-impact apply returns
{ impact: 'hard', previousContent, previousRationale, openedNeedIds }
with no `deferred: true` field. Undo for hard apply remains a no-op (card 3
ships real resolve semantics). Hard apply now also invalidates the
reconciliation-needs query so the Pending review section refreshes.
- patch-list-overlay: deferred-banner code path removed. New "Pending review"
region renders open needs with a kind chip (supersedes / confirm) and
source/target item references. Region only shows when openNeedsCount > 0.
Saved-toast continues to fire after any apply (including hard).
Tests:
- 6 new cases in reconciliation-needs-route.test.ts cover empty list, scoped
list, resolved-row exclusion, cross-spec isolation, 404, 400.
- patch-list-overlay tests replace deferred-banner cases with Pending-review
cases (rendering, empty state, co-existence with staged-changes, no V3
banner copy, saved-toast after hard apply).
- side-chat-host tests stub the open-needs hook so PatchListOverlay can render
without router/query scaffolding.
- -specification-data test asserts the new query-key list shape.
- edit-applier tests assert the new hard-impact applied shape and no-op undo.
Verified: npm run verify (1053 tests, 0 lint warnings).
SIDE_CHAT.md §5.1 soft-tier wording clarified to note no durable needs are
opened for the soft path (only hard fires Path 1).
Drop the private invalidateOpenReconciliationNeedsAfterApply copy and import the body-identical invalidateOpenReconciliationNeeds already exported from -specification-data.ts. specificationQueryKeys was already imported from that module, so this is a one-line import addition with no new dependency surface.
The staged-changes, Pending review, and saved-toast sections all used sticky top-0 z-30 individually, which made them fight for the same sticky offset when more than one was visible at a time (a real co- occurrence: an open need plus the post-apply saved toast). Result: bars visibly overlapped or covered each other while scrolling. Wrap the three sections in a single sticky flex column so they share one sticky context and stack vertically as one block — children no longer need sticky/z-index themselves.
initialData: [] inherits the global staleTime: 30_000, which made React Query treat the empty seed as fresh and skip the first fetch for 30s — existing open needs were invisible in the Pending review section until the stale window expired. initialDataUpdatedAt: 0 marks the seed as stale so a background fetch runs immediately on mount.
fa2e56b to
7bade11
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc59404. Configure here.
The class `text-text-sub` doesn't match any defined token; the theme exposes `--color-sub` (utility `text-sub`). The misnamed class was silently dropped, so the pending-review `<ul>` inherited `text-ink` instead of the intended subdued gray. Co-authored-by: Cursor <cursoragent@cursor.com>


What
Surfaces the pending reconciliation needs that #115 started writing. The old "deferred — coming in V3" banner is gone.
Stacked on #115.
How
GET /api/specifications/:id/reconciliation-needsreturns open needs scoped to the spec.patch-list-overlay: deferred banner removed; new Pending review region per need showing kind chip (supersedes/confirm) plus source → target refs.top: 0.Test plan