Cap the list pane at 440 px beside an open item

On very wide windows (a 4K monitor) the list took 40% of the window; past
440 px the extra width now goes to the open item. Fold and laptop widths
keep the 60/40 split.
This commit is contained in:
2026-11-02 16:14:50 +00:00
parent 1f214d36bf
commit 885234e0e4
3 changed files with 36 additions and 2 deletions
@@ -1,8 +1,11 @@
import 'dart:math' as math;
import 'dart:ui' show Tristate;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/shell/list_detail.dart';
import 'package:pipelines_app/ui/layout/app_list_row.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:pipelines_app/features/chat/screen.dart';
@@ -131,7 +134,13 @@ void main() {
paneWidths.add(before);
bodyWidths.add(bodyBefore);
expect(bodyBefore, greaterThanOrEqualTo(width * 0.5));
expect(bodyBefore, lessThanOrEqualTo(width * 0.6));
// 60% of the window, or more once the list reaches its cap.
expect(
bodyBefore,
lessThanOrEqualTo(
math.max(width * 0.6, width - 1 - kListPaneMaxWidth) + 0.5,
),
);
expect(bodyBefore, greaterThan(before));
final rowKeys = switch (destination) {
'Pipelines' => ['pipeline-row-1', 'pipeline-row-2'],