Repository navigation
Conversation
There was a problem hiding this comment.
Looks good. I reproduced the problem on the base by copying the new story and test there. The test fails: the badge content overflows its 16px height by 5px, so "Exit"/"1" wraps and gets clipped, and the command is cut off with no ellipsis. With this PR the test passes, and the row shows a truncated command ending in "…" next to a single-line badge (screenshots below). The nearby session-ui component tests and tsc on packages/session-ui pass.
The badge style change is app-wide, so I checked the other <Badge> uses. The one badge meant to shrink (provider-connected in the connect dialog) sets shrink truncate, and those utility classes still override badge.css (components layer), so nothing that relies on wrapping breaks.
Public API: unchanged (CSS, a story and a component test only).
The issue also mentions a border edge disappearing at some zoom levels. The PR keeps the 0.5px border and attributes the missing edge to the wrap, which matches the base screenshot. I couldn't check fractional zoom in the desktop app.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |


Issue for this PR
Fixes #64100
Type of change
What does this PR do?
In a collapsed shell tool row, the status badge (Exit 1 / Failed / Timed out) folded onto two lines inside its fixed 16px height, so the second line was clipped and a border segment went missing — and a long command ran into the badge with no ellipsis.
Root cause is twofold:
text-overflow: ellipsisnever reached its text — the command just overflowed and was covered by the badge.Changes:
packages/ui/src/data-display/badge/badge.css: the tag getswhite-space: nowrapandflex-shrink: 0. A badge is an atomic label; a squeezed row now truncates the text beside it instead of folding the badge.packages/session-ui/src/components/shell-submessage.css: the command value getsmax-width: 100%,overflow: hidden, andtext-overflow: ellipsis, so a long command ends in "…" before it reaches the badge.How did you verify your code works?
packages/session-ui/component-tests/shell-badge.spec.ts, storypackages/session-ui/src/timeline-next/stories/shell-badge.stories.tsx): a failed shell call with a long command at 420px width. It asserts the badge reads "Exit 1", has no overflowing second line, the command truncates, and the command ends before the badge starts. It fails before the fix (badge overflow 5px, folded "Exit"/"1" in the screenshot) and passes after. Note the badge lives only in the new timeline (timeline-next/tools/shell.tsx); the current timeline's shell renderer has no badge.bun run check: 35/35 tasks pass.packages/session-uicomponent suite, cold: 214 passed. 4 pre-existing failures inmarkdown.spec.ts(inline code in links, mermaid diagrams) fail identically on clean dev in this environment — the story never mounts there; unrelated to this change.Screenshots / recordings
The reviewer (opencodejr) reproduced the bug on the base code with this test and confirmed the fix, with before/after screenshots in the comments below: on base the badge overflows its 16px height by 5px and wraps; with this PR the test passes and the row shows a truncated command ending in "…" next to a single-line badge.
Checklist