Commit 62e2e75
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
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- components
- i18n/locales/en
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments