Repository navigation
Preserve concurrent PR comment changes when thread resolution fails - #35315
Merged
Merged
Conversation
4 of 6 tasks
7 of 9 tasks
Drop duplicate false/throw variants, the cleared-cache and paired-source cases, and the helper case already covered by the remaining lib tests.
OrcaWin
marked this pull request as ready for review
October 29, 2026 00:55
[Medium impact] The reviewed changes appear safe to merge. SummaryFailed thread updates now restore only
No actionable issues were found. Tests were reviewed, not run. OrcaWin explicitly deferred overlapping operations on the same thread to a separate fix. OrcaWin also disclosed that the full affected gate and rendered Electron checks remain pending.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A failed Resolve or Unresolve action could erase a reply that had already posted successfully or leave it styled differently from the rest of its thread. Restore the thread’s resolved state while keeping the current conversation.
What Changed
resolveReviewThreadcaptures only comments in the thread it changes. If the request fails, existing captured IDs recover their own previousisResolvedvalues. New current members of that thread inherit its first known captured resolved state, including replies whose REST payload omitsisResolved. Current content, reactions, ordering, changes to other threads, and list membership stay intact. Removed rows are not reinserted, and a cleared cache entry stays absent.The existing Checks panel thread-resolution functions now live in
lib/pr-comment-thread-resolution.ts, so the store and panel use one implementation. The shared restore function preserves other comment fields for panel rollbacks too.Why
Both the Checks panel’s manual Resolve action and AI acknowledgement path call the GitHub store action. That action previously captured the entire PR comment array, optimistically toggled one thread, and replaced the cache with the entire old array on a false result or transport error. A successful reply, reaction, or other-thread resolution completed during that wait was discarded locally. A cleared entry could also be recreated with the obsolete snapshot.
Deterministic production-store reproduction: start a deferred thread resolution, post a reply successfully, then fail the resolution. Before this change the cache shrinks from two comments to one. The target
origin/mainsource still has the whole-array rollback, and targeted open-PR searches found no duplicate.Linked Issue
Found during the authorized UX and state correctness audit; no existing issue.
Visual Proof
Pending. No component markup, layout, styling, or new interaction is introduced. Deferred API responses provide deterministic data-ordering evidence. Rendered Electron validation has not run for this draft.
Testing
66e2d398278.pnpm tc:webpassed.isResolved; paired-source coverage verifies local-cache isolation.git diff --checkpassed.ORCA_BACKGROUND_LAUNCH=1and a disk-backed temporary directory.Review
The action keeps the same source-scoped cache keys and local/runtime RPC contracts. The shared restore maps over the current list, so it never inserts captured comments or rewinds fields unrelated to resolution.
Same-thread overlapping resolve/unresolve ordering remains outside this PR. A separate confirmed case exists in the default triage panel: regrouping remounts the control, allowing a second operation while the first is pending; two failures can restore a speculative snapshot. A separate shared pending-operation fix is being prepared. This draft does not claim that case is fixed, and its full affected aggregate remains pending.
Agent skill upstream boundary
Notes
No platform-specific behavior, native process changes, or new remote protocol is introduced. The same renderer action serves local and paired sources; paired-source failure isolation is covered. GitLab’s panel rollback also uses the shared field-scoped restore, while its host request path is unchanged. No folder/worktree assumption is introduced. Mobile has no caller of this renderer-only action.
Checklist