Files
DarkRoom/docs/gestures.md
T
dtourolleandClaude Opus 5 31a3580f9d Extract the gesture vocabulary from the code that implements it
Every gesture the application has was documented in the comment beside
the `TouchArea` that implements it. Excellent comments, and unreachable
by anyone not reading the source — which is the FR-UI-4 failure in a
different costume: a gesture nobody can find is a feature only its author
knows about.

Writing them out again in a hand-kept help page is the failure this
avoids. Two descriptions of one gesture drift, and it is always the prose
that drifts: the code is exercised every time somebody uses the
application and the page is exercised never. A help screen confidently
describing a double tap the grid stopped honouring last week is worse
than no help screen — and the grid did stop honouring one, in the commit
before this.

So the comment beside the implementation stays the only copy, and a
`GESTURE:` block beside it is scanned into two artefacts: `docs/gestures.md`
for a reader, and a Rust table for the application to draw a help sheet
from. Both committed, both gated, so neither can quietly stop describing
the code.

It lives in the traceability crate because it is the same operation on
the same input — walk the tree, pull structured tags out of comments,
render, fail if the committed artefact has moved. Only the vocabulary is
new. It scans `ui` and `apps` alone: a gesture needs an interface to be
performed on, and excluding `tools` is also what stops the scanner
extracting its own worked examples as broken gestures.

Fifteen gestures so far, across the library grid and the People screen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 00:09:49 +02:00

148 lines
6.1 KiB
Markdown

# How the application is driven
<!-- GENERATED FILE — do not edit by hand. -->
<!-- Regenerate: cargo run -p traceability -- gestures -->
Every entry here is extracted from the comment beside the code that implements it, so this file cannot describe a gesture the application does not have. Add one by writing a `GESTURE:` block next to the implementation; there is nowhere else to write it.
15 gestures, in 2 places.
## People
### Pull a face out of the wrong person
- **Touch** — Tap the faces that do not belong, then "Split off"
- **Pointer** — Click the faces that do not belong, then "Split off"
Grouping over-merges on siblings, on parents and children, and on the same person a decade apart, so splitting is as prominent as merging. A tool that can only merge makes its own errors permanent.
<sub>`ui/dr-ui/ui/identity.slint:130`</sub>
### Rule on a suggested face
- **Touch** — Tick to confirm it, cross to reject it
- **Pointer** — Tick to confirm it, cross to reject it
A face is either the system's guess or the user's judgement, and the two are never conflated. A rejection is remembered, so the face is not suggested for that person again.
<sub>`ui/dr-ui/ui/identity.slint:150`</sub>
### See a person's photographs
- **Touch** — Choose them in the rail, then "Show photos"
- **Pointer** — Choose them in the rail, then "Show photos"
This is the point of having identified anybody. Without it the screen is a filing cabinet with no drawer handles.
<sub>`ui/dr-ui/ui/identity.slint:545`</sub>
### Change how faces are grouped
- **Touch** — "Grouping…", move the dials, then Regroup
- **Pointer** — "Grouping…", move the dials, then Regroup
The right match confidence is a property of your library, not of the model. "What would this do?" answers for this library without writing anything; names, confirmations and the groups you have set aside are kept whatever the dials say.
<sub>`ui/dr-ui/ui/identity.slint:582`</sub>
## Library grid
### Start selecting several photographs
- **Touch** — Press and hold a photograph, or press Select in the header
- **Pointer** — Ctrl-click, or press Select in the header
Touch has no ctrl, so without a mode there is no way to select a second photograph — the first tap would open it. The hold is the fast way in and the button is the one that can be found.
<sub>`ui/dr-ui/ui/library.slint:1259`</sub>
### Add or remove one photograph
- **Touch** — While selecting, tap it
- **Pointer** — Ctrl-click it
While selecting, a tap never opens. That is the whole point of the mode: one meaning per gesture at a time. Press Done to get tap-to-open back.
<sub>`ui/dr-ui/ui/library.slint:1268`</sub>
### Leave selecting
- **Touch** — Press Done in the header
- **Pointer** — Press Done in the header
- **Keyboard** — Escape
<sub>`ui/dr-ui/ui/library.slint:1276`</sub>
### Select a range
- **Touch** — While selecting, press "Select to…", then tap the last photograph of the run
- **Pointer** — Shift-click the last photograph of the run
This replaced a double tap, which had no visible state and could take forty photographs by accident. The run is resolved by the catalog rather than by what is on screen, so the grid can scroll between the two taps — the ranges that hurt on a tablet are longer than a screenful, which is exactly where a finger sweep runs out.
<sub>`ui/dr-ui/ui/library.slint:1337`</sub>
### Find photographs with two people in them
- **Touch** — Open the People chip on the filter bar, tap each name, then switch the chip beside them to "all of them"
- **Pointer** — Open the People chip on the filter bar, click each name, then switch the chip beside them to "all of them"
"Any of them" is a union and "all of them" is an intersection. The tray is where both terms and the choice between them live, because a filter belongs on the filter bar.
<sub>`ui/dr-ui/ui/library.slint:2076`</sub>
### Drop the selection but keep selecting
- **Touch** — Press Clear in the selection strip
- **Pointer** — Press Clear in the selection strip
Distinct from Done, which leaves the mode entirely. Clearing keeps it, so the next selection can start straight away.
<sub>`ui/dr-ui/ui/library.slint:2367`</sub>
### Select everything the grid is showing
- **Touch** — While selecting, press "Select all"
- **Pointer** — While selecting, press "Select all"
A scoped grid of two hundred frames is two hundred taps otherwise, and "all of them, except those three" is a far more common shape than the taps it took to say it.
<sub>`ui/dr-ui/ui/library.slint:2384`</sub>
### Resize the thumbnails
- **Touch** — Pinch the grid with two fingers
- **Pointer** — Ctrl and the scroll wheel
There is no wheel on a tablet, so without the pinch the cell size could only be changed by a control a finger cannot reach.
<sub>`ui/dr-ui/ui/library.slint:2825`</sub>
### File photographs in a collection
- **Touch** — Drag a photograph — or a whole selection — onto a collection in the sidebar. Starting a drag stops the press becoming a hold, so it cannot leave you in selection mode.
- **Pointer** — Drag a photograph — or a whole selection — onto a collection in the sidebar
The selection is what the drag carries, which is why selecting several is worth the mode: forty photographs file in one gesture.
<sub>`ui/dr-ui/ui/library.slint:2974`</sub>
### Open a photograph
- **Touch** — Tap it — a single tap, any length
- **Pointer** — Click it
A tap opens; a tap that *moved* does not. Travel is what separates a deliberate tap from a hand brushing past, and it is the only thing that does: the two are the same length. An earlier version required the finger to dwell 120 ms instead, and that rejected ordinary taps — a real tap is often quicker than a brush.
<sub>`ui/dr-ui/ui/library.slint:3204`</sub>
### Rate a photograph without opening it
- **Touch** — Tap a star on the cell
- **Pointer** — Hover the cell, then click a star
- **Keyboard** — 0 to 5 on the selection
A star has to take the press without it also reaching the cell, or every rating throws the user into develop.
<sub>`ui/dr-ui/ui/library.slint:3316`</sub>