From 410252d121ef5f243e9c945dde0e2b9807bd89f8 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 8 Jun 2026 18:54:24 +0200 Subject: [PATCH] keep the welcome screen from overflowing on small windows A short or narrow viewport (many recents, small window) overflowed the centred Column. Make the content scrollable with a minHeight so it still centres when there's room, and let a long recent-project branch name ellipsise instead of forcing the row wider. T-273 follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 3 ++ lib/builtin/welcome/src/welcome_view.dart | 56 ++++++++++++++--------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 629c3129..aadb6e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -205,6 +205,9 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit. ### Fixed +- The welcome screen no longer overflows on a short or narrow window — its + content scrolls when it can't fit and stays centred when it can, and a long + git-branch name on a recent-project row now truncates with an ellipsis. (T-273) - Bordered conversation cards (tool / Agent calls) now use the same interior vertical padding (8) as the stripe cards, so a collapsed tool/Agent card no longer reads chunkier — taller box, more trailing space — than its diff --git a/lib/builtin/welcome/src/welcome_view.dart b/lib/builtin/welcome/src/welcome_view.dart index 06a77eed..986b777e 100644 --- a/lib/builtin/welcome/src/welcome_view.dart +++ b/lib/builtin/welcome/src/welcome_view.dart @@ -21,28 +21,38 @@ class WelcomeView extends StatelessWidget { final showTips = c.maxHeight > 640; return Stack( children: [ - Center( - child: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 850), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _Header(tokens: tokens), - const SizedBox(height: 56), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded(child: _StartColumn(tokens: tokens, kernel: kernel)), - const SizedBox(width: 56), - Expanded(child: _RecentColumn(tokens: tokens, kernel: kernel)), - ], + // Scrollable so a short/narrow viewport (many recents, small window) + // never overflows; minHeight keeps the content vertically centred + // when there is room (T-273 follow-up — welcome RenderFlex overflow). + Positioned.fill( + child: SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints(minHeight: c.maxHeight), + child: Center( + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 850), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _Header(tokens: tokens), + const SizedBox(height: 56), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: _StartColumn(tokens: tokens, kernel: kernel)), + const SizedBox(width: 56), + Expanded(child: _RecentColumn(tokens: tokens, kernel: kernel)), + ], + ), + if (showTips) ...[ + const SizedBox(height: 48), + _TipsCard(tokens: tokens), + ], + ], + ), ), - if (showTips) ...[ - const SizedBox(height: 48), - _TipsCard(tokens: tokens), - ], - ], + ), ), ), ), @@ -324,7 +334,9 @@ class _RecentRow extends StatelessWidget { ClideText(' · ', muted: true, fontSize: clideFontMeta), ClideIcon(PhosphorIcons.gitBranch, size: 11, color: tokens.globalTextMuted), const SizedBox(width: 3), - ClideText(project.branch!, muted: true, fontSize: clideFontMeta, fontFamily: clideMonoFamily), + Flexible( + child: ClideText(project.branch!, + muted: true, fontSize: clideFontMeta, fontFamily: clideMonoFamily, maxLines: 1, overflow: TextOverflow.ellipsis)), ], ], ),