Skip to content

Redesign PR comments with visual progress bars and status icons#4

Merged
Affanmir merged 3 commits intomainfrom
feat/redesign-pr-comments
Apr 8, 2026
Merged

Redesign PR comments with visual progress bars and status icons#4
Affanmir merged 3 commits intomainfrom
feat/redesign-pr-comments

Conversation

@Affanmir
Copy link
Copy Markdown
Owner

@Affanmir Affanmir commented Apr 8, 2026

Summary

  • Redesign PR comment templates following Material Design principles for better visual hierarchy and scannability
  • Add Unicode progress bar (████████████████░░░░) showing coverage/quality percentage at a glance
  • Add per-file colored status icons: 🟢 (≥90%), 🟡 (≥70%), 🔴 (<70%)
  • Replace vague "Meets/Below threshold" wording with clear Passed / Failed status
  • Add emoji icons to metrics table rows for quick visual scanning
  • Use distinct report headers: 🛡️ for coverage, 🔬 for quality
  • Cleaner footer with marketplace link

Before vs After

Before:

## ✅ Diff Coverage: 82.0%
> ✔️ Meets threshold of 80%
| Metric | Value |
| Coverage on diff lines | 82.0% |
| Lines changed | 50 |

After:

### 🛡️  Diff Coverage Report
**82.0%**  `████████████████░░░░`
> ✅  Passed — meets threshold of 80%
| 📏 | Lines in diff | 50 |
| 🔍 | Lines uncovered | 9 |
| 📁 | Files changed | 3 |

Files Changed

  • src/comment.py — Added _progress_bar() and _status_icon() Jinja2 filters
  • src/outputs.py — Same filters for step summary rendering
  • templates/comment_coverage.md.j2 — Redesigned coverage PR comment
  • templates/comment_quality.md.j2 — Redesigned quality PR comment
  • templates/step_summary.md.j2 — Redesigned step summary
  • tests/test_comment.py — Updated assertions for new wording
  • README.md — Updated comment previews to match new design

Test plan

  • All 75 tests pass
  • Ruff lint clean
  • Ruff format clean
  • Verify PR comment renders correctly on a real PR
  • Verify step summary renders correctly in Actions UI

🤖 Generated with Claude Code

Affanmir and others added 2 commits April 8, 2026 18:27
- Add Unicode progress bar (████░░░░) showing coverage at a glance
- Add per-file colored status icons (🟢 ≥90%, 🟡 ≥70%, 🔴 <70%)
- Replace "Meets/Below threshold" with clear "Passed/Failed" status
- Use Material Design-inspired layout with visual hierarchy
- Add emoji icons to metrics table for scannability
- Use distinct headers for coverage (🛡️) and quality (🔬) modes
- Cleaner footer with marketplace link
- Update README previews to match new comment design
- Update tests for new template wording

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add pull-requests: write and checks: write permissions
- Enable post-comment and create-annotations on coverage mode job
- The action now posts its own coverage report on every PR

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

100.0%

████████████████████100.0% on changed lines

0 lines changed   0 uncovered   0 files

 📋 Full diff-cover report

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

🛡️ diff-cover-action

- Hero coverage badge (for-the-badge style) with dynamic color
- Threshold pass/fail badge (flat-square style)
- Compact inline metrics replacing table layout
- Badge color scale: brightgreen → green → yellowgreen → yellow → orange → red
- Progress bar + badge combo for maximum visual density
- Updated README previews and test assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Affanmir Affanmir merged commit 8e5f9d2 into main Apr 8, 2026
5 checks passed
@Affanmir Affanmir deleted the feat/redesign-pr-comments branch April 8, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant