Skip to content

✨ Feature: Enhance What's New with Commit Links and Summary - #93

Merged
alehar9320 merged 3 commits into
mainfrom
feat/whats-new-enhancements-14336017390907814763
Apr 11, 2026
Merged

alehar9320 merged 3 commits into
mainfrom
feat/whats-new-enhancements-14336017390907814763

Conversation

@alehar9320

@alehar9320 alehar9320 commented Apr 10, 2026 •

Copy link
Copy Markdown
Owner

This PR enhances the 'What's New' page to provide better visibility into recent development activity.

Key changes:

  • Commit Linking: Release notes now automatically detect 7-character commit hashes and link them to the corresponding commit on GitHub.
  • Automated Summary: A new 'Recent Highlights' section at the top provides an AI-parseable and user-friendly TL;DR of the most significant recent updates, prioritizing features, fixes, and persona-driven improvements.
  • Robustness: Comprehensive unit tests added to src/utils/github-releases.test.ts ensure stable parsing across various release body formats.
  • Style: Integrated glassmorphic styling for the summary box and theme-aware commit tags to maintain design consistency.

PR created automatically by Jules for task 14336017390907814763 started by @alehar9320

Summary by CodeRabbit

  • New Features

    • Added a "Recent Highlights" TL;DR that surfaces prioritized release items.
    • Release bullets with commit hashes are shown as linked, code-styled commit references followed by the message.
  • Tests

    • Updated unit tests to assert structured parsing of release bullets, including hash-aware items, mixed content, and fallback plain-message behavior.
  • Style

    • Enhanced styling for commit-hash links with dark-theme support.

- Implement 7-character commit hash parsing with links to GitHub.
- Add "Recent Highlights" summary box prioritizing features and fixes.
- Add unit tests for release normalization and commit parsing.
- Refine styling for commit tags and summary layout.

Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
🔵 In progress
View logs
me 1b0dc34 Commit Preview URL

Branch Preview URL
Apr 11 2026, 07:38 AM

@coderabbitai

coderabbitai Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef79357b-b4d6-42cd-9dae-0a22b613a039

📥 Commits

Reviewing files that changed from the base of the PR and between 1e0a1a0 and 1b0dc34.

📒 Files selected for processing (2)
  • src/__tests__/github-releases.test.ts
  • src/utils/github-releases.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/utils/github-releases.ts

📝 Walkthrough

Walkthrough

Parses release markdown into structured ReleaseItem objects (message, optional 7-char commit hash and URL), updates tests to expect objects, and adds client-side "Recent Highlights" extraction plus commit-hash link rendering and related styling on the whats-new page.

Changes

Cohort / File(s) Summary
Release parsing utils
src/utils/github-releases.ts
Added REPO_URL export and ReleaseItem type; introduced parseReleaseItem(line); changed splitReleaseBody(body) to return ReleaseItem[], strip bullet markers, ignore non-bullet lines, detect 7-char hex commit hashes and derive commit URLs.
Tests
src/__tests__/github-releases.test.ts
Reworked unit tests to expect ReleaseItem objects: validates bullet markers (-, *, +), ignores non-bulleted lines after headings, and checks commit-hash parsing + URL generation and mixed-content behavior.
Whats-new page + styling
src/pages/whats-new.astro
Added client-side logic to build a "Recent Highlights" TL;DR by calling splitReleaseBody, filtering prioritized keywords, taking top 3 (fallback first 3), and replacing data-release-summary children. Modified release-item rendering to show linked code-style commit hashes when hash/url exist. Added .commit-hash CSS and dark-theme override.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Browser
participant Script as "whats-new script"
participant GitHub as "GitHub Releases API"
participant Parser as "splitReleaseBody / parseReleaseItem"
participant DOM as "Whats-new DOM"
Browser->>Script: page load -> init fetchGitHubReleases()
Script->>GitHub: GET releases JSON
GitHub-->>Script: releases payload
Script->>Parser: splitReleaseBody(release.body)
Parser-->>Script: ReleaseItem[] (message, optional hash/url)
Script->>Script: filter for priority keywords, select top 3 (fallback)
Script->>DOM: replace data-release-summary children (render linked hashes when present)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main enhancements: commit links and an automated summary for the What's New page.

✏️ 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 feat/whats-new-enhancements-14336017390907814763

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

@codecov

codecov Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/__tests__/github-releases.test.ts (1)

72-94: Add a regression case for headings plus * bullets.

These tests only prove the - ... happy path. Please add one case like ## What's Changed\n* 8acc628 ...\n* Plain message so the suite catches the exact markdown shape /whats-new consumes from GitHub releases.

🧪 Suggested test addition
+  it('ignores headings and parses GitHub-style bullets', () => {
+    const body = "## What's Changed\n* 8acc628 ✍️ Scribe: Strategic Copy Optimization\n* Plain message";
+
+    expect(splitReleaseBody(body)).toEqual([
+      {
+        hash: '8acc628',
+        message: '✍️ Scribe: Strategic Copy Optimization',
+        url: 'https://github.com/alehar9320/astro-cloudflare-personal-website/commit/8acc628',
+      },
+      {
+        message: 'Plain message',
+      },
+    ]);
+  });

Based on learnings, GitHub releases and tags are the canonical source for versioning and changelog history.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/__tests__/github-releases.test.ts` around lines 72 - 94, Add a regression
test that covers headings plus asterisk bullets by adding an it() case that
calls splitReleaseBody with a body like "## What's Changed\n* 8acc628 ✍️ Scribe:
Strategic Copy Optimization\n* Plain message" and assert it returns the same
parsed items as the existing dash-bullet test (first item with hash '8acc628',
message '✍️ Scribe: Strategic Copy Optimization', url built for that hash, and
second item with message 'Plain message'); ensure the test references the
splitReleaseBody helper so the parser handles '*' bullets and headings the same
as '-' bullets.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/utils/github-releases.ts`:
- Around line 89-114: The parser treats any non-empty line as a ReleaseItem and
only strips "- ", causing headings like "## ..." or other list markers ("*",
"+") to become changelog entries and preventing commit-hash parsing; update
splitReleaseBody and parseReleaseItem so splitReleaseBody first ignores heading
lines starting with "#" and removes common markdown list markers (e.g., "-",
"*", "+") from the start of each line before trimming, then call
parseReleaseItem; inside parseReleaseItem ensure you normalize the incoming line
(with markers removed) before running the hash regex so lines like "* 8acc628
..." are parsed into a ReleaseItem with hash/url and heading lines are skipped
entirely (no ReleaseItem returned).

---

