Repository navigation
feat(merge_requests): edit and delete private review drafts - #613
Conversation
Confirm fresh selected targets before one private mutation and share visible inspection recovery across private writes. Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
sjungwon03-ai
left a comment
There was a problem hiding this comment.
Review of commit e626770: Reviewed the exact submitted commit and the complete source/test/documentation diff. No blocking findings remain.
The selected target is validated against fresh authoritative global MR identity and every owned, unique private page before a single update/delete. Missing or changed bodies/anchors/metadata are refused. The shared discussion reservation and uncertain-write settlement gate extend to all private writes. Two test-first account events queued at the final comparison boundary reproduced dispatch before queued cancellation; yielding to that signal and rechecking current session immediately before dispatch fixes both.
The existing API/repository preserves original text anchors and confirms updates/deletion without auth replay, redirects, publication or fallback creation. Unsupported edit anchors stay unavailable; deletion needs no reconstructed anchor. The shared localized dialog displays original/current targets, requires deletion confirmation and complete visible inspection plus acknowledgement before manual recovery, and discards obsolete account/repository/view input and results. A changed edit clears acknowledgement; missing inspected targets cannot retry.
Validation: warning-free repository analysis and formatting, 6,575 passing tests across all five packages, 161 new behavior regressions, five locales with large text/keyboard, and twelve synthetic captures across three widths and both themes. Existing private readers/create/save/composer/panel tests remain included. Generated localization delegates match source; no dependency/model/cache/telemetry changes.
Limitations are explicit: preflight is not a conditional server write or atomic pagination snapshot; already dispatched requests cannot be undone. Recovery is in memory and no exactly-once, live-instance, device or store validation is claimed. Publication and positioned/reply/commit creation remain future work.
Summary
Pending private review notes now offer editing and explicitly confirmed deletion. The dialog shows the original note and location, retains exact edited Markdown, and shares the existing composer's account/view guards and visible recovery.
Both commands reserve discussion writes, refresh authoritative MR detail, and compare the captured target against every validated private page before one request. Changed or missing targets are refused. Uncertain outcomes block all private writes until complete read-only inspection; the dialog requires acknowledgement of the current target before a manual retry. Publication remains separate.
Closes #612
Validation
dart format .(929 files; no outstanding changes)flutter analyzereports no warningsflutter testpasses: 6,575 tests across all five packages (app 3,720; design 127; API 2,547; models 176; secure storage 5)flutter gen-l10nChecklist
dev, links one issue, Conventional Commit with DCO sign-offScreenshots
All 12 captures
Notes for reviewers
API foundations were already split into PR #611. This vertical slice keeps controller and UI together; most added lines are behavioral tests/fixtures and generated localization delegates. Runtime changes reuse the established private dialog and reservation, and no new endpoint or model is added.
The comparison is not a conditional server write or an atomic pagination snapshot, so external concurrency after preflight cannot be eliminated. Dispatched writes cannot be undone. Recovery is in memory only; no exactly-once guarantee is claimed. Unsupported/opaque edit anchors are refused while owned drafts of these kinds remain deletable by identity. Positioned/reply/commit creation and publication remain future slices.