e4f3ebdcab
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.
56 lines
2.5 KiB
Markdown
56 lines
2.5 KiB
Markdown
# Window X minimises (no separate Minimise button)
|
|
|
|
## Change
|
|
|
|
- The title bar of a floating window is now: kind actions (Dock on a chat),
|
|
Maximise / Restore size, then the X.
|
|
- The X hides the window and keeps its state, exactly as Minimise did. Its
|
|
tooltip and semantics are `Minimise`. It keeps the X glyph (`Icons.close`).
|
|
- The X never calls the kind's `closed` hook, so a chat window keeps its chat
|
|
open on the server and returns nothing to the tiling.
|
|
- `WindowFrame` no longer takes `onClose`; `WindowLayer` wires the X to
|
|
`manager.setMinimized(id, true)`.
|
|
- Unchanged: the chord (Alt+Y) shows hidden chat windows; the Windows menu
|
|
still lists minimised windows with a minimise mark and shows them on choice;
|
|
Show all, Minimise all and Close all stay in that menu. Terminal windows
|
|
still hide the terminal when their window is hidden by the X.
|
|
|
|
Changed paths (under `app/`):
|
|
|
|
- `lib/shell/windows/window_frame.dart`, `window_layer.dart`, `window_kind.dart`,
|
|
`window_entry.dart` (comments and the frame's parameters)
|
|
- `lib/features/terminal/terminal_window.dart` (comment only)
|
|
- `test/shell/windows/window_host_test.dart`, `window_layering_test.dart`
|
|
- `test/features/chat/chat_floating_pane_test.dart`
|
|
- `test/features/terminal/terminal_surface_test.dart`
|
|
- `notes/floating-windows.md`, `notes/chat-floating-pane.md`
|
|
|
|
## Focused results
|
|
|
|
- `tool/memwatch/full.sh 'test/shell/windows/window_host_test.dart
|
|
test/shell/windows/window_layering_test.dart
|
|
test/shell/windows/window_conveniences_test.dart
|
|
test/features/chat/chat_floating_pane_test.dart
|
|
test/features/terminal/terminal_surface_test.dart'`:
|
|
PASS, 72 passed, 0 failed, 0 skipped, exit 0.
|
|
- `tool/analyze.sh`: clean, exit 0.
|
|
- Not run: the full suite (the land gate runs it). No Cupertino code or tests
|
|
touched.
|
|
|
|
## Affected states (widget-test coverage only)
|
|
|
|
- Window title bar: no `Close` tooltip; `Minimise` on the X; `Maximise` /
|
|
`Restore size` unchanged.
|
|
- Chat window: X hides it; the chat stays open, is not docked and sends no
|
|
`chat_close`; the chord shows it again with the same frame and composer.
|
|
- Probe window: X keeps the entry (minimised), the content state survives, and
|
|
the group toggle brings it back.
|
|
- Terminal float window: X hides the terminal and keeps its tabs; the chord
|
|
shows it again at the same frame.
|
|
|
|
## Limitations
|
|
|
|
- No browser or device capture here; `ui-review` owns the title-bar captures.
|
|
- The X glyph with a Minimise tooltip is a deliberate choice; a minimise glyph
|
|
would be a one-line change in `window_frame.dart` if preferred.
|