Typeset workspace prose with Justif - #7
Conversation
Markdown paragraphs in the transcript and discussion are now set with Knuth-Plass line breaking, TeX hyphenation, hanging punctuation and glyph protrusion (Justif, MIT). Streaming turns stay ragged until they settle so text does not reflow under the reader; teasers and labels keep the browser's `text-wrap: pretty`, headings balance. - Prose is keyed by content so Justif and React never edit the same nodes - Justified blocks disable overflow-wrap emergency breaks, which were undoing planned breaks around inline code - Justif's license joins the bundled UI license texts - docs/design/typesetting.md explains the boundaries and next surfaces
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Line 129 in ae3fea6
When a provider streams agent_thought_chunk updates and the user expands the reasoning disclosure during the active turn, this Prose defaults to settled=true, so every chunk remounts the content and reruns Justif. Unlike the markdown branch above, this makes the visible text continually reflow while streaming; pass the same active-turn settled flag here.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .typeset code { | ||
| hyphens: none; | ||
| -webkit-hyphens: none; | ||
| overflow-wrap: normal; |
There was a problem hiding this comment.
Preserve emergency wrapping for long inline code
When settled Markdown contains an inline code token longer than the available line, this higher-specificity rule overrides the existing code { overflow-wrap: anywhere } fallback while also disabling hyphenation. Such a token cannot wrap, and the transcript's .contribution-content container uses overflow: hidden, so its tail is clipped on narrow panes; retain an emergency wrapping path for unbreakable code that Justif cannot set.
Useful? React with 👍 / 👎.
What
Markdown paragraphs in the transcript and discussion are set with Justif (MIT): Knuth–Plass line breaking over the whole paragraph, TeX hyphenation, punctuation hung into the margin, glyph protrusion at the edges. The browser's one-line-at-a-time justification leaves rivers and loose lines; this sets a paragraph the way a book is set.
text-wrap: pretty) until they settle, so text doesn't reflow under the reader; typeset the moment the turn completestext-wrap: balanceProseis keyed by content so Justif and React never edit the same nodesoverflow-wrap: anywhereon the prose container let the browser take emergency breaks that undid Justif's plan around inline code; justified blocks now setoverflow-wrap: normalLook at
docs/design/typesetting.mdui/src/typeset.tsx(thetypeset()helper,useTypeset,Typeset)npm run demo:ui, post a two-paragraph comment with inline code, resize the windowVerification
npm run checkandnpm run test:uipass.Landing
Adjacent-line conflicts with siblings in
THIRD_PARTY_NOTICES.md/scripts/ui-notices.mjsonly.