fix(app): wide Cupertino sidebar, compact run tabs, web-like chat bubbles

This commit is contained in:
2026-10-22 12:25:12 +01:00
parent 522f5a3ae0
commit bc98b6cab8
5 changed files with 236 additions and 47 deletions
@@ -125,7 +125,10 @@ class ScrollWhenOverflowing extends StatelessWidget {
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: ConstrainedBox(
constraints: BoxConstraints(minWidth: constraints.maxWidth),
// Content width, not the pane width: the web's tabs are compact
// and left-aligned, not a full-width segmented bar. The scroll
// view still reveals every segment on a narrow pane.
constraints: const BoxConstraints(),
child: child,
),
),
+28 -22
View File
@@ -52,29 +52,10 @@ class RunsList extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 8, 16, 0),
child: Align(
alignment: AlignmentDirectional.centerEnd,
child: NeedsYouRunsHeading(
rows: controller.runs,
frames: controller.repository.gateway.frames,
onOpen: (entry) => onSelected(entry.runId),
syncToken: syncToken,
store: attentionStore,
now: attentionNow,
notifications: notifications,
),
),
),
if (controller.usage != null)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Text('Usage: ${controller.usage}'),
),
_heading(context),
if (controller.error != null) _inlineError(context),
Padding(
padding: const EdgeInsets.all(16),
padding: const EdgeInsetsDirectional.fromSTEB(16, 12, 16, 4),
child: usesCupertinoHost(context)
? CupertinoSearchTextField(
placeholder: 'Filter runs',
@@ -92,8 +73,10 @@ class RunsList extends StatelessWidget {
Expanded(
child: controller.visibleRuns.isEmpty
? const Center(child: Text('No runs found.'))
: ListView.builder(
: ListView.separated(
itemCount: controller.visibleRuns.length,
separatorBuilder: (context, index) =>
const Divider(height: 1),
itemBuilder: (context, index) =>
_runTile(context, controller.visibleRuns[index]),
),
@@ -102,6 +85,29 @@ class RunsList extends StatelessWidget {
);
}
Widget _heading(BuildContext context) => Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 8, 16, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: controller.usage == null
? const SizedBox.shrink()
: Text('Usage: ${controller.usage}'),
),
NeedsYouRunsHeading(
rows: controller.runs,
frames: controller.repository.gateway.frames,
onOpen: (entry) => onSelected(entry.runId),
syncToken: syncToken,
store: attentionStore,
now: attentionNow,
notifications: notifications,
),
],
),
);
Widget _emptyError(BuildContext context) => Center(
child: Column(
mainAxisSize: MainAxisSize.min,