4.8 KiB
4.8 KiB
S032 — Workspace right-click: open windows and live window actions
Run in nested niri with a test config (lock.idleLock, idleScreenOff, idleSuspend = 0), two outputs if possible. Open on workspace 1: kitty (focused) and a second app, one of them floating. Snapshots alone cannot right-click; use tools/vptr in nested niri.
- Right-click workspace 1's pill: a menu opens at the pill listing both windows in id order, each with its app icon (or category symbol) and title; the focused one in the primary colour; the floating one with a picture-in-picture mark; "Workspaces settings" below a separator. (HIGH)
- Right-click an empty workspace's pill: only "Workspaces settings". Click it: Nexus opens on the Workspaces page. (HIGH)
- Right-click the same pill again: the menu closes. Right-click the Workspaces item outside any pill (if reachable): the old single-row settings menu. (MED)
- Click a window row: the menu shows the back row (window title), Focus, Floating, Fullscreen, Maximize column, Width chips, move up/down rows, workspace chips (current one highlighted, not clickable), "Move to " for each other output, and a "Close window" pill. Back returns to the list. (HIGH)
- Floating: the window toggles floating, the menu stays open and the tick follows. (HIGH)
- Fullscreen and Maximize column act on that window even when another window is focused (Maximize focuses it first). (HIGH)
- Width 1/3, 1/2, 2/3, Full: the window's column takes that share of the output (check
niri msg -j windowslayout width ~ 33/50/67/100 %). (HIGH) - Move to workspace above/below and a workspace chip: the window moves, focus stays put, the menu closes. Rows above/below only show when that workspace exists. (HIGH)
- Move to : the window moves to that monitor, the menu closes. (MED)
- Close window: the window closes, the menu closes. (HIGH)
- With level 2 open, close the window from the keyboard (niri bind): the menu falls back to the list without that window, no crash; a click on a stale row does nothing. (MED)
- Bar on top, bottom, left and right: the menu opens at the pill and fits on screen. (MED)
- After all actions:
caelestia-windowrules.kdl,shell.jsonand niri's config are unchanged (git diff/checksums before and after); Nexus Shortcuts and Window Rules pages look and act as before; keyboard binds still work. (HIGH) - Unit tests
lists_only_that_workspace_in_id_orderandactions_carry_the_window_idpass. (MED)
Doubts
SetProportionis assumed to be in percent (asniri msg action set-window-width 50%); if niri reads it as a fraction, widths will be wrong (check 7).MoveWindowToWorkspaceby workspaceIdwithfocus: falsewas not tried live.- No hover highlight on rows (the dock menu has none either); a long workspace list makes chips narrow.
- The Fullscreen row shows no tick: niri's window state has no fullscreen flag.
Results (S036, nested niri 772x815, bar left, kitty stand-ins zzz and floating aaa)
- Doubt SetProportion: percent. Proved: 1/3, 1/2, 2/3, Full gave window width 212, 327, 441, 670 of ~654 usable. Fullscreen no tick and no row hover: row hover exists, fine.
- 1 pass (list, icons, primary colour, floating mark, settings row). 4 pass (level 2 rows, workspace chips, no "above" on workspace 1). 5 pass (tick follows, menu stays). 6 pass (Maximize focused the window and widened it; Fullscreen gave 772x815). 7 pass. 14 pass.
- 8 FAIL, KNOWN BUG, cause not found: the "Move to workspace below" row shows hover but a click does nothing (window stays, menu stays open; reproduced 4 times, also at other x/y in the row). The workspace chip click does move the window. A debug print in
PopAct::Winnever fired, so the click does not reachpop_action; it is lost between press and release (hit == pressedin the release handler in wl.rs) or byrpositionpicking a later hit. Sending the same JSON by socket moved the window, so the action itself is fine. - 2, 3, 9, 10, 11, 12, 13: not run: cut off (usage limit).
Results (S036 round 2, nested niri)
- 8 pass after FIX. Cause:
Ui::keep_pressre-found the pressed control by action withrposition; the "Move to workspace below/above" row and the workspace chip carry the same action, so the press jumped to the chip and release (hit == pressed) failed. Now it keeps the hit under the press point (pressed_at). Proved: above and below rows move the window, focus stays, menu closes. - 2 pass (empty workspace lists only "Workspaces settings"; it opened Nexus). 3 pass (second right-click closes). 10 pass (Close window row, process gone). 11 pass (window closed by IPC with level 2 open: falls back to the list, no crash).
- 9 not run: one nested output only. 12 not run: bar left only. 13 not run: no before/after checksums taken. No regression test for the keep_press fix (needs a built Ui).