Apply multiple review suggestions as one atomic mobile fix #1384

Closed
opened 2026-08-25 06:53:22 +00:00 by timmy · 0 comments
Owner

User problem

Applying one reviewer suggestion advances the pull head, which immediately makes the remaining suggestions from that same review appear stale. On a phone, authors cannot complete several suggestions in one file without repeated reloads or manual full-file editing.

Scope

Add a bounded same-file suggestion batch that validates the expected pull head and blob, combines non-overlapping line replacements from the bottom up, and creates one commit through Gitea’s supported contents API. The mobile review UI stages compatible suggestions, reviews the batch, commits once, and preserves the selection on retryable failure. Suggestions in another file wait for a subsequent batch; no response or Addressed disposition is posted implicitly.

Acceptance criteria

  • Stage two to eight current-head suggestions for one file and review them as one batch.
  • Apply ranges deterministically and reject overlaps or stale source lines before mutation.
  • A stale pull head/blob, unsupported file, invalid bounds, or contents race produces no commit.
  • One confirmation creates exactly one commit and verifies the resulting file and advanced pull head.
  • Retryable errors preserve staged choices; submission is single-flight.
  • Phone-width rendered tests cover stage → review → commit → resume with no horizontal overflow and accessible controls.
  • Focused behavioral tests and the full suite pass.

Non-duplication evidence

Historical issue/PR and commit review found #1382/#1383 only implement one suggestion per commit. No open/closed title or recent commit covers staging or atomically applying multiple reviewer suggestions in one file.

API constraint discovered during implementation

This Gitea 1.22 instance exposes only read operations for Git blob/tree/ref endpoints in its live Swagger contract. Multi-file atomic commits cannot be implemented truthfully through those endpoints, so this issue deliberately uses the supported single-file contents API and fails closed across file boundaries.

## User problem Applying one reviewer suggestion advances the pull head, which immediately makes the remaining suggestions from that same review appear stale. On a phone, authors cannot complete several suggestions in one file without repeated reloads or manual full-file editing. ## Scope Add a bounded same-file suggestion batch that validates the expected pull head and blob, combines non-overlapping line replacements from the bottom up, and creates one commit through Gitea’s supported contents API. The mobile review UI stages compatible suggestions, reviews the batch, commits once, and preserves the selection on retryable failure. Suggestions in another file wait for a subsequent batch; no response or Addressed disposition is posted implicitly. ## Acceptance criteria - Stage two to eight current-head suggestions for one file and review them as one batch. - Apply ranges deterministically and reject overlaps or stale source lines before mutation. - A stale pull head/blob, unsupported file, invalid bounds, or contents race produces no commit. - One confirmation creates exactly one commit and verifies the resulting file and advanced pull head. - Retryable errors preserve staged choices; submission is single-flight. - Phone-width rendered tests cover stage → review → commit → resume with no horizontal overflow and accessible controls. - Focused behavioral tests and the full suite pass. ## Non-duplication evidence Historical issue/PR and commit review found #1382/#1383 only implement one suggestion per commit. No open/closed title or recent commit covers staging or atomically applying multiple reviewer suggestions in one file. ## API constraint discovered during implementation This Gitea 1.22 instance exposes only read operations for Git blob/tree/ref endpoints in its live Swagger contract. Multi-file atomic commits cannot be implemented truthfully through those endpoints, so this issue deliberately uses the supported single-file contents API and fails closed across file boundaries.
timmy self-assigned this 2026-08-25 06:53:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#1384
No description provided.