fix(ai): the neutral plan line must wrap, not be cut off mid-word - #890
Conversation
The summary that replaced "Pro plan · €9/month" on a box that has not been
told what its account is on went into a span carrying `truncate`. That class
is fine for a two-word plan name and wrong for a sentence: in the settings
column German rendered
Der Tarif wird aus Ihrem Konto übernomm…
so the message explaining where the plan comes from was itself hidden — the
same failure mode as the tunnel URL clipped mid-glyph, one screen over.
It wraps now. The collapsed button is min-h-[44px] and grows to two lines;
`break-words` is the guard against a long unbroken token. English and the
plan-name case are unchanged in appearance.
Found by rendering the component at the settings-column width and looking at
it, which is also what the new test pins.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 86 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. The included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Comment |
|
@coderabbitai review |
|
Follow-up to #889, found by rendering the component at the settings-column width and looking at it.
#889 replaced a false claim on the ClawBox AI card — a box that had never stored a tier announced "Plan: Pro plan · €9/month" as fact — with a neutral line saying where the plan comes from. That line went into the span that already carried
truncate.truncateis right for a two-word plan name and wrong for a sentence. At the settings-column width, German rendered:So the message that existed to stop the card stating something untrue was itself cut off mid-word, and the owner was left with no explanation at all — the same failure mode as the tunnel URL clipped mid-glyph that #889 fixed one screen over.
The change:
truncate→break-wordson that span. The collapsed button is alreadymin-h-[44px]withitems-center, so it grows to two lines and the "Change" affordance stays vertically centred beside it. English is unaffected (it fit on one line before and still does), and the plan-name case is unchanged in appearance.Verified by looking at it: rendered the real component at a 420px column in all three variants. Before: the German line ended in an ellipsis at "übernomm…". After: it wraps to "Der Tarif wird aus Ihrem Konto" / "übernommen", complete, with "Ändern" centred against the two lines. The English neutral line and "Max plan · €49/month" render on one line as before.
Test:
clawbox-ai-plan-picker-unknown.test.tsxnow pins that the summary does not carrytruncateand does carrybreak-words, with the German string as the reason in the comment.Full suite green apart from two failures unrelated to this change and reproducible without it:
chat-popup-dismiss-and-geometry.test.tsx(flaky under full-suite parallelism, passes in isolation) andbuild-typecheck.test.ts(tsc needs ~2.2 GB and this machine caps the default heap near 1.5 GB; it passes once nothing else is holding memory).🤖 Generated with Claude Code