feat(release-notes): full plain-English changelog + clean update prompt - #66
Merged
Conversation
…rompt, trim release body The "what's new" text shown when the app offers an update comes from each GitHub release body, which the workflow already sources from CHANGELOG.md — but it looked bad and was incomplete. Fixed on three fronts: - Rewrote CHANGELOG.md as a complete, plain-English history of every release from 0.1.0 to 0.1.63, each with a short description of what it actually changed (traced from the tags/PRs). Corrected version numbers that had drifted from the real tags (0.1.50–0.1.56), moved the DRR input-stall fix out of a stale [Unreleased] to its real version (0.1.58), and gave each entry more concrete detail. [Unreleased] now describes this change, so it becomes the next release's notes; the keep-current workflow is documented in the file header. - The GitHub release appended a raw "Merge pull request #NN" list (generate_release_notes: true). Turned it off so the curated CHANGELOG section is the entire body. - The in-app update prompt is a plain TextBlock with no Markdown renderer, so it showed literal ##, **, - and [text](url). New ReleaseNotesFormatter.ToPlainText converts the notes to clean plain text (headings de-hashed, bold/italic/code markers stripped, bullets → •, links → text, blockquotes/rules removed, blank runs collapsed) — applied before display. 9 new ReleaseNotesFormatter tests; full suite green (621), build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment on lines
+29
to
+61
| foreach (var raw in lines) | ||
| { | ||
| var line = raw.TrimEnd(); | ||
|
|
||
| // Drop horizontal rules (---, ***, ___ on their own line). | ||
| if (Regex.IsMatch(line, @"^\s*([-*_])\1{2,}\s*$")) continue; | ||
|
|
||
| line = StripInline(line); | ||
|
|
||
| // Headings: keep the text, drop the leading #'s. | ||
| var heading = Regex.Match(line, @"^\s*#{1,6}\s+(.*)$"); | ||
| if (heading.Success) line = heading.Groups[1].Value.Trim(); | ||
|
|
||
| // Blockquotes: drop the leading '>' markers, keep the text. | ||
| line = Regex.Replace(line, @"^\s*>+\s?", ""); | ||
|
|
||
| // List bullets (-, *, +) become a real bullet glyph. | ||
| var bullet = Regex.Match(line, @"^(\s*)[-*+]\s+(.*)$"); | ||
| if (bullet.Success) | ||
| line = bullet.Groups[1].Value + "• " + bullet.Groups[2].Value; | ||
|
|
||
| if (line.Trim().Length == 0) | ||
| { | ||
| // Collapse runs of blank lines to a single separator. | ||
| if (++blankRun > 1) continue; | ||
| sb.Append('\n'); | ||
| } | ||
| else | ||
| { | ||
| blankRun = 0; | ||
| sb.Append(line).Append('\n'); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release notes shown when the app offers an update (the GitHub release body, sourced from
CHANGELOG.md) looked bad and were incomplete:[Unreleased]section that never got version-stamped), so releases 0.1.57–0.1.63 fell back to wrong/generic notes.TextBlockwith no Markdown renderer, so it showed literal##,**,-,[text](url).Fix
CHANGELOG.mdas a complete, plain-English history of every release from 0.1.0 → 0.1.63, each with a short description of what actually changed (traced from the tags/PRs). Corrected version numbers that had drifted from the real tags (0.1.50–0.1.56), and moved the ~30s input-stall (DRR) fix out of the stale[Unreleased]into its true version (0.1.58).[Unreleased]now describes this change, so it becomes the next release's notes; the keep-current flow is documented in the file header.generate_release_notes: false— the curated CHANGELOG section is now the entire release body (no raw PR dump).ReleaseNotesFormatter.ToPlainTextcleans Markdown to plain text for the update window (headings de-hashed, bold/italic/code stripped, bullets → •, links → text, blockquotes/rules removed, blank runs collapsed), applied before display.Tests
9 new
ReleaseNotesFormattertests. Full suite green (621), build clean (warnings-as-errors).🤖 Generated with Claude Code