Merge branch 'main' into pipelines/run-20261113-1626-move-and-resize-floating-chats-on-every-0075

This commit is contained in:
2026-11-13 18:08:03 +00:00
2 changed files with 39 additions and 9 deletions
@@ -200,15 +200,30 @@ void main() {
);
});
test('a very wide workspace keeps the stage and shows live columns', () {
test('a very wide workspace keeps the stage the biggest pane', () {
final layout = ChatCenterStageLayout.of(
const Size(2560, 800),
['a', 'b'],
'a',
null,
)!;
expect(layout.rects['a']!.width, 950);
// 2548 usable: the stage takes 1.5 parts, the other pane 1.
expect(layout.rects['a']!.width, closeTo(2548 * 1.5 / 2.5, 0.001));
expect(layout.rects['b']!.width, closeTo(2548 / 2.5, 0.001));
expect(layout.rects['b']!.right, 2560);
expect(layout.strips, isEmpty);
final three = ChatCenterStageLayout.of(
const Size(3840, 800),
['a', 'b', 'c'],
'c',
null,
)!;
for (final other in ['a', 'b']) {
expect(
three.rects['c']!.width,
closeTo(three.rects[other]!.width * chatCenterStageLeadFactor, 0.001),
);
}
expect(
ChatCenterStageLayout.of(const Size(2560, 800), ['a'], 'a', null),
isNull,
@@ -233,7 +248,8 @@ void main() {
'a',
{'b': 300},
)!;
expect(switched.rects['a']!.width, chatCenterStageWidth);
// 1588 usable: 1.5 parts of 2.5 just exceed the preferred width.
expect(switched.rects['a']!.width, closeTo(1588 * 1.5 / 2.5, 0.001));
final closed = ChatCenterStageLayout.of(
const Size(1600, 800),
@@ -241,7 +257,7 @@ void main() {
'b',
null,
)!;
expect(closed.rects['b']!.width, chatCenterStageWidth);
expect(closed.rects['b']!.width, closeTo(1588 * 1.5 / 2.5, 0.001));
},
);
});
@@ -378,12 +394,13 @@ void main() {
);
await tester.pumpAndSettle();
expect(widthOf(tester, 'three'), 950);
final staged = widthOf(tester, 'three');
expect(staged, greaterThan(widthOf(tester, 'one')));
await tester.tap(find.byKey(const ValueKey('action-one')));
await tester.pumpAndSettle();
expect(workspace.activePane?.sessionId, 'three');
expect(widthOf(tester, 'three'), 950);
expect(widthOf(tester, 'three'), staged);
await tester.tap(find.byKey(const ValueKey('input-one')));
await tester.pumpAndSettle();