# krino-gui: the checklist before a release The GTK layer has no automated tests (gui-design.md ยง6): package `gui/internal/model` is tested, `gui/internal/ui` is not. This list is run by hand before every release that changes the GUI, and what it found goes in the release's plan record. Run it against a sandbox, never a real directory: ```sh S=$(mktemp -d) mkdir -p "$S/home/.config/krino/dirs" "$S/inbox" HOME="$S/home" XDG_CONFIG_HOME="$S/home/.config" XDG_DATA_HOME="$S/home/.local/share" \ XDG_STATE_HOME="$S/home/.local/state" XDG_CACHE_HOME="$S/home/.cache" krino init # write dirs/inbox.conf with (path "$S/inbox") and a few rules, put # invented files in "$S/inbox", then run krino-gui with the same HOME and # XDG_* set. ``` A headless X server keeps the run out of the way of whatever else is on the screen, and lets `import` take the same screenshots: ```sh Xvfb :99 -screen 0 1280x800x24 & DISPLAY=:99 krino-gui & DISPLAY=:99 import -window "$(DISPLAY=:99 xdotool search --name '^krino$' | tail -1)" shot.png ``` A dialog is its own window: take it by its own id, not the main window's. ## Plan tab 1. The directory picker lists every included directory, and the path beside it is the one the file names. 2. Scan plans it; the counts line reads like `krino -n`'s: scanned, to act on, excluded, skipped, with warnings. 3. Each row shows the file, what would happen and where, and the rule. A file krino could not decide about is listed and cannot be checked. 4. Select all, None, and the Apply button's count agree with the boxes. 5. Selecting a row explains it: every step, its rule and reason, and any warning. 6. Right-clicking a row offers Trash instead and Delete permanently instead. The second asks first, names the file, and Escape leaves the plan as it was. 7. Apply acts on the checked files only: each row shows done, failed with the reason, or declined, and the status bar summarises. 8. While a plan is open, `krino -n` on that directory waits for the lock; after Apply, or after closing the window, it proceeds. ## History and undo tab 9. Runs are newest first, with time, directory and counts; a reversed run says `(undone)`. 10. Selecting a run shows its reversal: the header counts, one row per file, refused rows in red and not checkable. 11. Undo reverses the checked files, logs the rest as declined, and the run list then shows the undo run and marks the original. 12. Selecting an undo run offers what is left of the run it reversed, as plain `krino undo` does. ## Rules tab 13. Forms lists the directory itself, then the excludes and rules with their actions. 14. Selecting a rule fills its form: name, conditions, actions, `(stop)`, settings. 15. Changing a field rewrites only that form - check on the Text sub-tab that every comment and every other rule is untouched. 16. Add rule inserts after the selected rule and the check stays clean; Delete asks first and takes the comment lines above the rule; Up and Down move a rule with those comments. 17. The directory's settings form writes into the header, above the rules, and an empty field takes the setting out of the file. 18. A form with comments inside it warns before an edit drops them and offers the Text tab. 19. Text: a mistake appears within a second as `file:line:col` in red, Save greys out, and clicking the message goes to the line. 20. Test on file prints the trace, the captures and the chain, answering from the unsaved text. 21. Save writes the file, leaves the previous text as `NAME.conf.bak`, and the Plan tab then plans with the new rules. 22. With the file changed underneath (edit it in another program), Save offers Reload, Overwrite and Cancel; Overwrite keeps the other text as the backup. ## Window 23. Nothing on disk changes until Apply, Undo or Save. 24. Closing the window releases the directory lock it held. 25. A configuration that does not load prints the problem and exits 2 rather than opening a window. ## Settings and preview 26. Selecting a row in the Plan tab shows the file under its explanation: a picture for an image, the rendered first page for a PDF, the first lines for text, and a plain note for anything else. 27. Settings writes krino's defaults into `krino.conf` - refused while the configuration would not load, previous text kept as `krino.conf.bak` - and the tabs work from the new defaults at once. 28. The window preferences take effect as they are changed (font size, preview height, colours, preview, a plan starting unchecked) and survive a restart. 29. Dragging the divider above the preview resizes it, the size is still there after a restart, and a PDF page is rendered large enough to suit it rather than magnified. 30. The filter box narrows the plan as it is typed, `Select all` then checks only what is shown, and the status line says how many checked files are hidden. 31. `With checked` sets every checked file to Trash, or - after a confirmation naming the count - to a permanent delete; the rows change and nothing moves until Apply. 32. Closing the window with files checked and nothing applied asks first. 33. Every setting in Settings explains itself when the pointer rests on it. 34. The columns line up with their headings, whatever the file names are. 35. The layout setting switches between the file list beside the explanation and the file list on top with the preview beside it, and the choice survives a restart. 36. "after a scan" decides whether a fresh plan starts checked or not. 37. The action colours follow the GTK theme: they are its accent, warning and error colours, not a palette of krino's own.