Skip to content

fix(synthesis): accepting a proposal no longer jumps the scroll#194

Merged
bryanmatthewsimonson merged 1 commit into
mainfrom
fix/proposal-accept-scroll
Jul 18, 2026
Merged

fix(synthesis): accepting a proposal no longer jumps the scroll#194
bryanmatthewsimonson merged 1 commit into
mainfrom
fix/proposal-accept-scroll

Conversation

@bryanmatthewsimonson

Copy link
Copy Markdown
Owner

The bug

Clicking Accept on a corpus-synthesis proposal jumped the page to the bottom every time, making it painful to accept a run of proposals.

Root cause

The accept handler fired onChanged → onReloadCase → render() — a full portal re-render. render() rebuilds #xr-view, and the synthesis block repopulates asynchronously, so the scroll position reset (landing at the bottom) on every single accept. The re-render was also redundant: the handler already marks the row in place and persists through the model firewalls (EvidenceLinker / ClaimModel) independently of any render.

Fix

Drop the per-accept re-render. renderProposals now gives in-place feedback only:

  • the accepted row marks (as before),
  • the "Proposals — review and accept (N)" count ticks down live,
  • a hint appears: "N accepted — Refresh to fold them into the case view."

The graph/dossier reflect accepted claims/links on the next Refresh (the natural batch workflow), never mid-triage. Dismiss already used row.remove() (no re-render) and was unaffected — it now also decrements the count. onChanged is removed from the renderProposals contract and its wiring in synthesis-block.

Membership add/remove keeps its own onReloadCase (a different path) — unchanged.

Verification

  • npm test → 1976 pass · npm run build clean · npm run lint 0 errors.
  • Behavior is DOM-only (no re-render call, in-place count); the pure partitionProposals tests still cover the triage partition.

Manual check after merge: open a case with proposals, scroll to one mid-list, Accept several in a row — the view should stay put, each row flips to , and the count decrements.

🤖 Generated with Claude Code

Every Accept fired onChanged → onReloadCase → render(), a full portal
re-render that rebuilt #xr-view (the synthesis block repopulates async),
resetting the scroll to the bottom on each accept — batch-accepting was
miserable. The re-render was redundant: the handler already marks the row
✓ in place and persists through the model firewalls.

- drop the per-accept re-render (removed onChanged from renderProposals
  and its wiring in synthesis-block)
- in-place feedback instead: row shows ✓, the open count ticks down, and
  a hint notes "N accepted — Refresh to fold them into the case view"
- Dismiss now also decrements the count (already re-render-free)

The graph/dossier fold accepted claims/links in on the next Refresh.
Membership add/remove keeps its own onReloadCase — unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bryanmatthewsimonson
bryanmatthewsimonson merged commit f2f55bb into main Jul 18, 2026
1 check passed
@bryanmatthewsimonson
bryanmatthewsimonson deleted the fix/proposal-accept-scroll branch July 18, 2026 18:07
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