Skip to content

feat(merge_requests): edit and delete private review drafts - #613

Merged
sjungwon03 merged 1 commit into
devfrom
feat/612-draft-review-actions
Oct 5, 2026
Merged

sjungwon03 merged 1 commit into
devfrom
feat/612-draft-review-actions

Conversation

@sjungwon03

@sjungwon03 sjungwon03 commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

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 analyze reports no warnings
  • flutter test passes: 6,575 tests across all five packages (app 3,720; design 127; API 2,547; models 176; secure storage 5)
  • Model build_runner is not applicable; localization delegates regenerated with flutter gen-l10n
  • Widget interactions and rendered synthetic captures inspected; no live GitLab or physical-device validation
  • 161 new regressions; initial missing-method/control failures and two final-dispatch account-race failures reproduced before fixes. Existing private reader/repository/save/composer/panel regressions remain included.
  • Five locales with large text and keyboard; 390/800/1200 widths and both themes; 12 synthetic editing/inspection captures.

Checklist

  • Targets dev, links one issue, Conventional Commit with DCO sign-off
  • Test-first behavior and documentation updated
  • Narrow/wide layouts and light/dark themes checked
  • No dependency changes; existing pure anchor validator is exported rather than duplicated
  • No real credentials, private instance addresses or confidential code; synthetic identities/dummy tokens only
  • Repository source/docs/review in English; other languages only in translation files/generated delegates

Screenshots

All 12 captures

Edit, mobile light Delete inspection, desktop dark
Edit Delete inspection

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.

Confirm fresh selected targets before one private mutation and share visible inspection recovery across private writes.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@sjungwon03
sjungwon03 marked this pull request as ready for review October 5, 2026 12:01
@github-actions github-actions Bot added area:api packages/gitlab_api — GitLab REST/GraphQL client area:ui Screens and feature UI area:docs AGENTS.md, .agents/, README and friends feat New feature labels Oct 5, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@sjungwon03
sjungwon03 merged commit 3edfc92 into dev Oct 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:api packages/gitlab_api — GitLab REST/GraphQL client area:docs AGENTS.md, .agents/, README and friends area:ui Screens and feature UI feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect private MR draft editing and deletion with guarded recovery

2 participants