fix(web): give release notes their own renderer - #228
Conversation
The update popover rendered release notes with the chat Markdown component. That component renders raw HTML as live DOM, cannot be mounted in a test (it resolves katex and mermaid workers, so the popover had to stub it and shipped unverified), and pulls katex, mermaid and shiki into a 440px panel. Release notes arrive in one narrow shape we generate ourselves, so render that shape directly: headings, bullets and paragraphs as real elements through Vue interpolation, which cannot contribute markup whatever upstream did to the body. `Built from <url>` leaves the list and becomes a footnote linking the short commit reference, and only when the URL is an actual web page. The scroll region is now a tab stop, since notes that outgrow the panel could not be scrolled without a pointer, and the fade over the last rows appears only when something is actually below it.
|
Important Review skippedToo many files! This PR contains 102 files, which is 2 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (102)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @pymodel/pythinker-desktop@0.3.9 ### Patch Changes - [#228](#228) [`62e2e75`](62e2e75) Thanks [@elkaix](https://github.com/elkaix)! - Lay out the update release notes as a readable list with the build reference as a footnote, and show when there is more to scroll. - [#226](#226) [`e9ebda6`](e9ebda6) Thanks [@elkaix](https://github.com/elkaix)! - Show the changelog for the new version in the update dialog instead of a build stamp with raw HTML tags. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Update dialogs now display the new version’s changelog instead of a raw build stamp or HTML markup. - Release notes are presented as a readable list with the build reference shown as a footnote. - A scroll indicator appears when additional release-note content is available. - **Release** - Desktop application updated to version 0.3.9. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Related Issue
No issue — follow-up to #226, which fixed the release-notes content. This fixes how that content is presented.
Problem
The update popover rendered release notes with the chat
Markdowncomponent. Three problems, in order of weight:markstream-vueagainst<img src=x onerror=...>,<script>,<b>and<i>shows<b>/<i>coming through as real elements; it strips scripts and event handlers, but it is a sanitizing HTML renderer, not a text renderer. fix(desktop): show the changelog in the update dialog #226 had to escape angle brackets inupdater.tsspecifically to stay inert for it.update-dialog.test.tsstubbed it, and this user-facing surface shipped with its rendering entirely unverified.On top of that, the generated body ends with
Built from <url>., which read as a stray sentence at the end of the release notes.What changed
ReleaseNotes.vuerenders the one narrow shape the release generator produces:Built from <url>becomes a footnote under a rule, linking the short commit reference — and only when the URL is an actual web page, since a release body is remote input thatwill-navigatehands toshell.openExternal.role="group"): notes that outgrow the panel could not be scrolled without a pointer.min-width: 0+overflow-wrap: anywhere+overflow-x: clip, so a long commit URL wraps instead of being silently clipped by theoverflow: hiddenshell.Verified in a real browser (built bundle, faked desktop bridge): no horizontal overflow, fade on with content below and off at the end, both light and dark.
The chat renderer is untouched and still used by chat, plan, goal, approval, question and file-preview surfaces.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Tests
apps/pythinker-web/test/release-notes.test.tscovers the generated body, heading grouping, wrapped bullets, provenance extraction and short-ref labelling, a rejected non-web scheme, the escaped-markup payload from #226, and the empty state.update-dialog.test.tsno longer stubs the renderer — that is the change that makes this surface real.app-shell-contracts.test.tsnow asserts the chat renderer is not imported by the sidebar.1012 web tests, typecheck and lint all green;
dist-webrebuilt and restaged in the same commit.