Nitpick comments:
In `@src/__tests__/github-releases.test.ts`:
- Around line 72-94: Add a regression test that covers headings plus asterisk
bullets by adding an it() case that calls splitReleaseBody with a body like "##
What's Changed\n* 8acc628 ✍️ Scribe: Strategic Copy Optimization\n* Plain
message" and assert it returns the same parsed items as the existing dash-bullet
test (first item with hash '8acc628', message '✍️ Scribe: Strategic Copy
Optimization', url built for that hash, and second item with message 'Plain
message'); ensure the test references the splitReleaseBody helper so the parser
handles '*' bullets and headings the same as '-' bullets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bcbfbaa3-96fc-422d-92ac-3557acc1607f

📥 Commits

Reviewing files that changed from the base of the PR and between 185bb47 and 9121885.

📒 Files selected for processing (3)
  • src/__tests__/github-releases.test.ts
  • src/pages/whats-new.astro
  • src/utils/github-releases.ts

Comment thread src/utils/github-releases.ts
@codecov

codecov Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

Affected Assets, Files, and Routes:

view changes for bundle: molecular-mars-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/sequence_h1zSTUDk.mjs (New) 161.76kB 161.76kB 100.0% 🚀
chunks/_virtual_astro_session-driver_CIHGaYEn.mjs (New) 3.53kB 3.53kB 100.0% 🚀
chunks/_virtual_astro_server-island-manifest_BmHhUszv.mjs (New) 759 bytes 759 bytes 100.0% 🚀
chunks/noop-entrypoint_CoDQxwx9.mjs (New) 636 bytes 636 bytes 100.0% 🚀
chunks/sequence_CmhXOqaY.mjs (Deleted) -161.76kB 0 bytes -100.0% 🗑️
chunks/_virtual_astro_session-driver_CKIRq0Za.mjs (Deleted) -3.53kB 0 bytes -100.0% 🗑️
chunks/_virtual_astro_server-island-manifest_DDfovlC0.mjs (Deleted) -759 bytes 0 bytes -100.0% 🗑️
chunks/noop-entrypoint_C8ExlWIY.mjs (Deleted) -636 bytes 0 bytes -100.0% 🗑️

@alehar9320

Copy link
Copy Markdown
Owner Author

@jules Verify each finding against the current code and only fix it if needed.

In @src/utils/github-releases.ts around lines 89 - 114, The parser treats any
non-empty line as a ReleaseItem and only strips "- ", causing headings like "##
..." or other list markers ("", "+") to become changelog entries and preventing
commit-hash parsing; update splitReleaseBody and parseReleaseItem so
splitReleaseBody first ignores heading lines starting with "#" and removes
common markdown list markers (e.g., "-", "
", "+") from the start of each line
before trimming, then call parseReleaseItem; inside parseReleaseItem ensure you
normalize the incoming line (with markers removed) before running the hash regex
so lines like "* 8acc628 ..." are parsed into a ReleaseItem with hash/url and
heading lines are skipped entirely (no ReleaseItem returned).

- Add prioritized "Recent Highlights" summary box at the top of the page.
- Improve changelog parsing to support multiple list markers (-, *, +) and ignore headers.
- Automatically link 7-character commit hashes to the GitHub repository.
- Ensure consistent glassmorphic styling in light and dark modes.
- Add comprehensive unit tests for new parsing logic.

Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/__tests__/github-releases.test.ts`:
- Around line 72-80: The test for splitReleaseBody is asserting that a non-list
"Plain line" becomes a changelog item, which contradicts the intended “only
valid list items” behavior; update the test in the it block that uses
splitReleaseBody to remove the { message: 'Plain line' } expectation (i.e., only
assert items for '- feat: one', '* fix: two', '+ docs: three') and/or add a
separate test that explicitly asserts non-list lines are ignored; reference
splitReleaseBody in the test to locate and change the expected output
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df52511c-5479-4a0e-96cf-277740b39ebc

📥 Commits

Reviewing files that changed from the base of the PR and between 9121885 and 1e0a1a0.

📒 Files selected for processing (2)
  • src/__tests__/github-releases.test.ts
  • src/utils/github-releases.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/utils/github-releases.ts

Comment thread src/__tests__/github-releases.test.ts
@alehar9320

Copy link
Copy Markdown
Owner Author

@jules Verify each finding against the current code and only fix it if needed.

In @src/__tests__/github-releases.test.ts around lines 72 - 80, The test for
splitReleaseBody is asserting that a non-list "Plain line" becomes a changelog
item, which contradicts the intended “only valid list items” behavior; update
the test in the it block that uses splitReleaseBody to remove the { message:
'Plain line' } expectation (i.e., only assert items for '- feat: one', '* fix:
two', '+ docs: three') and/or add a separate test that explicitly asserts
non-list lines are ignored; reference splitReleaseBody in the test to locate and
change the expected output accordingly.

@google-labs-jules

Copy link
Copy Markdown
Contributor

@jules Verify each finding against the current code and only fix it if needed.

In @src/__tests__/github-releases.test.ts around lines 72 - 80, The test for
splitReleaseBody is asserting that a non-list "Plain line" becomes a changelog
item, which contradicts the intended “only valid list items” behavior; update
the test in the it block that uses splitReleaseBody to remove the { message:
'Plain line' } expectation (i.e., only assert items for '- feat: one', '* fix:
two', '+ docs: three') and/or add a separate test that explicitly asserts
non-list lines are ignored; reference splitReleaseBody in the test to locate and
change the expected output accordingly.

I have updated splitReleaseBody to strictly require list markers (-, *, or +) at the start of trimmed lines. I also updated the tests in src/__tests__/github-releases.test.ts to remove the expectation for 'Plain line' and added a new test case to ensure non-list lines and headers are ignored as requested.

- Update `splitReleaseBody` to only accept lines starting with -, *, or +.
- Update unit tests to verify non-list lines and headers are ignored.
- Address PR feedback regarding "Plain line" behavior.

Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>
@alehar9320
alehar9320 merged commit 9aec97c into main Apr 11, 2026
12 checks passed
@alehar9320
alehar9320 deleted the feat/whats-new-enhancements-14336017390907814763 branch April 11, 2026 10:13
@coderabbitai coderabbitai Bot mentioned this pull request Apr 11, 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.

1 participant