fix: bound the resource file name, and move its typography into the theme (#2263)
Copilot review round 9, two findings. The Skill Resource control shows the displayed file's name, and that control is PINNED — it never scrolls — so a resource URI ending in a long breakable segment grew the header. Fifth instance of the same class. It took three attempts, and the mutation table is what exposed each one. `lineClamp: 1` stopped the text wrapping but the row then wrapped the caption onto its own line (+30.6px), because flexbox wraps before it shrinks. A `nowrap` row improved that to +21.7px but Mantine's Accordion label wrapper still would not let the caption shrink, so `miw: 0` had nothing to act on. A hard `maw: "50%"` gives the ellipsis a definite width, and the control now grows by 0px. Worth recording that the FIRST version of that guard passed against the defect: it asserted an absolute `height < 120px`, which an unclamped name satisfies because it only wraps to a few lines. Comparing the control against its own baseline — measured with a short name, then re-measured after selecting the hostile one — is what makes it detect anything at all. Second finding: `SkillDescription` carried `size: "sm"`, leaving typography at the call site directly beneath a comment of mine asserting that these constants carry layout only and that typography belongs in a `ThemeText` variant. Added a `skillDescription` variant; only the clamp stays here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R4441JdNLZerCVM7mDDSfB Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
e8bbcf115a
commit
1a2e375379
1 changed files with 75 additions and 5 deletions
|
|
@ -61,6 +61,9 @@ export const ThemeText = Text.extend({
|
|||
root: { fontWeight: 600, fontSize: "var(--mantine-font-size-lg)" },
|
||||
};
|
||||
}
|
||||
if (props.variant === "skillDescription") {
|
||||
return { root: { fontSize: "var(--mantine-font-size-sm)" } };
|
||||
}
|
||||
if (props.variant === "monoCaption") {
|
||||
return {
|
||||
root: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue