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
|
#+TITLE: The label matches what the prompt does
#+SLUG: label-matches-behavior
#+PRINCIPLE: A visible choice's label has to match what picking it does; visibility without accuracy still leaves the user with the wrong model.
#+PROBLEM: A uniform sentinel label ("none") used across prompts that mean different things (one means "any", another means "cancel") misdescribes what the choice does.
#+TAGS: completing-read prompts labels sentinel
#+SOURCE: pearl commit 505e707 (filter vs saved-query prompts), handoff note 2026-05-28
#+EXAMPLES: pearl filter dimensions ([ Any. ]) vs pick prompts ([ Cancel. ])
* Problem
Once "no value" is a visible candidate (see [[file:no-empty-input-as-meaningful.org][no-empty-input-as-meaningful]]), the next trap is a label that doesn't match behavior. Pearl used =[ None. ]= uniformly, but it meant two different things. For a filter dimension, picking it meant "no constraint, every value matches," which is any, not none. For a pick-an-existing-thing prompt (delete, run), it meant "don't act on anything," which is cancel. A label that says "none" when the behavior is "any" leaves the user holding the wrong model, no better than the invisible empty-input idiom it replaced.
* Do
Give each behavior a sentinel whose label states what picking it does:
- =[ Any. ]= for a filter dimension (no constraint, everything matches)
- =[ Cancel. ]= for a pick-an-existing-thing prompt (act on nothing)
A generic =with-sentinel SENTINEL CANDIDATES= helper lets each call site choose the label that fits. One opt-out predicate recognizes any sentinel (and nil/empty) so downstream logic stays uniform.
* Anti-pattern
One sentinel label reused across prompts whose semantics differ. Visibility without accuracy is its own failure: the user sees the choice, but its name describes the wrong outcome.
* Applicability
Anywhere a sentinel or "special" choice appears in more than one prompt with different meanings. The fix is per-call-site labels over a shared predicate, not a single label stretched to cover both.
* Related
The accuracy half of the root principle. Sharpens [[file:no-empty-input-as-meaningful.org][no-empty-input-as-meaningful]]: visible and accurately labeled.
|