Repository navigation
fix(ui): wrap long inline code and truncate oversized chips in timeline text - #249
Merged
Merged
Conversation
…ne text Why: packages/ui/src/components/blocks/text.tsx#function codeStyle | Inline code is a breakable Pretext item whose extraWidth is charged per line fragment, so wrapped <code> must keep box-decoration-break: clone or rendered lines drift from measured ones.
34 of 51 tasks
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.
Fixes #174. Long inline code in timeline messages now wraps instead of being clipped, and oversized mentions and document chips are truncated with an ellipsis and a tooltip.
Change
break: "never"is gone inblocks/parse.ts. Pretext wraps it at word boundaries, after/, and for overlong runs at grapheme boundaries (overflow-wrap: break-wordbehavior). Short code spans can now wrap at their spaces too, as browsers do with inline code by default.blocks/text.tsxrenders code at Pretext's own breaks, using the samewrapsAtandWrapmechanism from fix(ui): render timeline text with the line breaks it was measured with #175 that text and links use. This works on both the settled and streaming paths, so the measured height and the rendered lines agree. If a line starts at the beginning of the code item, that break stays outside<code>, so no empty padded box is drawn at the end of the previous line.extraWidth(the code padding) to every line fragment of a wrapped item.<code>usesbox-decoration-break: cloneso each fragment draws that padding too..line-clip, and the clip carries the full text as atitle. Chip names sit in a.chip-namespan so the ellipsis applies inside the chip and the chip shape is kept.Verification
bun typesandbun run cipassed.Timelinewith human and agent messages. It ran in headless Google Chrome through playwright-core. The messages were:Run `bun apps/host/src/cli.ts backup 98d620b37665c43a /tmp/…/issue-triage-backup` now please.<code>rect past the content edge (clipped code)….box-decoration-breakis unprefixed in Chromium 130+, and the-webkit-form is set as well.Built in Ace
No. Made by a Claude Code subagent in a terminal at the maintainer's choice for this session; not an Ace capability gap. Dogfooding: #5.