Merge branch 'main' into floating-chats-global

# Conflicts:
#	app/lib/features/chat/workspace/chat_workspace.dart
This commit is contained in:
2026-11-10 15:27:12 +00:00
5 changed files with 173 additions and 60 deletions
@@ -49,6 +49,7 @@ Widget host(
bool singlePane = false,
bool reduceMotion = false,
List<KeyEvent>? fieldKeys,
bool actionBars = false,
}) => MaterialApp(
home: MediaQuery(
data: MediaQueryData(disableAnimations: reduceMotion),
@@ -71,9 +72,18 @@ Widget host(
fieldKeys?.add(event);
return KeyEventResult.ignored;
},
child: _Draft(
key: ValueKey(pane.sessionId),
name: pane.sessionId,
child: Column(
children: [
_Draft(key: ValueKey(pane.sessionId), name: pane.sessionId),
if (actionBars)
ChatWorkspacePaneActionBar(
child: TextButton(
key: ValueKey('action-${pane.sessionId}'),
onPressed: () {},
child: const Text('Action'),
),
),
],
),
),
),
@@ -219,6 +229,48 @@ void main() {
expect(find.text('kept'), findsOneWidget);
});
testWidgets('a live side action bar does not move center stage', (
tester,
) async {
wide(tester);
tester.view.physicalSize = const Size(2400, 1000);
final workspace = threePanes();
final stage = ChatCenterStageController(store: _MemoryStore())
..value = true;
addTearDown(workspace.dispose);
addTearDown(stage.dispose);
await tester.pumpWidget(
host(workspace, stage, width: 2400, actionBars: true),
);
await tester.pumpAndSettle();
expect(widthOf(tester, 'three'), 950);
await tester.tap(find.byKey(const ValueKey('action-one')));
await tester.pumpAndSettle();
expect(workspace.activePane?.sessionId, 'three');
expect(widthOf(tester, 'three'), 950);
await tester.tap(find.byKey(const ValueKey('input-one')));
await tester.pumpAndSettle();
expect(workspace.activePane?.sessionId, 'one');
});
testWidgets('a normal split action bar still activates its pane', (
tester,
) async {
wide(tester);
final workspace = threePanes();
final stage = ChatCenterStageController(store: _MemoryStore());
addTearDown(workspace.dispose);
addTearDown(stage.dispose);
await tester.pumpWidget(host(workspace, stage, actionBars: true));
await tester.tap(find.byKey(const ValueKey('action-one')));
await tester.pumpAndSettle();
expect(workspace.activePane?.sessionId, 'one');
});
testWidgets(
'the floating chat is not staged; a docked chat takes the stage',
(tester) async {