Skip to content

fix(ai): the neutral plan line must wrap, not be cut off mid-word - #890

Merged
yalexx merged 1 commit into
betafrom
fix/plan-summary-neutral-line-wraps
Sep 17, 2026
Merged

yalexx merged 1 commit into
betafrom
fix/plan-summary-neutral-line-wraps

Conversation

@yalexx

@yalexx yalexx commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

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.

truncate is right for a two-word plan name and wrong for a sentence. At the settings-column width, German rendered:

Der Tarif wird aus Ihrem Konto übernomm…

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: truncatebreak-words on that span. The collapsed button is already min-h-[44px] with items-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.tsx now pins that the summary does not carry truncate and does carry break-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) and build-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

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>
@yalexx
yalexx requested a review from a team as a code owner September 17, 2026 02:37
@yalexx
yalexx deployed to e2e-pull-request September 17, 2026 02:37 — with GitHub Actions Active
@yalexx
yalexx deployed to clawreview September 17, 2026 02:37 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 70d84f33-9c1a-4fb1-b376-3e3e766a14b9

📥 Commits

Reviewing files that changed from the base of the PR and between ac23bb6 and ca511a1.

📒 Files selected for processing (2)
  • src/components/ClawboxAiPlanPicker.tsx
  • src/tests/components/clawbox-ai-plan-picker-unknown.test.tsx

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

CI Summary

✅ Tests

  • Result: passed
  • View run
  • Coverage: statements 87.51%, branches 80.63%, functions 87.42%, lines 90.16%

✅ E2E

✅ E2E Install

@yalexx

yalexx commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yalexx
yalexx merged commit 5775e58 into beta Sep 17, 2026
11 checks passed
@yalexx
yalexx deleted the fix/plan-summary-neutral-line-wraps branch September 17, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant