Skip to content

feat/CU 86ewywc0n add staleness tracking to html reporter#4

Merged
tonytonyjan merged 2 commits into
masterfrom
feat/CU-86ewywc0n_add-staleness-tracking-to-html-reporter
Mar 18, 2026
Merged

feat/CU 86ewywc0n add staleness tracking to html reporter#4
tonytonyjan merged 2 commits into
masterfrom
feat/CU-86ewywc0n_add-staleness-tracking-to-html-reporter

Conversation

@tonytonyjan
Copy link
Copy Markdown
Collaborator

@tonytonyjan tonytonyjan commented Mar 17, 2026

Commits

  • refactor: simplify HTML reporter template for readability
  • feat: add staleness tracking to HTML reporter

Screenshots

Before After
Screenshot 2026-03-17 at 16 44 14
Screen.Recording.2026-03-17.at.16.44.54.mov
Screenshot 2026-03-17 at 16 44 18
Screen.Recording.2026-03-17.at.16.45.54.mov

Review Tips

  1. The first commit is refactored by claude code without adding/removing any feature and updating UI. You should not focus on reviewing this commit. The purpose of this process is to generate a simpler, more readable and maintainable source code for AI to read in future commits.
  2. You should focus on the commit feat: add staleness tracking to HTML reporter.

Testing on your local environment

Feel free to make use of the file pstore.zip to verify the feature.

bundle exec bin/cover_rage > cover_rage.html

Replace hidden divs with <template> elements, extract helper functions,
use insertRow/insertCell for table building, and switch to hashchange
event for correct hash-based routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@choznerol choznerol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

praise: the commits are organized and easy to review 🙏

let staleThresholdDays = 30;

function getStaleThreshold(el) {
const input = el.querySelector("input[type=number]");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

Stale threshold input has duplicate IDs across templates — #stale-threshold in tmpl-index and #stale-threshold-file in tmpl-file. The getStaleThreshold function uses el.querySelector("input[type=number]") which scopes correctly, but the IDs are inconsistent. Consider using the same ID in both templates (since only one is in the DOM at a time) or removing IDs entirely since they're not used for selection.

Suggested change
const input = el.querySelector("input[type=number]");
const input = el.querySelector("input#stale-threshold");

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've made the change as you suggested!

Copy link
Copy Markdown

@james-yu-cardinalblue james-yu-cardinalblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 🤩

Add configurable stale threshold input, staleness percentage column,
stale line count, and blue highlighting for stale lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonytonyjan tonytonyjan force-pushed the feat/CU-86ewywc0n_add-staleness-tracking-to-html-reporter branch from 410c5d2 to ac87cf5 Compare March 18, 2026 06:40
@tonytonyjan tonytonyjan merged commit 95d7f3d into master Mar 18, 2026
4 checks passed
@tonytonyjan tonytonyjan deleted the feat/CU-86ewywc0n_add-staleness-tracking-to-html-reporter branch May 4, 2026 06:06
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.

3 participants