projmux 0.8.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,91 +0,0 @@
1
- # Picker UI Plan
2
-
3
- ## Goal
4
-
5
- The project switcher needs a rich native picker surface. The target interaction
6
- is a card-like list where each item can show a title plus small contextual lines
7
- such as session state, window/pane summary, branch, or path. Search should stay
8
- focused on stable identity text, especially the project or session title,
9
- instead of matching every contextual preview line.
10
-
11
- ## Current Contract
12
-
13
- The picker contract is split in two layers:
14
-
15
- - `internal/ui/picker` owns backend-neutral items, actions, preview metadata,
16
- title-focused filtering, and the native runner.
17
- - `internal/ui/pickercompat` is an internal compatibility option/result shape
18
- for older app call sites. It is not a runtime backend, and product flows do
19
- not execute the external fzf binary.
20
-
21
- ## fzf Capability Check
22
-
23
- This section is historical context. Earlier design work evaluated fzf because it
24
- supported multi-line items with `--read0`, where a single item can contain
25
- newline characters when input records are NUL-delimited.
26
-
27
- The simple fzf option path is not enough for the desired search behavior:
28
-
29
- - `--read0` can display multi-line items.
30
- - `--nth` can restrict search to selected fields.
31
- - `--with-nth` can transform the displayed fields.
32
- - In practice, once `--with-nth` is used to show a card field, fzf searches the
33
- transformed visible text. Context lines become searchable.
34
-
35
- So fzf can support "multi-line cards", but not "multi-line cards with title-only
36
- search" through a small option-only extension while preserving the current
37
- selection contract.
38
-
39
- ## Viable Paths
40
-
41
- ### 1. fzf card approximation
42
-
43
- Use `--read0` and NUL-delimited multi-line entries. This is the smallest change,
44
- but contextual card text will participate in search unless the visible card is
45
- kept title-only. This does not meet the intended search model.
46
-
47
- This path is retired and is not supported.
48
-
49
- ### 2. fzf custom filtering
50
-
51
- Run fzf in a more controlled mode where query changes reload a filtered list
52
- from `projmux`, and `projmux` performs title-focused matching. This keeps fzf as
53
- the renderer but moves filtering into the app.
54
-
55
- Tradeoffs:
56
-
57
- - More shell quoting and reload complexity.
58
- - More edge cases around selection identity and tracking.
59
- - Still constrained by fzf's list layout and event model.
60
-
61
- This bridge path is retired and is not supported.
62
-
63
- ### 3. Native picker TUI
64
-
65
- Introduce a picker abstraction and implement a native terminal UI for card rows,
66
- title-focused search, stable selection identity, and app-owned key handling.
67
-
68
- This best matches the desired product direction:
69
-
70
- - card rows are first-class data, not encoded fzf strings
71
- - search fields are explicit
72
- - preview/context fields can be visible but non-searchable
73
- - future key behavior can be tested without relying on fzf internals
74
-
75
- ## Implemented Direction
76
-
77
- Do not extend the retired fzf row format again. The previous hidden-field attempt
78
- showed that small fzf encoding changes can break selection and navigation in
79
- subtle ways.
80
-
81
- Current implementation:
82
-
83
- - Picker-domain model exists as `picker.Item` with `Title`, `Value`,
84
- `SearchText`, `MetaLines`, `Badges`, and `PreviewTarget`.
85
- - `picker.Options` carries backend-neutral actions, preview metadata, prompt,
86
- footer, initial query, and multiline intent.
87
- - Native is the picker backend and renders the popup/sidebar surfaces.
88
- - Native supports multiline item rendering, title-focused search via
89
- `SearchText`, numeric selection, and shared close actions.
90
- - Switcher popup/sidebar use native preview panes, raw-key navigation, and
91
- sidebar focus tracking.