fix(markdown): align mention chip wrapping - #7501
Draft
tellaho wants to merge 3 commits into
Draft
Conversation
🔐 Codex Security Review
|
Separate fragmentable chip decoration from entity-link spacing so rendered human and agent mentions keep the conversation's 20px rhythm while long entity links retain their roomier wrapped-line treatment. Co-authored-by: Rizz <rizz@agents.buzz> Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
tellaho
force-pushed
the
tho/fix-mention-line-height
branch
from
September 9, 2026 18:30
fad8050 to
f6ad3d4
Compare
Use the shared wrapping chip contract for rendered mentions while keeping their fragments on the conversation text rhythm. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Let profile-backed mention chips retain true inline fragmentation and assert the painted gap between wrapped decorations. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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.
Category: fix
User Impact: Human and agent mentions now break across lines with the same cloned chip treatment as repository and permalink chips while preserving the conversation text rhythm.
Problem: Profile-backed rendered mentions sat inside an
inline-flexpopover trigger, unlike entity chips, so the wrapper interfered with true inline fragmentation. The browser-layout test measured text-range rows rather than the painted chip rectangles, allowing touching decorations to pass as “separate” fragments.Solution: Keep the profile trigger interactive but override its layout to true
inline, then give mention fragments 18px computed leading inside the message’s 20px prose rhythm. Chromium paints each fragment at 17px and advances it by 20px, leaving a visible gap between cloned rounded rectangles. The browser test now measures the chip’s owngetClientRects()and asserts fragment count, height, gap, and step; entity links retain their existing 22px leading.File changes
desktop/src/features/profile/ui/UserProfilePopover.tsx
Allows inline consumers to override the trigger wrapper’s layout without changing other profile-popover call sites.
desktop/src/shared/styles/globals/markdown.css
Keeps one shared wrapping-chip mechanic and gives mention decorations enough room to separate visibly within 20px prose.
desktop/src/shared/ui/markdown.test.mjs
Pins both rendered mentions and entity links to the shared wrapping-chip contract.
desktop/src/shared/ui/markdown/MarkdownMention.tsx
Makes the profile-popover trigger truly inline so the nested mention chip can fragment with surrounding prose.
desktop/src/shared/ui/mentionChip.ts
Keeps
wrapping-inline-chipas the single contract for fragmenting decorated chips.desktop/tests/e2e/mentions.spec.ts
Measures the painted chip rectangles, requires a positive fragment gap, and verifies the inline trigger remains mouse- and keyboard-operable.
desktop/tests/e2e/navigation.spec.ts
Keeps a wrapped repository chip as the control, asserting its existing 22px line height and fragment advance.
Reproduction steps
Screenshot
The dark-theme production renderer shows the real qualified label (
bob (npub1hv3…tpuc)) at an 8rem width. The two lines now paint as visibly separate rounded fragments rather than one continuous rectangle.Validation
At commit
2b063e1b4ade30e11f1616269ad4ba4190366885:pnpm --dir desktop build— passedgit diff --check— passed