feat(ui): render the Changelog page as a typed release timeline - #672
Merged
Conversation
The Changelog page dumped each version's raw bullet strings into a card: no structure, no colour, a wall of text. The CLI renderer already exploits the changelog authoring contract (commands/changelog.py) -- typed prefixes, PR decorations, backtick spans, headline-first summaries -- and the web page now does the same: - notes collapse to their first sentence behind a typed badge (New / Fix / Change / BREAKING / ... in the CLI's own colour semantics), expandable per note or via an expand-all toggle, mirroring the CLI's default-summary + --full behaviour - (#NNN) prefix decorations become GitHub PR links - inline backticks render as code chips, matching the inline-code treatment used elsewhere in the UI - versions sit on a vertical timeline rail; the running version (from the shared /version query cache) gets a glowing node and a 'running now' pill, the newest entry a 'latest' pill Parsing lives in changelogNotes.ts with a vitest suite; the prefix list and sentence-boundary rules are ports of _PREFIX_RE and headline() and must stay in sync with them.
The abbreviation set dropped `no`, `al` and `inc` from _HEADLINE_ABBREVIATIONS and invented `incl` and `resp`, so a note carrying any of them split into a different first sentence on the Changelog page than under `kbagent changelog`. The trailing-token regex diverged the same way: `[\w.]+$` captures digits and underscores where _TRAILING_TOKEN is letters-only, so "kbagent_no." resolved to the whole token instead of "no" and missed the abbreviation lookup. Both are now exact ports, covered by a table test over every member of the Python set. All twelve cases were A/B'd against the real `headline()` and match.
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.
Why
The web UI's Changelog page dumped each version's raw bullet strings into a card — no structure, no colour, a wall of text (screenshot: before). The CLI renderer already exploits the changelog authoring contract from
commands/changelog.py(typedNew:/Fix:/BREAKING:prefixes,(#PR)decorations, inline backticks, headline-first summaries); the web page ignored all of it.What
--full. Sentence detection portsheadline()'s rules (no break inside0.57.0, no break aftere.g.)._PREFIX_STYLES): New green, Fix amber, Change blue, BREAKING/Security red, UX magenta, Note cyan, Internal/Tests/... dim.(#658, #664)prefix decorations become links to the GitHub PRs.["version"]query cache — no extra request) gets a glowing node and a running now pill, the newest entry a latest pill.Parsing lives in
web/frontend/src/changelogNotes.tswith a vitest suite (11 tests); the prefix list and sentence rules are ports of_PREFIX_REandheadline()and carry a keep-in-sync note. No Python surface touched;GET /changelogpayload unchanged.Testing
npm test— 64 passed (4 files), including the newchangelogNotes.test.tsnpm run build— tsc + vite cleankbagent serve --ui --ui-dist web/frontend/dist: light + dark mode, per-note expand, expand-all, PR link hrefs, running-version highlight