feat: Improve PR comment UX - show resolved conflicts and new-conflict badges#50
Merged
Conversation
zkoppert
force-pushed
the
feat/improved-comment-ux
branch
from
March 20, 2026 22:29
95edbcf to
f897dfb
Compare
…badges - Add auto-update banner to PR comments so users know the comment is live - Show 🆕 badge on newly detected conflicts for visual distinction - Show resolved conflicts in a collapsed <details> section instead of silently removing them - Show 'All Merge Conflicts Resolved' message when all conflicts resolve - Enrich state fingerprints with PR display info (title, URL, author) so resolved conflicts can still render meaningful details - Track resolved conflicts in state file with 7-day TTL and pruning - Fix existing bug where unchanged conflicts were dropped from comments when only new/changed conflicts were passed to the comment builder - Pass all active conflicts to post_pr_comments() so every PR's comment shows its full conflict picture Closes #49 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
zkoppert
force-pushed
the
feat/improved-comment-ux
branch
from
March 20, 2026 22:29
f897dfb to
cfe8369
Compare
The blockquote syntax (>) looks off in PR comments. Italics render cleaner and are better suited for this context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Files are getting long. I've opened an issue to do a refactor after this merges (don't want this pr review to be any more painful than it has to be). |
jmeridth
approved these changes
Mar 21, 2026
jmeridth
left a comment
Collaborator
There was a problem hiding this comment.
Very nice. Easy to read code, good tests.
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.
Closes #49
What it does
Improves the PR comment experience by making the bot's comments more informative and transparent about how conflicts evolve over time.
Changes
Auto-update banner - Adds a note at the top of every comment: "🔄 This comment updates automatically as conflicts are detected and resolved." This sets expectations that the comment is live.
🆕 badge on new conflicts - Newly detected conflicts get a 🆕 indicator in the table. On the next run (if still present), the badge is removed. Gives authors a visual cue for what changed.
Collapsed resolved conflicts section - Instead of silently removing resolved conflicts, they're moved to a collapsed
<details>section with strikethrough formatting and the date they resolved. Preserves history without cluttering the main view.All-resolved message - When all conflicts for a PR are resolved, the comment updates to show "✅ All Merge Conflicts Resolved" with the resolved history.
Bug fix: unchanged conflicts no longer dropped - Previously,
post_pr_comments()only received new/changed conflicts. If a PR had 3 conflicts and only 1 was new, the comment update would show only that 1 conflict, dropping the other 2. Now all active conflicts are passed so every PR's comment shows its full picture.Known limitation
The 🆕 badge only persists until the next action run. If the action runs multiple times before the author checks the comment (e.g., hourly on weekdays), the badge will already be gone by the time they look. This is acceptable for now - the resolved section and banner still provide meaningful context about how conflicts evolved. A future improvement could address this with a notification bump reply (see #49 for discussion). Open to ideas on how we might solve this. 👂🏻
State file changes
ConflictFingerprintnow stores PR display info (title, URL, author) so resolved conflicts can render meaningful detailsresolved_conflictslist withresolved_attimestampsExample comment format
Active conflicts + resolved section
🔄 This comment updates automatically as conflicts are detected and resolved.
This PR may conflict with 2 other PR(s):
src/auth.py(L15-L20)src/app.rb(L10-L30)What to do: Review the overlapping changes and coordinate with @bob, @charlie to resolve conflicts.
✅ 1 previously resolved conflict
#100 (Fix typo)This is an automated notification from pr-conflict-detector.
Testing