Skip to content

Commit 62e2e75

Browse files
authored
fix(web): give release notes their own renderer (#228)
## 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 `Markdown` component. Three problems, in order of weight: 1. **It renders raw HTML as live DOM.** Mounting `markstream-vue` against `<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. #226 had to escape angle brackets in `updater.ts` specifically to stay inert for it. 2. **It cannot be mounted in a test** — it resolves katex and mermaid workers and throws. So `update-dialog.test.ts` stubbed it, and this user-facing surface shipped with its rendering entirely unverified. 3. **It drags katex, mermaid and shiki** into a 440px panel that shows a few bullets. 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.vue` renders the one narrow shape the release generator produces: - **Headings, bullets and paragraphs as real elements**, bound through Vue interpolation. Markup cannot be contributed by a release body no matter what upstream did to it, which retires the coupling in point 1. Escaped angle brackets are decoded back for display, so the reader sees the characters the author typed. - **`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 that `will-navigate` hands to `shell.openExternal`. - **Wrapped bullets join into one item**; a thematic rule that no longer separates anything is dropped. - **The scroll region is a tab stop** (`role="group"`): notes that outgrow the panel could not be scrolled without a pointer. - **The fade over the last rows is conditional** — it appears only when content is actually below, and clears at the end of the list. An unconditional fade claims there is more to read when there is not. - **Overflow**: `min-width: 0` + `overflow-wrap: anywhere` + `overflow-x: clip`, so a long commit URL wraps instead of being silently clipped by the `overflow: hidden` shell. 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 - [x] I have read the CONTRIBUTING document. - [ ] I have linked a related issue — follow-up to #226, no separate issue. - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update. ### Tests `apps/pythinker-web/test/release-notes.test.ts` covers 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.ts` **no longer stubs the renderer** — that is the change that makes this surface real. `app-shell-contracts.test.ts` now asserts the chat renderer is not imported by the sidebar. 1012 web tests, typecheck and lint all green; `dist-web` rebuilt and restaged in the same commit.
1 parent e9ebda6 commit 62e2e75

102 files changed

Lines changed: 703 additions & 306 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": patch
3+
---
4+
5+
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.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "aa9ad464f74ddd042d5435d29ed27bac364c25274ede0eade5d39cc7593d0eb6",
3-
"sourceFileCount": 404
2+
"sourceHash": "dc4674a73ab1b451eb14a58ba78d954663b5e98dc04ee24b45266716c66a52bb",
3+
"sourceFileCount": 405
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-DvVwTcrb.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-C2vsKEwS.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-DqkqPAyE.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-BxjfRQFt.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-DBHeeCqj.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-DKC-5Acf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Aw-KZNRM.js renamed to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Cfi81rrz.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/arc-uQkvEBHU.js renamed to apps/pythinker-code/dist-web/assets/arc-Etqrqc_j.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-D6d_uvof.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-B06L70xf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)