Repository navigation
fix(ui): keep trailing tool-card metadata off the card edge - #3170
Merged
Merged
Conversation
A prominent summary row inset its two ends with different values: 12px leading against 4px trailing. The trailing 4px was serving two roles at once, so when the hidden action region released its row gap, the released 8px went to the only growing item in the row, the content slot, and pushed the trailing metadata (+N -N counts, status summaries) onto the row's own end inset. Every consumer whose card has no action region sat 5px from the card border. Let one inset own both row ends, and let the action region compensate for its own reveal gutter instead of shrinking the row inset. A consumer slot that mounts empty (a fragment whose conditions are all false) now stays inert as well: it adds no row gap and no divider for the trailing status icon, which previously drew a phantom separator and took its 13px out of the text. The action label and content lose 8px of room while the region is hidden; the revealed geometry is unchanged. The tool-card test pins the single inset, the reveal gutter and the inert empty slot.
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.
Summary
FlowChat tool-card summary rows inset their two ends with different values: 12px leading against 4px trailing. The trailing 4px was serving two roles at once, because the action region's hover-reveal gutter was taken out of the row inset. Whenever the action region is hidden, the space it releases goes to the only growing item in the row, the content slot, which drags the trailing metadata (+N -N change counts, status summaries, status icons) onto that 4px inset. On screen those values sit 5px from the card border instead of the 13px the leading edge uses, and every card family that renders no action region reaches the same edge.
The row now owns one inset for both ends, the action region compensates for its own reveal gutter, and a consumer slot that mounts empty stays inert.
Fixes #
Type and Areas
Type: bug fix (design system component regression, visual)
Areas: design system UI (FlowChat tool cards). Consumed by web UI, desktop, mobile web and Design Lab. No Rust, protocol, token or markup change.
Motivation / Impact
Trailing metadata now keeps the same distance to the card edge as the leading icon and label (12px inset plus the 1px border), for every card family that shares the prominent summary row.
extraslot (a fragment whose conditions are all false) no longer draws the status divider or takes a row gap. It previously consumed 13px of row width for a phantom separator and pushed the status icon around.--_tool-card-summary-insetis a CSS-module-scoped private variable. No public component API, no token, no markup, no migration.Verification
Commands, from the repository root:
Measured geometry, headless Chrome against the built
distmarkup and CSS at a 700px row width (before -> after):extraplus status iconThe local
pnpm run desktop:devinstance serves the fixed module: fetching the transformed CSS module from the Vite dev server shows it carries--_tool-card-summary-insetand the reveal compensation, and no longer carries the asymmetricpadding-inline. Perdesign-system/AGENTS.md, automated measurement is mechanism evidence only; a manual Design Lab pass over the idle, hover and empty-slot states is still recommended before merge.Reviewer Notes
Root cause, for review of the mechanism:
margin-inline-start: calc(-1 * var(--openbitfun-space-2)). That cancel is correct and is kept - it just must not also claim the row's end inset..content(flex: 1 1 0), the only growing item in the row, which is what moved.extra(right-aligned bymargin-inline-start: auto) to the row's end inset.design-system/AGENTS.mddoes not treat browser automation or screenshots as visual evidence for review.Checklist