Cycle mobile tape through added panes and retain horizontal unfold layout

This commit is contained in:
2026-11-07 16:10:05 +00:00
parent 329005abe3
commit 9c67415c22
6 changed files with 126 additions and 22 deletions
@@ -156,6 +156,10 @@ void main() {
);
final workspace = tester.widget<ChatWorkspace>(find.byType(ChatWorkspace));
expect(workspace.controller.paneCount, 2);
expect(
(workspace.controller.root as ChatWorkspaceSplit).axis,
ChatSplitAxis.horizontal,
);
expect(workspace.controller.activePane?.sessionId, 'b');
final first = workspace.controller.panes.first.id;
await tester.tap(find.byKey(ValueKey('chat-peek-$first')));
@@ -169,6 +173,25 @@ void main() {
isFalse,
);
expect(tester.state(_thread('a')), same(stateA));
tester.view.physicalSize = const Size(880, 1000);
await tester.pumpAndSettle();
final aRect = tester.getRect(
find.byKey(
ValueKey('chat-workspace-${workspace.controller.panes.first.id}'),
),
);
final bRect = tester.getRect(
find.byKey(
ValueKey('chat-workspace-${workspace.controller.panes.last.id}'),
),
);
expect(aRect.top, bRect.top);
expect(aRect.right, lessThan(bRect.left));
expect(tester.state(_thread('a')), same(stateA));
expect(
tester.widget<EditableText>(_input('a')).controller.text,
'Phone draft A',
);
expect(tester.takeException(), isNull);
});