Repository navigation
feat(merge_requests): save private drafts on verified diff selections - #617
Conversation
Preserve public input while checking fresh diff identity and selected text before one private save, with explicit recovery after uncertain outcomes. Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
sjungwon03-ai
left a comment
There was a problem hiding this comment.
Review of commit 3eecb56: Reviewed the diff, five-locale delegates, behavior documentation and twelve synthetic captures. The controller refreshes MR identity and the authoritative diff, verifies the immutable original selection and reserves discussion commands before the single existing private-create call. Version, selected text, snapshot lifecycle and session changes prevent stale dispatch; dispatched uncertainty survives same-account refresh. The separate modal preserves public input, discards obsolete private state, and requires complete visible inspection plus renewed consent for manual retry. Final inspection adoption now rechecks the session after page validation.
113 new regressions cover sides/ranges, fresh changes, shared reservation, unconfirmed acknowledgements, cancellation/late failures, inspection, localization and responsive layouts. All 6,831 tests, clean analysis/format and four required exact-head CI jobs passed. No blocking findings. Fresh checks remain preflight and recovery is in-memory; live-instance/device validation is not claimed.
Summary
The MR changes screen can save a private draft on a selected text line or forward multiline range. The separate dialog shows the original version, paths and coordinates and leaves unsent public discussion text intact. It refreshes MR identity and the authoritative latest diff before one existing positioned-draft request; changed version/SHA/selection or selected text refuses dispatch.
Account/client/repository/snapshot/view replacements isolate obsolete commands and private input. Uncertain writes retain the shared inspection gate across refresh and reopen; complete visible inspection and explicit new consent are required for another manual save. A last-page session check prevents queued client replacement from adopting old private rows or clearing uncertainty.
Closes #616
Validation
dart format .: 936 files, no changes outstandingflutter analyze: no issuesChecklist
dev, Conventional Commit and DCOScreenshots
All twelve synthetic captures
Notes for reviewers
Uses the existing Draft Notes API position contract and strict create acknowledgement, without public posting, publication, approval, merge, redirect, auth replay or automatic retry. Immutable selected text and a snapshot lifecycle token guard fresh reads and additional refreshes while already loading.
The fresh check is a preflight, not an atomic conditional server write. Recovery is in-memory; identical text/positions cannot identify an uncertain create attempt. No live-instance/device or exactly-once claim. Image/file/commit/reply drafts, single-note publication and reviewer-state controls remain separate; MW-07 stays in progress.