Keep the stage when using a side chat's action bar

On center stage, pressing or focusing a live side pane's header controls
(actions, More menu, model/mode/effort) no longer activates that pane.
Strips, keyboard activation and the normal split are unchanged.

Pipelines run 298 (reviewed and UI-reviewed); landed by hand because the
land stage's file capture was incomplete.
This commit is contained in:
2026-11-10 15:18:56 +00:00
parent 827d9bd3b5
commit 3b39f01e68
5 changed files with 172 additions and 59 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 {