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:
@@ -205,6 +205,9 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
|||||||
|
|
||||||
### Fixed
|
### 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
|
- 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
|
vertical padding (8) as the stripe cards, so a collapsed tool/Agent card no
|
||||||
longer reads chunkier — taller box, more trailing space — than its
|
longer reads chunkier — taller box, more trailing space — than its
|
||||||
|
|||||||
@@ -21,28 +21,38 @@ class WelcomeView extends StatelessWidget {
|
|||||||
final showTips = c.maxHeight > 640;
|
final showTips = c.maxHeight > 640;
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
// Scrollable so a short/narrow viewport (many recents, small window)
|
||||||
child: ConstrainedBox(
|
// never overflows; minHeight keeps the content vertically centred
|
||||||
constraints: const BoxConstraints(maxWidth: 850),
|
// when there is room (T-273 follow-up — welcome RenderFlex overflow).
|
||||||
child: Column(
|
Positioned.fill(
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: ConstrainedBox(
|
||||||
children: [
|
constraints: BoxConstraints(minHeight: c.maxHeight),
|
||||||
_Header(tokens: tokens),
|
child: Center(
|
||||||
const SizedBox(height: 56),
|
child: ConstrainedBox(
|
||||||
Row(
|
constraints: const BoxConstraints(maxWidth: 850),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
Expanded(child: _StartColumn(tokens: tokens, kernel: kernel)),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const SizedBox(width: 56),
|
children: [
|
||||||
Expanded(child: _RecentColumn(tokens: tokens, kernel: kernel)),
|
_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),
|
ClideText(' · ', muted: true, fontSize: clideFontMeta),
|
||||||
ClideIcon(PhosphorIcons.gitBranch, size: 11, color: tokens.globalTextMuted),
|
ClideIcon(PhosphorIcons.gitBranch, size: 11, color: tokens.globalTextMuted),
|
||||||
const SizedBox(width: 3),
|
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)),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user