fix(ui): stop first-row home widgets overlapping on mobile (#11752) - #11866
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… salvaged from rate-limited lane Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
42cbf0e to
ae2ccfb
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Root cause
Home-slot widgets rendered a bare
HomeWidgetCard(aflex w-fullbutton) with no grid-span wrapper. As direct children of the 4-column home grid, each fell back to a single auto-placed 1-column track — so two widgets could be auto-placed into overlapping areas, producing the reported first-row collision ("Overdr[icon]wn$.." — finances "Overdrawn" colliding with the goals icon/value).Fix
Every home widget now wraps its card in
<div className="min-w-0 {spanClassName}">, so the widget's root grid item carries the host-providedcol-spanand each widget occupies a distinct, non-overlapping grid area. Added aspanClassNamefield to the widget type (mirrorsWidgetProps.spanClassName), applied on thehomeslot only, absent elsewhere. Touches the 8 home widgets (agent-orchestrator, finances-alerts, goals-attention, health-sleep, inbox-unread, needs-attention, notifications, todo) +types.ts+home-widget-card.tsx.Not a z-index band-aid — the grid items now genuinely span correctly.
Verification
packages/ui/src/widgets/WidgetHost.home-span.test.tsx(4/4): asserts each home widget's root element carries the hostcol-spanso two 2-col widgets share one 4-col row as distinct areas (a bare card with no span wrapper is the failing case it guards).__e2e__/output-home/*.png) — row 1 no longer overlaps.Evidence:
.github/issue-evidence/11752-widget-overlap/. Closes #11752.🤖 Generated with Claude Code