Skip to content

FE-674: Suppress no-op Undo on hard apply + V3.0 polish#118

Open
kostandinang wants to merge 2 commits into
ka/fe-674-cascade-resolvefrom
ka/fe-674-cascade-polish
Open

FE-674: Suppress no-op Undo on hard apply + V3.0 polish#118
kostandinang wants to merge 2 commits into
ka/fe-674-cascade-resolvefrom
ka/fe-674-cascade-polish

Conversation

@kostandinang
Copy link
Copy Markdown
Contributor

@kostandinang kostandinang commented May 8, 2026

What

Six small polish commits over the V3.0 stack from a code-review pass.

Stacked on #117.

Changes

  1. Doc sync: SIDE_CHAT.md §5.3 now agrees with §9 that V3.0 has one Resolve action.
  2. Extract <PendingReviewSection> out of patch-list-overlay.tsx — overlay becomes pure layout. Focused tests follow.
  3. Shared makeNeed fixture across overlay + section tests.
  4. Network-call assertions on Resolve: one POST, one invalidation, no double-fire.
  5. New test fixture covering 5+ downstream items + all relation kinds.
  6. Suppress Undo for hard-only batches — the misleading no-op Undo click is gone. Saved-toast still fires after hard apply.

Test plan

  • CI green; only user-visible change is Undo suppression on hard-only batches

@kostandinang kostandinang changed the title FE-674: Reconcile SIDE_CHAT.md §5.3 with §9 V3.0 single-Resolve action FE-674: V3.0 polish — SIDE_CHAT.md §5.3 / §9 consistency May 8, 2026
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from 54006af to aff3024 Compare May 8, 2026 16:08
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch from d225815 to 33ce6e0 Compare May 8, 2026 16:08
@kostandinang kostandinang changed the title FE-674: V3.0 polish — SIDE_CHAT.md §5.3 / §9 consistency FE-674: V3.0 polish (6 commits) — extract section, suppress Undo for hard, oracle assertions May 8, 2026
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch from 33ce6e0 to 9464e9f Compare May 8, 2026 17:48
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from aff3024 to ead1ecf Compare May 8, 2026 17:48
@kostandinang kostandinang changed the title FE-674: V3.0 polish (6 commits) — extract section, suppress Undo for hard, oracle assertions FE-674: V3.0 polish — extract section, suppress Undo for hard, oracle assertions May 8, 2026
@kostandinang kostandinang self-assigned this May 8, 2026
@kostandinang kostandinang marked this pull request as ready for review May 8, 2026 17:53
@cursor
Copy link
Copy Markdown

cursor Bot commented May 8, 2026

PR Summary

Medium Risk
Changes patch-list overlay composition and undo eligibility logic, which can affect core apply/undo UX and post-apply feedback. Risk is mitigated by expanded unit/integration tests around resolve behavior, toast visibility, and hard-edit cascade fixtures.

Overview
Refactors the patch-list overlay by extracting the reconciliation queue UI into a dedicated PendingReviewSection, and adds focused component tests that assert resolve calls are single-fire (including rapid double-click) and trigger a single query invalidation.

Polishes hard-impact apply behavior by tagging hard edit applies as noUndo, updating the patch-list reducer to hide Undo for batches with only noUndo entries, and adjusting the saved-toast effect to still show “Change saved” for hard applies while avoiding toast-clears except on a real canUndo: true → false transition.

Updates design docs (SIDE_CHAT.md) to clarify V3.0 ships a single per-row Resolve action (no target mutation), with richer multi-action/agent grouping deferred to V3.1, and strengthens server cascade coverage with a dense fixture ensuring one reconciliation_need opens per edge across all typed relations.

Reviewed by Cursor Bugbot for commit d2a3611. Bugbot is set up for automated code reviews on this repo. Configure here.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 8, 2026

🤖 Augment PR Summary

Summary: This PR finishes the V3.0 polish pass by extracting the cascade “Pending review” UI, tightening resolve/fixture tests, and hiding Undo for hard-only applies where undo is a no-op.

Changes:

  • Updated docs/design/SIDE_CHAT.md to match V3.0 behavior: one per-row Resolve action and no target mutation.
  • Extracted <PendingReviewSection /> from patch-list-overlay.tsx and added focused component tests for listing + resolve behavior (including double-click oracle assertions).
  • Introduced a shared makeNeed test fixture for reconciliation-need records to keep row-shape setup consistent across tests.
  • Added noUndo: true metadata for hard-impact edit applies and updated the patch-list reducer so canUndo excludes batches where every entry is noUndo.
  • Adjusted the saved-toast effect so “Change saved” still appears for hard applies, while the inline Undo affordance remains conditional on canUndo.
  • Added a dense server route test covering all five relation types on a 5+ downstream graph to assert the relation→kind cascade matrix.

Technical Notes: The UI now composes three independent sticky regions (staged changes, pending review, saved toast), and the “Undo” surface is suppressed specifically for hard-only batches where undo cannot reverse the source mutation.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/client/components/patch-list-overlay.tsx
Comment thread src/client/components/patch-list-overlay.tsx
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f74f37c. Configure here.

Comment thread src/client/components/pending-review-section.tsx
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from b1542b0 to ec73476 Compare May 11, 2026 09:41
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch from f74f37c to 37085de Compare May 11, 2026 09:41
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from ec73476 to 0fe4440 Compare May 11, 2026 09:47
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch 2 times, most recently from 41359bd to 675db5b Compare May 11, 2026 09:49
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from 0fe4440 to 4f63bdd Compare May 11, 2026 09:49
@kostandinang kostandinang requested a review from lunelson May 11, 2026 09:57
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from 4f63bdd to cb5c12b Compare May 11, 2026 10:04
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch from 675db5b to bfeff81 Compare May 11, 2026 10:04
…assertions)

Squashed from six commits:
- Reconcile SIDE_CHAT.md §5.3 with §9 V3.0 single-Resolve action
- Extract <PendingReviewSection> from patch-list-overlay
- Move makeNeed test helper to shared fixture
- Add F5 network-call-counter assertions to Resolve action
- Add 5+-downstream / all-relations fixture for hard cascade
- Suppress Undo for hard-only batches; close polish refactor
The savedToast was being suppressed when an undoable batch was followed
by a hard-only batch: canUndo transitioned true→false in the same
render that lastBatchId changed, so the canUndo cleanup effect cleared
the toast right after the lastBatchId effect set it. Track previous
canUndo via a ref and only hide when canUndo specifically transitioned
from true to false — the actual signal we want (the user undid).
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-polish branch from bfeff81 to d2a3611 Compare May 11, 2026 10:06
@kostandinang kostandinang force-pushed the ka/fe-674-cascade-resolve branch from cb5c12b to 308215b Compare May 11, 2026 10:06
@kostandinang kostandinang changed the title FE-674: V3.0 polish — extract section, suppress Undo for hard, oracle assertions FE-674: Suppress no-op Undo on hard apply + V3.0 polish May 11, 2026
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