Skip to content

feat: changelog — render markdown links, collapse older releases, fix date parsing#83

Merged
nitrocode merged 2 commits into
mainfrom
copilot/update-changelog-display
Apr 26, 2026
Merged

feat: changelog — render markdown links, collapse older releases, fix date parsing#83
nitrocode merged 2 commits into
mainfrom
copilot/update-changelog-display

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

Changelog items were displaying raw markdown syntax ([#79](url)) as literal text, and all releases were rendered at once making the tab overwhelming.

Changes

Markdown link rendering (src/js/08-static-renders.js)

  • Added mdLinksToHtml() that converts [text](url) patterns to <a> tags; only https?:// URLs are linked, everything else falls back to escaped text

Truncated display with expand/collapse (src/js/08-static-renders.js, styles/content-pages.css)

  • Only the latest release renders expanded by default
  • Older releases hidden behind a "Show N older releases ↓" toggle button
  • Each release header gets a "View on GitHub ↗" link for quick access to full release notes

Date parsing fix (scripts/build-changelog.js)

  • Release-please writes ## [1.5.0](url) (2026-04-26) rather than ## [1.5.0] - 2026-04-26; the regex now handles both formats, so dates were previously always null

Tests (tests/script.test.js)

  • 6 new unit tests covering: link rendering, non-https URL safety (no href="javascript:"), button presence, expand/collapse toggle, and single-release edge case

Example of what a changelog item now looks like rendered:

add anchor links ([#79](…)) ([322f8f5](…))
→ add anchor links <a href="…">#79</a> <a href="…">322f8f5</a>

Summary by CodeRabbit

  • New Features

    • Added collapsible "older releases" section in changelog with toggle button for better organization.
    • Improved markdown link handling for GitHub references.
    • Enhanced changelog parsing to support additional format variants.
  • Style

    • Added styling for changelog UI elements including GitHub links and show more button.
  • Tests

    • Expanded test coverage for changelog rendering and link conversion behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

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: d3bc0905-39ef-4f73-ac63-3fc4df6e857d

📥 Commits

Reviewing files that changed from the base of the PR and between 9da8e57 and 1796b22.

📒 Files selected for processing (4)
  • scripts/build-changelog.js
  • src/js/08-static-renders.js
  • styles/content-pages.css
  • tests/script.test.js

📝 Walkthrough

Walkthrough

Fool, listen up! This PR be fixing up the changelog parsing to recognize both Keep-a-Changelog and release-please formats with optional URLs and flexible date placement! And I pity the fool who don't appreciate the new changelog rendering with markdown link support, a toggle for older releases, and fresh CSS styling to make it look fly!

Changes

Cohort / File(s) Summary
Changelog Parsing
scripts/build-changelog.js
Extended regex pattern to recognize both Keep-a-Changelog and release-please header variants, supporting optional (url) and flexible date placement (after dash or in parentheses), with date field falling back to null if neither date format matches.
Changelog Rendering
src/js/08-static-renders.js
Introduced mdLinksToHtml helper to safely convert markdown inline links (https?://) to HTML anchors, and buildReleaseHtml to centralize release card generation. Refactored renderChangelog() to display only latest release with toggle button and collapsible older releases container.
Changelog Styling
styles/content-pages.css
Added CSS classes for GitHub links (muted appearance with hover transitions), changelog item anchors (accent-based styling), show-more toggle (dashed border, mono typography), and older releases container (flex layout with gap spacing).
Changelog Tests
tests/script.test.js
Replaced script containment check with markdown link rendering tests covering PR/commit link conversion to GitHub anchors, javascript: link prevention, and older releases toggle behavior (button visibility, container state, repeated click handling).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the three main changes: markdown link rendering, older release collapsing, and date parsing fixes—all of which are present and documented in the changeset.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/update-changelog-display

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

@nitrocode nitrocode marked this pull request as ready for review April 26, 2026 16:41
@nitrocode nitrocode self-requested a review as a code owner April 26, 2026 16:41
@github-actions
Copy link
Copy Markdown
Contributor

👁️ PR Preview

🚀 Open Preview

Deployed from commit 1796b22 · Updates on every push to this PR
(Preview is removed automatically when the PR is closed.)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9da8e57) to head (1796b22).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #83   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          242       242           
  Branches       109       109           
=========================================
  Hits           242       242           
Flag Coverage Δ
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9da8e57...1796b22. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nitrocode nitrocode merged commit 875f272 into main Apr 26, 2026
10 checks passed
@nitrocode nitrocode deleted the copilot/update-changelog-display branch April 26, 2026 16:53
github-actions Bot added a commit that referenced this pull request Apr 26, 2026
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.

2 participants