diff --git a/docs/design/gpui-spikes.md b/docs/design/gpui-spikes.md index a74e319..57c420f 100644 --- a/docs/design/gpui-spikes.md +++ b/docs/design/gpui-spikes.md @@ -44,7 +44,16 @@ uncached child view on every frame), the eleven callbacks of `bind/servers.rs` a position kept in `ui.window`, the engine-event task in steps and a tick that draws nothing. What it shows, what it costs idle and what it leaves to the slices after it are in docs/ui.md, "The desktop shell"; the next slice is the -channel tree and the members. +channel tree and the members. The shell was reviewed and gated the same day (an +Opus gate: no blocker and no major, six minors), and the minors are closed on +`phase5/gpui-shell-minors`: the records that said the parts draw only when what +they show changed are corrected (a part tells the window, and the window draws +every part, as gpui-pre 0.3.10 renders every uncached child view on every +frame), a window left maximized is maximized again on X11, the pictures are +1440 by 960, the connect test sends no DNS query, the sequences both front ends +ran are shared in `voelin-ui-vm`, and the `ui.window` row is in the settings +table; the gate's four risks of the shell are in docs/ui.md, "For the next +slices". | Spike | The plan's no-go | Seen (software rendering, see Setup) | Verdict | |---|---|---|---| diff --git a/docs/ui.md b/docs/ui.md index 5454002..9c62037 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -1031,8 +1031,8 @@ crates/voelin-gpui/ is quiet, a job from another thread reaches the entity, the store's servers are the rail's, a server is saved, edited, removed and selected, a connect and the other commands reach the engine's wire, the sample servers send nothing, the - window's place is kept and found again, the theme follows the settings and a - switch), the shell on a drawn window that the tests click (a server added is in + window's place is kept and found again, a window left maximized is zoomed once + and stays remembered so, the theme follows the settings and a switch), the shell on a drawn window that the tests click (a server added is in the rail, a click selects it and titles the window, an engine event updates the rail and the cards, the form adds and removes, the toast goes, an idle window is not told), a connect through a real engine that has no connector (it answers @@ -1310,7 +1310,23 @@ private `rc.xml`) maximized it (`_NET_WM_STATE_MAXIMIZED_VERT` and `_HORZ`, 3840 by 2141 below the title bar), Alt+F4 closed it with exit status 0, and `ui.window` held `{"width":1280,"height":800,"x":1280,"y":687,"maximized":true}`: the size it returns to, not the screen's. A second run came up maximized with no one -touching it, and closed the same way leaving the same value. +touching it, and closed the same way leaving the same value. The same second +run on the commit before the fix, started on a copy of that database +(`maximized: true`): the window opened at 1280 by 800 with no `_NET_WM_STATE`, and +Alt+F4 left `{"width":1280,"height":800,"x":1280,"y":687,"maximized":false}`, +the two things the gate found; the fixed binary on the same copy came up at 3840 +by 2141 with both maximized atoms and left `maximized: true`. + +**The minors round** (`phase5/gpui-shell-minors`, after the Opus gate accepted +the slice with six minors; the commits say each): the records of what a part's +notify draws (above, and "For the next slices"), a window left maximized is +maximized again on X11 and stays remembered so (the paragraph above), the +pictures at 1440 by 960 (a screen larger than the window), the connect test +makes no DNS query (its lib test binary makes no `connect` or `send` at all +under `strace`), the server sequences shared with the Slint front end +([Shared with the Slint front end](#shared-with-the-slint-front-end)), and the +`ui.window` row of the settings table. The four risks the gate listed are in +"For the next slices". **What the shell costs idle** (`VOELIN_METER=1`, release build of the shell commit `6b4341a`, the later ones change nothing that runs while idle; 1440 by @@ -1518,7 +1534,15 @@ the slices that meet it; none of it is a defect of what exists today. most window managers) places the window itself; the size is restored, the position is not, and on Wayland there is none to tell. A window manager that honours the request, or a hint GPUI does not set, would make the saved - position count; the setting keeps it either way. + position count; the setting keeps it either way. What the window manager + does give back is the maximized state, which the window now asks for once it + is shown ([The window's place](#the-desktop-shell), the paragraph with the + run under openbox). That request relies on `Window::is_maximized` being + current at the first frame: on a window manager that does honour GPUI's + request before the map (openbox does not) and whose `_NET_WM_STATE` change + has not been read yet, `zoom_window`, which toggles on X11, would undo it. + None is known; if one turns up, ask for the maximize only at the first + `_NET_WM_STATE` change after the map instead. - **The identity import and the crash reports are not started** (`backend.rs` says so): the import reads the official TeamSpeak clients' files and belongs with the identities page, the crash hook with the settings pages. @@ -1537,6 +1561,29 @@ the slices that meet it; none of it is a defect of what exists today. shell](#the-desktop-shell)). `run()` waits `CLOSE_GRACE` (500 ms) for the engine to send the closes only when the window's close found sessions to close. +- **Four risks of the shell the gate found by reading, left to the slices that + meet them** (none reproduced here, none is a defect of a path the shell's + tests exercise): + - *The server on screen is not remembered across restarts.* `AppState::new` + takes the first saved server (`bookmarks.first()`), whichever the user had + on screen; the Slint app does the same and keeps only the last voice channel + (`ui.last_voice`, for its Home page). Remembering the server needs a + value of its own in the settings (a key, or a field beside `ui.window`). + - *A click on a server of the rail, or Remove, closes an open server form + without asking*, and what was typed in it is gone (`MainView::select_server` + and `delete_server` drop `form`). The dialogs slice (9) turns the form into + a dialog; it keeps the draft or asks. + - *Hold to talk stays on if voice drops while the button is held.* The voice + card, with the button, goes when voice leaves `Connected`, so the release + (`on_mouse_up`, `on_mouse_up_out`) has no element to land on: `Sidebar` + keeps `holding` and the session keeps `transmitting` until the next press. + Releasing on the window, or clearing the flag when voice drops, belongs + with the voice page (slice 3). + - *A tiling compositor's tile is stored as the window size* (and, on X11 + under a tiling window manager, as its position): `ui.window` takes what the + window reports without asking whether it is tiled or floating, so the next + run under a floating window manager opens at the tile's size. + ## Limits - No drop shadows or blur (the software renderer draws none): glows are