summaryrefslogtreecommitdiff
path: root/docs/gui-checklist.md
blob: 641d208ef555bf83bf2b4e7324a8b9507c0c9ec4 (plain) (blame)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# 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.
38. Once a plan has been applied its checkboxes, Select all, None and With
    checked are all off, and the status line says to press Scan for a fresh
    plan - an applied plan is history, not a list to keep working from.
39. In Settings, the window half needs no saving and says so; Save
    krino.conf is lit only when the defaults above it have changed.
40. Both dividers stay where they are dragged, per layout, across a
    restart, and a list narrower than its columns still starts at the file
    names rather than scrolled past them.
41. Size and age read in krino's own units, and each of size, age and rule
    can be turned off in Settings.
42. A selected row's action stays readable: it takes the row's own
    foreground rather than keeping its colour on the selection background.
43. The explanation beside the list is centred: the file's name, its size
    and age, then a line per step with the action coloured.