Skip to content

ci: color added/deleted LoC counts in PR summary - #14839

Merged
nwparker merged 7 commits into
stablyai:mainfrom
nwparker:nwparker/test-loc-colors
Aug 16, 2026
Merged

nwparker merged 7 commits into
stablyai:mainfrom
nwparker:nwparker/test-loc-colors

Conversation

@nwparker

@nwparker nwparker commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Follow-up to #14738: the test vs non-test LoC table now uses normal numbers with only the sign colored, via GitHub's LaTeX math.

  • + signs render green (#1a7f37), − signs render red (#cf222e)
  • The digits stay in the normal body font
  • Net sign is green when positive, red when negative; zero stays plain

Example

Files Added Deleted Net
Test 2 $\color{#1a7f37}{+}$​175 $\color{#cf222e}{−}$​12 $\color{#1a7f37}{+}$​163
Prod 4 $\color{#1a7f37}{+}$​350 0 $\color{#1a7f37}{+}$​350

Testing

  • pnpm exec vitest run --config config/vitest.config.ts config/scripts/pr-test-loc-summary.test.mjs (9 passed)
  • oxlint clean

@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d9a83fd-acef-4ef1-b491-3989ddb7cc73

📥 Commits

Reviewing files that changed from the base of the PR and between 8b76aed and 5f2b15b.

📒 Files selected for processing (2)
  • .github/scripts/pr-test-loc-table.mjs
  • config/scripts/pr-test-loc-summary.test.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/scripts/pr-test-loc-table.mjs
  • config/scripts/pr-test-loc-summary.test.mjs

Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The LoC table formatter renders positive values with added-line coloring and negative values with deleted-line coloring. Zero values remain unstyled. Missing added and deleted counts default to zero. Tests verify colorized additions, deletions, and net totals in direct rendering, rendered tables, and merged CLI output.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the change and testing, but it omits required sections including ELI5, Why, Linked Issue, Visual Proof, Review, Checklist, and Author. Add the missing required sections and include a linked issue, visual proof or N/A with a reason, review details, checklist status, and author information.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: coloring added and deleted LoC counts in PR summaries.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit ac48d75 into stablyai:main Aug 16, 2026
44 checks passed
@nwparker nwparker mentioned this pull request Aug 16, 2026
2 tasks done
AmethystLiang pushed a commit that referenced this pull request Aug 17, 2026
* ci: color added/deleted LoC counts in PR summary

* ci: use GitHub color-swatch dots for added/deleted LoC counts

* ci: color LoC counts with LaTeX textsf

* ci: bold LoC counts; render zero in white

* ci: render LoC counts large bold sans-serif

* ci: use bold math font for LoC counts

* ci: color only the + and - signs on LoC counts
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* ci: color added/deleted LoC counts in PR summary

* ci: use GitHub color-swatch dots for added/deleted LoC counts

* ci: color LoC counts with LaTeX textsf

* ci: bold LoC counts; render zero in white

* ci: render LoC counts large bold sans-serif

* ci: use bold math font for LoC counts

* ci: color only the + and - signs on LoC counts
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