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) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 18:54:24 +02:00
co-authored by Claude Opus 4.8
parent a95b332925
commit 410252d121
2 changed files with 37 additions and 22 deletions
+3
View File
@@ -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
+34 -22
View File
@@ -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)),
],
],
),