fix(synthesis): accepting a proposal no longer jumps the scroll#194
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
renderProposalsnow gives in-place feedback only:✓(as before),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.onChangedis removed from therenderProposalscontract and its wiring insynthesis-block.Membership add/remove keeps its own
onReloadCase(a different path) — unchanged.Verification
npm test→ 1976 pass ·npm run buildclean ·npm run lint0 errors.partitionProposalstests 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