Skip to content

feat(merge_requests): save private drafts on verified diff selections - #617

Merged
sjungwon03 merged 1 commit into
devfrom
feat/616-inline-private-review
Oct 5, 2026
Merged

sjungwon03 merged 1 commit into
devfrom
feat/616-inline-private-review

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

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 outstanding
  • flutter analyze: no issues
  • Full tests: 6,831 (app 3,934; design system 127; API 2,589; models 176; secure storage 5)
  • 113 new behavior tests; missing position forwarding/fresh validation and missing UI reproduced first. Snapshot refresh during loading, origin disposal and final-page recovery races reproduced before fixes
  • Five locales, 390/800/1200 widths, both themes, large text and keyboard constraints; twelve synthetic widget captures rendered and inspected
  • No model changes; localization delegates regenerated

Checklist

  • One linked issue, feature branch into dev, Conventional Commit and DCO
  • Test-first behavior and updated documentation
  • Shared responsive UI; light/dark and narrow/wide checked
  • No dependencies, disk persistence or telemetry added
  • Dummy credentials, paths and accounts only; English source/docs/review with localized translations

Screenshots

All twelve synthetic captures

Mobile composition, light Desktop inspection, dark
Composition Inspection

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.

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
sjungwon03 marked this pull request as ready for review October 5, 2026 14:29
@github-actions github-actions Bot added 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 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.

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

Labels

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.

Create private MR review drafts from verified diff selections

2 participants