1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# 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.
|