Medlar/docs/tests/S034-motion-audit.md

5.6 KiB

S034 — Motion and look pass: test file

Written by the worker that built it, run by the test phase. Nothing here has been tested until its Result says so.

Built

Audit (by rg over crates/app): springs everywhere come from tokens::spring, colours use EFFECT, no literal colours or radii outside tokens/theme, no Later feature (PLAN.md) has a setting, menu entry or tab. Faults found and fixed:

  • crates/app/src/drop.rs · overlay: the drop state now fades in and out (EFFECT spring) instead of popping; stroke is size::FOCUS_RING, text offset from tokens. Reach: drag a file over the main window.
  • crates/app/src/views/queues.rs · Page::show, card: a dropped queue card glides from where it was let go to its new place, the other cards glide when the order changes, the held card's colour fades container to highest, the handle shows grab / grabbing cursors. Reach: Queues page, drag a card by its handle.
  • crates/app/src/views/rules.rs · list: empty state line (rule.none), size unit through the catalogue (unit.mb_short), rules without a name are named "Rule without a name" in AccessKit labels, tooltips and the removed toast. Reach: Settings, Rules.
  • crates/app/src/views/target.rs: window sizes as named constants (CLOSED 112x132, OPEN 172x232, same as before). Left as is by design: target window resizes instantly (a viewport resize); rule row text offsets; backups page (D-048).

Checks

Risk: HIGH = data loss, security, crash, wrong result · MED = feature broken · LOW = looks or comfort. How: unit · integration · screen · by hand.

# Risk Do this Expect How Result
1 MED Motion normal: drag a file over the main window (hidden.sh driver or kittest with hovered_files set), grab frames 0, 3, 10, 30; then clear hovered files and grab again Overlay alpha rises over a few frames to full, then falls back to nothing; no frame after it is gone (motion::busy() false) screen —
2 MED Same as 1 with motion reduced, then off Reduced: same fade, never above full. Off: full on the first frame, gone on the first frame after screen —
3 MED Queues page with 3 queues; drag queue 1's handle down past queue 3 and release; grab frames for 30 frames after release, motion normal Card follows the pointer 1:1 while held; after release it moves smoothly to the last place, others move up smoothly; no jump back to the old slot at the end screen —
4 MED Repeat 3 with motion reduced and off Reduced: no overshoot past the final slot. Off: cards are in their final places on the next frame screen —
5 MED Queues page with more queues than fit; scroll the page with the wheel Cards scroll 1:1 with the content, no lag or glide while scrolling by hand —
6 LOW Hover the queue handle, then press and drag it Cursor grab on hover, grabbing while dragging; held card tint fades in and out, no instant switch screen —
7 MED Settings, Rules with no rules The line "No rules yet. ..." shows above "Add rule" and "Add the set by type" screen —
8 LOW Add a rule with an empty name; read AccessKit names of its row and buttons (kittest query_by_label), remove it Labels read "Change rule Rule without a name" etc.; toast "Rule Rule without a name removed" with Undo; Undo brings it back unit (kittest) —
9 LOW Edit a rule; look at the At least / At most fields Unit shows the catalogue's "MB" screen —
10 LOW Turn on the drop target (Settings, Clipboard and drops); right click the ring, then pick each entry Window 112x132 closed, 172x232 with the menu, all three buttons fully inside screen —
11 MED Keyboard only, from launch: reach Add, Settings (every page), Queues, Rules, the list, the palette with Tab, arrows, Enter, Escape Every control gets a visible focus ring, every action can be done, Escape closes dialogs and menus by hand / kittest —
12 MED Shots of main, settings (each page), queues, rules, add and the drop overlay at 480x360, 900x600, 1600x1000, 3440x1440, light, dark, AMOLED (MEDLAR_SHOTS, SIZES=, contact sheet) Nothing overflows or overlaps, panels flush, popups inside the window, AMOLED surface black screen —
13 MED Same shots with a 200-character download and queue and rule name, sizes over 1 TB, speeds over 1 GB/s, counts over 10,000 Names end in an ellipsis on one line, numbers fit their columns, no row grows screen —
14 LOW Every clickable thing in the shots from 12: measure hit rects (kittest response rects) None smaller than 32x32 px unit (kittest) —
15 MED Idle app 10 s after the last change, with the drop overlay gone and no drag No frames drawn (tools/hidden.sh cpu near 0, frame counter flat) screen —

Needs

Throwaway XDG_* home, tools/hidden.sh or kittest shots, a few queues and rules in the throwaway settings. No network.

Doubts

  • Queue drop: the card springs toward its old slot until the bridge saves the new order, then retargets. If the save is slow the card may drift back then forward (check 3). Fix would be keeping the drop order locally until the next snapshot.
  • While a card is held the others do not make room; they only glide after the drop. By design for this pass, may look flat.
  • The drop overlay fade needs repaints after hovered files clear; it relies on motion::busy() asking for frames (check 1 last part).
  • S033 settings (tray, notifications, autostart, quiet hours) still have no settings rows; not a dead control, but not reachable from the UI.
  • No existing tests should break; the queues key strings changed only inside motion springs.