App: run tabs under the header on wide layouts, stable Artifacts tab, spelled-out pipeline status, shared list selection, code block header and edge fades
- Run detail: on a wide window (>= 840, pane >= 600) the tabs are Material segments under the run header; phones keep the floating bottom bar. Artifacts is always a tab, badged with its count and disabled with 0 (its tooltip says why), so Changes never moves. - Pipelines list: 'Failed · last run 19 Oct' beside the status dot; facts on the next line; compact rows keep 'Failed · 19 Oct'. - Settings: Disconnect is outlined beside a tonal Reconnect. - Lists: one selection style (tonal fill plus one leading accent bar) for runs, pipelines and chats; chat's border, fill and pointer removed. - Transcript: overflowing blocks fade at the edge with a chevron instead of a 'Scroll horizontally' line (semantics hint kept); code blocks get a header strip with language and Copy; lighter light-mode code fill. - Runs list: rows under a day heading show only the time of day. - Artifact search reveal re-centres once the lazy list's extent settles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,13 +58,17 @@ void main() {
|
||||
of: row,
|
||||
matching: find.byKey(appListRowSurfaceKey),
|
||||
);
|
||||
// The lists' shared open-row style: the tonal fill and one bar.
|
||||
final color = tester.widget<Material>(surface).color;
|
||||
expect(color, const Color(0x00000000));
|
||||
final highlight = tester.widget<AnimatedContainer>(
|
||||
find.byKey(ValueKey('chat-visibility-$id')),
|
||||
final context = tester.element(row);
|
||||
expect(color == AppListRow.selectedColor(context), active);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(ValueKey('chat-visibility-$id')),
|
||||
matching: find.byKey(appListRowSelectionKey),
|
||||
),
|
||||
active ? findsOneWidget : findsNothing,
|
||||
);
|
||||
final fill = (highlight.decoration as BoxDecoration).color;
|
||||
expect(fill != null && fill.a > 0, active);
|
||||
}
|
||||
|
||||
expectRow('a', true);
|
||||
|
||||
@@ -210,16 +210,16 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
final surface = tester.widget<Material>(find.byKey(appListRowSurfaceKey));
|
||||
expect(surface.color, Colors.transparent);
|
||||
final highlight = tester.widget<AnimatedContainer>(
|
||||
find.byKey(const ValueKey('chat-visibility-s1')),
|
||||
);
|
||||
// The selected row is filled in its own colour.
|
||||
final fill = (highlight.decoration as BoxDecoration).color!;
|
||||
expect(fill.a, greaterThan(0));
|
||||
// The shared open-row style: the tonal fill, and its one bar in the
|
||||
// chat's own colour.
|
||||
final context = tester.element(find.byType(ChatSessionRow));
|
||||
expect(fill.withValues(alpha: 1), chatColorShade(context, 'amber'));
|
||||
final surface = tester.widget<Material>(find.byKey(appListRowSurfaceKey));
|
||||
expect(surface.color, AppListRow.selectedColor(context));
|
||||
final bar = tester.widget<DecoratedBox>(find.byKey(appListRowSelectionKey));
|
||||
final side =
|
||||
((bar.decoration as BoxDecoration).border as BorderDirectional).start;
|
||||
expect(side.color, chatColorShade(context, 'amber'));
|
||||
expect(side.width, kAppListRowBarWidth);
|
||||
expect(find.byKey(appListRowAccentKey), findsNothing);
|
||||
expect(find.byKey(const ValueKey('chat-visibility-s1')), findsOneWidget);
|
||||
});
|
||||
|
||||
@@ -25,9 +25,20 @@ BorderSide edge(WidgetTester tester, String id) {
|
||||
return ((box.decoration as BoxDecoration).border as BorderDirectional).start;
|
||||
}
|
||||
|
||||
/// The shared open-row bar [AppListRow] draws on the selected row of [id].
|
||||
BorderSide? selectionBar(WidgetTester tester, String id) {
|
||||
final bar = find.descendant(
|
||||
of: find.byKey(ValueKey('chat-visibility-$id')),
|
||||
matching: find.byKey(appListRowSelectionKey),
|
||||
);
|
||||
if (bar.evaluate().isEmpty) return null;
|
||||
final box = tester.widget<DecoratedBox>(bar);
|
||||
return ((box.decoration as BoxDecoration).border as BorderDirectional).start;
|
||||
}
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'only visible chats have an edge; active edge widens continuously',
|
||||
'visible chats have a thin edge; the open chat has the shared selection',
|
||||
(tester) async {
|
||||
tester.platformDispatcher.accessibilityFeaturesTestValue =
|
||||
const FakeAccessibilityFeatures(disableAnimations: false);
|
||||
@@ -72,19 +83,25 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
// A selected chat not shown in a pane wears only the shared selection.
|
||||
expect(edge(tester, 'off').style, BorderStyle.none);
|
||||
expect(selectionBar(tester, 'off')!.width, kAppListRowBarWidth);
|
||||
// A chat visible elsewhere keeps its thin edge.
|
||||
expect(edge(tester, 'on').width, 3);
|
||||
expect(selectionBar(tester, 'on'), isNull);
|
||||
expect(find.byKey(appListRowAccentKey), findsNothing);
|
||||
update(() => active = true);
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
expect(edge(tester, 'on').width, greaterThan(3));
|
||||
expect(edge(tester, 'on').width, lessThan(8));
|
||||
await tester.pumpAndSettle();
|
||||
expect(edge(tester, 'on').width, 8);
|
||||
// Opened, it is marked exactly like any open row: one bar in the
|
||||
// chat's colour over the tonal fill, and no second edge.
|
||||
expect(edge(tester, 'on').style, BorderStyle.none);
|
||||
final bar = selectionBar(tester, 'on')!;
|
||||
expect(bar.width, kAppListRowBarWidth);
|
||||
expect(bar.color, isNot(Colors.transparent));
|
||||
update(() => active = false);
|
||||
await tester.pumpAndSettle();
|
||||
expect(edge(tester, 'on').width, 3);
|
||||
expect(selectionBar(tester, 'on'), isNull);
|
||||
},
|
||||
);
|
||||
testWidgets('compact chats keep identity colours and visible/active edges', (
|
||||
@@ -128,7 +145,18 @@ void main() {
|
||||
await tester.tap(find.byTooltip('New chat'));
|
||||
expect(newChatPressed, isTrue);
|
||||
expect(find.byTooltip('Expand chat list'), findsOneWidget);
|
||||
expect(edge(tester, 'a').width, 8);
|
||||
// The open chat: no second edge, the shared fill and bar instead.
|
||||
expect(edge(tester, 'a').style, BorderStyle.none);
|
||||
final open = tester
|
||||
.widgetList<AnimatedContainer>(
|
||||
find.descendant(
|
||||
of: find.byKey(const ValueKey('chat-visibility-a')),
|
||||
matching: find.byType(AnimatedContainer),
|
||||
),
|
||||
)
|
||||
.singleWhere((box) => box.foregroundDecoration != null);
|
||||
final bar = (open.foregroundDecoration as BoxDecoration).border;
|
||||
expect((bar as BorderDirectional).start.width, kAppListRowBarWidth);
|
||||
expect(edge(tester, 'b').width, 3);
|
||||
expect(edge(tester, 'c').style, BorderStyle.none);
|
||||
final avatars = tester
|
||||
|
||||
Reference in New Issue
Block a user