Make floating-window close buttons minimise
Remove the separate minimise control and make the title-bar X hide windows while preserving their state and reachability. Update window behavior documentation and focused tests for chat, terminal, and window layering.
This commit is contained in:
@@ -390,19 +390,24 @@ void main() {
|
||||
await app.stop(tester);
|
||||
});
|
||||
|
||||
testWidgets('X closes the window and returns nothing to the tiling', (
|
||||
tester,
|
||||
) async {
|
||||
testWidgets('X minimises the window: the chat stays open, returns nothing '
|
||||
'to the tiling, and the chord brings the window back', (tester) async {
|
||||
await _saved('a', 'b');
|
||||
final app = _App(_Store());
|
||||
await app.start(tester);
|
||||
await _menu(tester, 'b', 'Float (Alt+Y)');
|
||||
await tester.tap(find.byTooltip('Close'));
|
||||
await tester.tap(find.byTooltip('Minimise'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(app.floating, isEmpty);
|
||||
// Still a window, hidden; not closed and not docked.
|
||||
expect(app.floating, ['b']);
|
||||
expect(app.windows.windows.single.minimized, isTrue);
|
||||
expect(_shown('Chat b'), findsNothing);
|
||||
expect(_workspace(tester).panes.map((p) => p.sessionId), ['a']);
|
||||
expect(_thread('b'), findsNothing);
|
||||
expect(app.gateway.calls.where((c) => c.type == 'chat_close'), isEmpty);
|
||||
await _chord(tester);
|
||||
expect(_shown('Chat b'), findsOneWidget);
|
||||
expect(_thread('b').hitTestable(), findsOneWidget);
|
||||
expect(app.floating, ['b']);
|
||||
await app.stop(tester);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user