From 2c7e21e484725ea7f063c19f02a61830360c8960 Mon Sep 17 00:00:00 2001 From: Strycher Date: Wed, 9 Sep 2026 04:29:54 -0400 Subject: [PATCH] fix(#610): scale the card chip width off the viewport Gemini recheck: a hardcoded 260px ceiling ellipsizes prematurely when a large accessibility font is set, even on a wide screen, and looks oddly constrained on desktop. Now 70% of viewport width, which keeps the overflow bound on a narrow phone and gives room where there is room. Co-Authored-By: Claude Opus 5 --- lib/widgets/contact_card_chip.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/widgets/contact_card_chip.dart b/lib/widgets/contact_card_chip.dart index 97a7ae4a..19d41e30 100644 --- a/lib/widgets/contact_card_chip.dart +++ b/lib/widgets/contact_card_chip.dart @@ -54,9 +54,14 @@ class ContactCardChip extends StatelessWidget { // A WidgetSpan gives its child unbounded width, so Flexible needs a real // ceiling to ellipsize against. Without this the chip grows to whatever - // name the sender chose. + // name the sender chose, which overflowed the message layout. + // + // Scaled off the viewport rather than a fixed pixel count, so a large + // accessibility font on a wide screen is not ellipsized while space + // remains, and a narrow phone still gets a sane bound. (Gemini recheck) + final maxChipWidth = MediaQuery.sizeOf(context).width * 0.7; final chip = ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 260), + constraints: BoxConstraints(maxWidth: maxChipWidth), child: Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3), decoration: BoxDecoration(