projmux 0.9.0 → 0.10.1
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.
- package/README-ko.md +89 -72
- package/README.md +21 -14
- package/docs/agent-workflow.md +26 -14
- package/docs/architecture.md +2 -2
- package/docs/cli.md +197 -69
- package/docs/configuration.md +4 -3
- package/docs/globalization.md +11 -9
- package/docs/hooks.md +28 -15
- package/docs/keybindings.md +5 -2
- package/docs/legacy-diagnostics-inventory.md +23 -0
- package/docs/native-picker.md +103 -0
- package/docs/operational-diagnostics.md +215 -8
- package/docs/pr-guideline.md +1 -1
- package/docs/resource-attribution.md +77 -4
- package/docs/session-restore.md +18 -0
- package/docs/settings-ia.md +10 -9
- package/docs/statusbar.md +28 -18
- package/docs/tmux-surface-inventory.md +0 -1
- package/docs/upgrading.md +29 -7
- package/docs/usage-tracking.md +63 -19
- package/package.json +5 -5
- package/docs/native-picker-no-fzf-poc.md +0 -227
- package/docs/native-picker-parity.md +0 -155
- package/docs/picker-ui-plan.md +0 -91
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# Native Picker fzf Parity Map
|
|
2
|
-
|
|
3
|
-
This audit note reverse-engineers the subset of fzf behavior that projmux
|
|
4
|
-
currently uses and maps it to native picker evidence. It supports the default
|
|
5
|
-
native picker engine and is not a public dependency-policy change.
|
|
6
|
-
|
|
7
|
-
## App fzf Surface
|
|
8
|
-
|
|
9
|
-
| fzf surface | projmux usage | Native status | Evidence |
|
|
10
|
-
| --- | --- | --- | --- |
|
|
11
|
-
| `--prompt` | AI, settings, shell update, switch, sessions, notify | Covered | `renderNativeInteractive`, `renderNative`; `TestNativePromptLineIncludesInlineMatchCount` |
|
|
12
|
-
| prompt/list separation | native searchable picker chrome | Covered | native renders an explicit `Search` header label plus a separator under searchable prompt/count lines; `TestNativeInteractiveSeparatesSearchHeaderFromList`; Docker no-fzf e2e asserts the `Search` header in Settings, AI settings, mouse-click, switch sidebar, switch popup, sessions popup, and shell Alt-1 PTY logs |
|
|
13
|
-
| `--height 100%` / `--border` | all interactive picker screens | Covered for fullscreen rounded border frame | `renderNativeFrame`; screen-height list budgeting; conservative 80x24 fallback only when terminal size detection is unavailable; `TestNativeInteractiveRendersBorderFrame`; `TestNativeInteractiveUsesAvailableHeightForSimpleLists` |
|
|
14
|
-
| `--header` | AI, settings, shell update, notify | Covered | `renderNativeInteractive`, `renderNative`; settings native tests |
|
|
15
|
-
| `--footer` / `--footer-border line` | AI, settings, shell update, switch, sessions, notify | Covered for interactive native screens | `renderNativeInteractive` reserves bottom footer space and renders a separator line; `TestNativeInteractiveRendersFooterAtBottom` |
|
|
16
|
-
| `--ansi` | colored row labels from render package | Covered | native writes row labels directly, strips ANSI escapes from default search text, restores selected-row styling after embedded ANSI resets, and measures rendered cell width for Korean/CJK text, emoji, and combining marks; `TestFilterItemsIgnoresANSIEscapeSequences`; `TestNativeInteractiveUsesCurrentStyleForSimpleSelection`; `TestVisibleLenUsesTerminalCellWidth`; Docker e2e shows ANSI rows |
|
|
17
|
-
| hidden value after tab delimiter | all picker selections and default fzf matching | Covered by `picker.Item.Value` and default search text | `pickercompat.PickerOptions`; `TestNativeRunnerFiltersAndSelectsByNumber`; `TestFilterItemsSearchesHiddenValueWhenNoSearchKey` |
|
|
18
|
-
| plain fzf candidates without structured entries | compat option call shape | Covered | `pickercompat.PickerOptions`; `TestPickerOptionsFromCompatPickerMapsCandidatesWhenEntriesAreEmpty` |
|
|
19
|
-
| search key filtering (`--nth`/reload filter file) | switch/sessions/notify entries | Covered by `Item.SearchText` with fzf reload order preservation | `FilterItems`; `TestFilterItemsUsesSearchTextNotMetadata`; `TestFilterItemsPreservesSearchKeyOrder` |
|
|
20
|
-
| default `--smart-case` matching | all searchable picker rows | Covered | native filter keeps lower-case queries case-insensitive and uppercase queries case-sensitive; `TestFilterItemsUsesFZFSmartCase` |
|
|
21
|
-
| fzf match highlighting | searchable simple picker rows | Covered for non-search-key simple rows | native highlights matched visible label runes while preserving embedded ANSI style; search-key reload lists intentionally keep fzf disabled-filter rendering without match highlights; `TestNativeInteractiveHighlightsSimpleQueryMatches`; `TestNativeInteractiveDoesNotHighlightSearchKeyReloadLists` |
|
|
22
|
-
| `--disabled --no-input` | navigation-only notify sidebar | Covered | native suppresses prompt/query editing and ignores printable non-action input; `TestNativeInteractiveDisableSearchIgnoresPrintableInput`; Docker no-fzf e2e asserts notify prompt is hidden |
|
|
23
|
-
| fuzzy result ranking | simple non-search-key picker UX | Covered with fzf V2 dynamic scoring for normal app rows | `fuzzyScore`; `TestFilterItemsRanksBetterMatchesFirst`; `TestFilterItemsPrefersFZFBoundaryAndCamelCaseMatches`; `TestFuzzyScoreMatchesFZFV2ReferenceScores` |
|
|
24
|
-
| `--scrollbar █` | long switch/session/settings lists | Covered for app lists | `nativeListLinesWithScrollbarRows`; proportional multi-row thumb rendering in `projmuxpicker`; split-preview and sidebar list viewports keep a fixed row budget and scrollbar track; multi-line cards use rendered-row scroll units; `TestNativeInteractiveUsesScrollbarForLongLists`; `TestListLinesWithScrollbarUsesProportionalThumb`; `TestListLinesWithScrollbarMovesThumbGradually`; `TestListLinesWithScrollbarRowsKeepsViewportTrack`; `TestRenderSplitPreviewRowsKeepsRequestedViewport`; `TestNativeListScrollbarUnitsUseRenderedRowsForMultiline`; `TestNativeInteractiveKeepsMultilineScrollbarOnViewportTrack` |
|
|
25
|
-
| `--read0` multi-line rows | switch, sessions, notify | Covered | `Options.MultiLine`; `TestNativeInteractiveRendersFZFLikeMultilineSelection` |
|
|
26
|
-
| `--gap --gap-line ─` | switch, sessions, notify multi-line rows | Covered for app multiline rows | `nativeGapLine`, row-budgeted range; `TestNativeInteractiveRendersMultilineGapLine`, `TestNativeVisibleRangeCountsMultilineRenderedRows` |
|
|
27
|
-
| selected multi-line marker | selected switch/session/notify cards | Covered for app multiline rows | native uses the same compact pointer-width red `▌` gutter as the first selected project line, and metadata lines align to the project-name column without the old deeper indent; `nativeContinuation`; `TestNativeInteractiveRendersSelectedMultilineContinuationMarker`; `TestInteractiveRowLinesUsesCompactSelectedMetaIndent`; `TestInteractiveRowLinesAlignsUnselectedMetaWithProjectName` |
|
|
28
|
-
| fzf current row colors | simple and multi-line rows | Covered for app rows | `nativeCurrentStart`, `nativePointer`; pointer/continuation gutter tokens carry the current-row background; `TestNativeSelectedContentKeepsCurrentStyleAfterReset`; `TestNativeInteractiveUsesCurrentStyleForSimpleSelection` |
|
|
29
|
-
| `--expect` keys | Enter/Ctrl-X/Alt-P/notify keys | Covered | `pickercompat.PickerOptions`; `TestNativeInteractiveSupportsCustomExpectKeys` |
|
|
30
|
-
| printable expect keys | notify sidebar `a` ack and `x` non-critical clear | Covered | `TestNativeInteractiveSupportsPrintableExpectKeys`; Docker no-fzf e2e |
|
|
31
|
-
| control expect keys | notify sidebar `Ctrl-X`, settings `Ctrl-Alt-S` close | Covered | `TestNativeInteractiveSupportsControlExpectKeys`; `TestNativeInteractiveSupportsControlAltCloseKeys` |
|
|
32
|
-
| close `--bind key:abort` | Esc, Ctrl-C, Alt-N, Ctrl-Alt-S variants | Covered | `CloseActions`; `TestNativeRunnerUsesSharedCloseActions` |
|
|
33
|
-
| terminal modified-key encoding | legacy parser fixtures, Ghostty/kitty-style modified keys | Covered | native handles app-specific parser fixtures, generic modified letters/digits, and non-text keys such as Enter/Esc/Backspace/Tab; this is backend parity, not product fallback guidance; `TestNativeInteractiveSupportsCSIuAppKeyBindings` |
|
|
34
|
-
| `execute-silent(...)+refresh-preview` | switch/session preview cycling | Covered for command execution and rerender loop | `pickercompat.PickerOptions`/`pickercompat.OptionsFromPicker`; `TestNativeInteractiveRunsCustomActionCommandAndRefreshes`; `TestPickerOptionsMapsCompatBindingsToContractActions`; Docker no-fzf e2e sends `Right` and `Alt-Down` before selection |
|
|
35
|
-
| action-local/event-backed mutable refresh | notify sidebar `a` ack and `x` non-critical clear; notify sidebar queue-write event refresh; switch sidebar `Ctrl-X` kill | Covered for in-session row/live-state refresh without picker restart | `picker.Action.Mutate` returns a `DeferredUpdate`, notify queue-write events trigger the same `DeferredUpdate` path after an event arrives, and both reuse the native frame diff renderer plus value-then-clamp selection preservation; `TestNativeInteractiveCustomActionMutatesItemsAndRefreshes`; `TestNativeInteractiveCustomActionRefreshPreservesSelectedValue`; `TestNativeInteractiveDeferredUpdateTriggerRefreshesRepeatedly`; notify sidebar app tests assert one picker invocation with refreshed rows/live state and event subscription; switch sidebar kill app tests assert one native picker invocation with refreshed rows/preview and previous-live-session guard preservation |
|
|
36
|
-
| `focus:execute-silent(...)` | switch sidebar focus | Covered | native renders the selection frame diff before running sidebar focus commands so movement stays visible before tmux focus side effects; `runNativeFocusAction`; `TestNativeInteractiveRunsFocusActionOnSelectionChange` |
|
|
37
|
-
| `start:pos(N)` | switch sidebar initial row | Covered | `pickercompat.PickerOptions`/`pickercompat.OptionsFromPicker`; `TestPickerOptionsFromCompatPickerMapsStartPosToInitialIndex`; `TestPickerOptionsMapsCompatBindingsToContractActions` |
|
|
38
|
-
| `--preview` | switch, sessions | Covered by command output | `nativePreviewLines`; `TestNativeInteractiveRendersSelectedPreview` |
|
|
39
|
-
| `--preview-window right,60%,border-left` | switch popup, sessions popup | Covered for projmux option shape | `renderNativeSplitPreview` renders a single-column left border without a synthetic title row, uses fzf-measured percent sizing, normalizes preview tabs/control bytes before clipping, and pads both panes to fixed row widths so long preview rows do not wrap into extra vertical rows; `TestNativeInteractiveRendersWidePreviewBesideList`; `TestNativePreviewWidthUsesPreviewWindowPercent`; `TestRenderSplitPreviewRowsPadsBothPanes`; `TestRenderSplitPreviewRowsNormalizesPreviewTabsBeforeTruncating` |
|
|
40
|
-
| `--preview-window down,25%,border-top` | switch sidebar | Covered for projmux option shape | `renderNativeDownPreview` renders an immediate top border without a synthetic title row, uses fzf-measured percent sizing, and pads preview rows to the surface width; `TestNativeInteractiveRendersDownPreviewBelowList`; `TestNativePreviewHeightUsesPreviewWindowPercent`; `TestRenderDownPreviewPadsPreviewRows` |
|
|
41
|
-
| preview scrolling | long switch/session preview output | Covered for keyboard preview scroll | `previewOffset`; `TestNativeInteractiveRendersPreviewOffset` |
|
|
42
|
-
| `--query` | typed settings path defaults | Covered | `Options.InitialQuery`; settings tests |
|
|
43
|
-
| `--print-query` accept-query mode | typed settings path prompts | Covered | `Options.AcceptQuery`; `TestNativeRunnerAcceptsTypedQuery` |
|
|
44
|
-
| query cursor editing | typed settings path prompts | Covered | Left/Right, Ctrl-A/E, Delete, Backspace, Ctrl-U/W query editing plus visible prompt cursor; `TestNativeInteractiveEditsTypedQueryAtCursor`; `TestNativeInteractiveSupportsQueryLineEditingKeys`; `TestNativeInteractiveCtrlUDeletesBeforeCursor`; `TestNativePromptLineRendersQueryCursor` |
|
|
45
|
-
| terminal arrow key variants | interactive selection in tmux/docker | Covered | CSI, SS3/application cursor, modified CSI tests; up/down movement wraps at list boundaries while PageUp/PageDown and Home/End remain clamped or explicit jumps; app TTY `/dev/tty` fallback; raw TTY EOF polling keeps split ESC sequences from leaking into the query; `TestNativeInteractiveWrapsPreviousNavigationKeys`; `TestNativeInteractiveWrapsNextNavigationKeys`; `TestNativeInteractiveJumpNavigationRemainsClamped` |
|
|
46
|
-
| mouse support | optional fzf mouse picker interaction | Partially covered | native enables SGR mouse reporting in interactive alternate-screen mode, primary mouse down focuses the clicked row, primary mouse up applies it, and wheel input moves selection; drag gestures remain outside this POC; `TestNativeInteractiveSelectsOnMouseRelease`; `TestNativeInteractiveMouseDownOnlyFocuses`; `TestNativeInteractiveIgnoresMouseReleaseBeforeDown`; `TestNativeInteractiveSupportsMouseWheelSelection`; Docker no-fzf e2e clicks the AI settings row under a PTY |
|
|
47
|
-
| fzf navigation keys | interactive selection in searchable lists | Covered | native maps modified-key `Ctrl-J` plus `Ctrl-N` to down and `Ctrl-P`/`Ctrl-K` to up when not claimed by a custom action; up/down-family movement is safe on empty lists; raw LF remains Enter for PTY compatibility; `TestNativeInteractiveSupportsFZFNavigationKeys`; `TestNativeInteractiveNavigationKeysAreNoopForEmptyList` |
|
|
48
|
-
| alternate-screen lifecycle | fzf fullscreen picker screen restore | Covered | native frame updates and screen exit return to column 0 before terminal control sequences, screen exit resets styles plus clears the alternate buffer from the home cursor before restore, and real TTY restores get a short settle window before caller handoff; `nativeScreenEnter`; `TestNativeInteractiveUsesAlternateScreen`; `TestRenderFullFrameUpdateAlwaysHomesAndWritesFrame` |
|
|
49
|
-
| frame content width | fzf border inner width | Covered | `ContentLayout` uses the frame inner width so separators and rows reach the right border; `TestRendererContentLayoutUsesFrameInnerWidth` |
|
|
50
|
-
| picker-owned app background | native picker frame interior | Covered for renderer-owned cells | `ThemeFromEffective` applies built-in fallback and explicit effective `surface` / `chrome_foreground` SGR to the native frame, and frame rows resume the app style after embedded resets so content padding, empty no-footer rows, footer rows, scrollbars, and preview gaps do not leak terminal default background; `TestThemeFromEffectiveFallbackPaintsFrameBackground`; `TestRendererFrameBackgroundResumesAfterContentResetBeforePadding`; `TestNativeInteractiveNoFooterBlankRowsUseThemeBackground`; `TestNativeInteractiveSplitPreviewGapsUseThemeBackground`; `TestNativeInteractiveSettingsAIBadgeStyleLongPreviewClampsFrameRows` |
|
|
51
|
-
| tmux popup frame interaction | native picker popups launched through `popup-toggle` | Covered for native backend popups | `popup-toggle` passes tmux `display-popup -B` when `PROJMUX_PICKER_BACKEND=native`, so the native picker owns the visible frame instead of double-drawing with the tmux popup border; tmux 3.4 per-command `display-popup -s` is used for the popup body style, setting `bg` from `surface` and `fg` from `chrome_foreground` so tmux's blank/pre-draw popup body matches the native picker surface before the app renderer paints; no global `popup-style`, `popup-border-style`, shell pane background, `default-style`, `window-style`, OSC background, or status/window palette options are changed; native Alt-1 uses a compact native-only minimum while fzf keeps the previous project sidebar minimum; Alt-1/Alt-2 sidebar heights reserve two bottom statusbar rows; Alt-2 notify sidebar keeps the fzf-like `24%` / min `64` baseline; `TestAppRunTmuxPopupToggleUsesBorderlessPopupForNativeBackend`; `TestAppRunTmuxPopupToggleUsesNativePopupBodyStyleFromEffectiveTheme`; `TestBuildPopupToggleWithPickerBackendStylesNativeOnly`; `TestBuildDisplayPopupArgsAddsBodyStyle`; `TestSessionizerSidebarWidthKeepsFZFMinimum`; `TestSidebarPopupHeightLeavesStatusbarRows`; `TestNotifySidebarWidthMatchesFZFBaseline`; `TestAppRunTmuxPopupToggleKeepsNotifySidebarFZFSizingForNative` |
|
|
52
|
-
| optional native titlebar | native picker popup frame | Covered for empty-title compatibility and opt-in titles | `picker.Options.Title`; `RenderFrameWithTitle`; `ContentLayoutWithTitle`; empty titles keep the prior frame unchanged, non-empty titles render in a picker-owned section below the top border, titlebar text/divider/chip gaps inherit the frame `surface` / `chrome_foreground` instead of a separate titlebar overlay ANSI layer, and the native Alt-1 project sidebar opts into `Projects`; `TestRendererRenderFrameWithTitleKeepsDefaultWhenTitleEmpty`; `TestRendererRenderFrameWithTitleUsesTitlebarRow`; `TestRendererContentLayoutWithTitleReservesTitlebarRow`; `TestNativeInteractiveRendersOptionalTitlebar`; `TestSwitchCommandNativeSidebarSetsTitle` |
|
|
53
|
-
| redraw flicker/top clipping | keyboard navigation in exact-height tmux popup | Partially covered | native redraws use synchronized updates plus coalesced row diffs after the first frame, skip unchanged frames, render frame diffs before sidebar focus commands, frame rendering avoids trailing bottom-border CRLF, and screen exit clears the alternate buffer before restore; `TestNativeInteractiveWrapsRedrawsInSynchronizedUpdates`; `TestFrameUpdateRendererSkipsUnchangedFrame`; `TestFrameUpdateRendererCoalescesEachFrameUpdate`; `TestRendererRenderFrameUsesCRLFRowsForRawTTY`; `TestNativeInteractiveUsesAlternateScreen` |
|
|
54
|
-
|
|
55
|
-
## Native Surface Architecture
|
|
56
|
-
|
|
57
|
-
- `internal/ui/picker` remains the backend-neutral contract and owns native
|
|
58
|
-
routing, keyboard input, fuzzy filtering, action dispatch, preview command
|
|
59
|
-
execution, and result handling.
|
|
60
|
-
- `internal/ui/projmuxpicker` owns projmux-native visual composition: frame,
|
|
61
|
-
redraw updates, ANSI width/truncation, theme tokens, prompt/footer/list
|
|
62
|
-
rendering, selected row styling, scrollbars/gap rows, and preview pane
|
|
63
|
-
geometry/rendering.
|
|
64
|
-
- `internal/ui/pickercompat` remains as the internal compatibility option/result
|
|
65
|
-
mapper from older app option shapes to `picker.Options` for the native
|
|
66
|
-
backend. It is not a runtime backend. This keeps app code closer to a
|
|
67
|
-
DI-style picker contract instead of embedding binding strings at each call
|
|
68
|
-
site.
|
|
69
|
-
- Settings > Labs remains available for Live system resources and Project
|
|
70
|
-
Hooks, but no longer exposes picker backend/source information. Deprecated
|
|
71
|
-
saved/env backend values remain read-compatible and normalize to native.
|
|
72
|
-
- The split lets projmux grow a first-party picker design independently from
|
|
73
|
-
the compatibility option/result mapper.
|
|
74
|
-
|
|
75
|
-
## Frame Chrome ANSI
|
|
76
|
-
|
|
77
|
-
Native picker frame chrome is normalized in `internal/ui/projmuxpicker`.
|
|
78
|
-
Titlebar text, title dividers, and chip-strip gaps inherit the frame
|
|
79
|
-
`surface` / `chrome_foreground` instead of applying a second titlebar overlay ANSI layer;
|
|
80
|
-
chip bodies can still carry active/inactive/disabled tones. Search prompt and
|
|
81
|
-
footer separators fill the available frame width, and header, row, footer, and
|
|
82
|
-
preview lines close any active SGR style before padding or frame borders can
|
|
83
|
-
inherit it. This phase does not add popup modes or change the `popup-toggle`
|
|
84
|
-
contract; native popups still rely on the existing borderless tmux popup path.
|
|
85
|
-
|
|
86
|
-
## Verified Flows
|
|
87
|
-
|
|
88
|
-
- `ai` picker/settings: native backend routing covered by app tests. Docker
|
|
89
|
-
no-fzf e2e also types `Codex` into `projmux ai settings` and verifies the
|
|
90
|
-
native simple picker writes the `codex` mode without fzf.
|
|
91
|
-
- `shell` update prompt: native backend routing covered by shared compat-to-native
|
|
92
|
-
bridge and settings-style typed prompt tests.
|
|
93
|
-
- `settings`: native backend exercised in unit tests and Docker no-fzf e2e
|
|
94
|
-
using Enter plus arrow-key navigation under a PTY. The Docker e2e also fails
|
|
95
|
-
if the Settings flows write tmux no-server noise to stderr while running
|
|
96
|
-
outside tmux.
|
|
97
|
-
- `settings > Labs`: unit and Docker no-fzf coverage assert only Live system
|
|
98
|
-
resources and Project Hooks are visible. The Docker smoke starts with legacy
|
|
99
|
-
`fzf` env/file values, verifies Settings still uses native without fzf, and
|
|
100
|
-
confirms the compatibility file is read without being rewritten.
|
|
101
|
-
- `switch --ui=sidebar`: Docker no-fzf e2e creates sample projects, types
|
|
102
|
-
`bravo`, selects `bravo-web`, and confirms the opened tmux shell path.
|
|
103
|
-
- `switch --ui=popup`: Docker no-fzf e2e creates existing tmux sessions using
|
|
104
|
-
the app's session naming convention, runs the picker under a 150x30 PTY,
|
|
105
|
-
types `bravo`, sends `Right` and `Alt-Down` to exercise preview window/pane
|
|
106
|
-
cycle, asserts the popup stays on the right-side preview layout instead of
|
|
107
|
-
inline preview, asserts the stored preview cursor, selects `bravo-web`, and
|
|
108
|
-
asserts tmux reports the selected session's active target on the expected
|
|
109
|
-
window with the expected pane path.
|
|
110
|
-
- `sessions --ui=popup`: Docker no-fzf e2e creates existing tmux sessions,
|
|
111
|
-
runs the picker under a 150x30 PTY, types `bravo`, sends `Right` and
|
|
112
|
-
`Alt-Down` to exercise preview window/pane cycle, asserts the popup stays on
|
|
113
|
-
the right-side preview layout instead of inline preview, asserts the stored
|
|
114
|
-
preview cursor, selects `bravo-web`, and asserts tmux reports the selected
|
|
115
|
-
session's active target on the expected window with the expected pane path.
|
|
116
|
-
- `notify sidebar`: native routing is unit-covered; app tests cover
|
|
117
|
-
queue-write event subscription and picker tests cover repeated
|
|
118
|
-
event-triggered deferred refresh. Docker no-fzf e2e pushes a notification,
|
|
119
|
-
presses printable expect key `a`, and verifies the row is acked.
|
|
120
|
-
|
|
121
|
-
## Experimental Boundaries
|
|
122
|
-
|
|
123
|
-
- Preview-window parity is covered for the concrete projmux option shapes
|
|
124
|
-
(`right,60%,border-left` and `down,25%,border-top`) with fzf-measured percent
|
|
125
|
-
sizing. The full fzf preview-window grammar, threshold alternatives, sticky
|
|
126
|
-
headers, and offset expressions are intentionally outside this POC surface.
|
|
127
|
-
- fzf V2 dynamic scoring is covered for normal app-length non-search-key
|
|
128
|
-
rows, including reference scores for boundary, delimiter, camelCase/number,
|
|
129
|
-
gap, and consecutive bonuses. Very large `query * row` matrices intentionally
|
|
130
|
-
fall back to the greedy scorer to avoid pathological memory use. Search-keyed
|
|
131
|
-
app pickers preserve fzf's `--disabled` reload order instead of score-sorting.
|
|
132
|
-
- Mouse support is intentionally narrow in this POC: primary mouse down focuses
|
|
133
|
-
the clicked row, primary mouse up applies it, and wheel input moves selection.
|
|
134
|
-
Drag gestures and the full fzf mouse grammar are follow-up work.
|
|
135
|
-
- The public doctor/docs dependency policy no longer includes an external
|
|
136
|
-
picker binary.
|
|
137
|
-
- Draft PR: https://github.com/crevissepartners/projmux/pull/98.
|
|
138
|
-
|
|
139
|
-
## Commands
|
|
140
|
-
|
|
141
|
-
Automated no-fzf e2e:
|
|
142
|
-
|
|
143
|
-
```sh
|
|
144
|
-
wt run poc/native-picker-no-fzf -- scripts/poc-native-picker-no-fzf-e2e.sh
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Interactive no-fzf sandbox:
|
|
148
|
-
|
|
149
|
-
```sh
|
|
150
|
-
bash "$(wt path poc/native-picker-no-fzf)/scripts/poc-native-picker-no-fzf-sandbox.sh"
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Do not run the interactive sandbox through `wt run`: current `wt run` captures
|
|
154
|
-
child stdio instead of forwarding the caller's TTY, so Docker cannot attach
|
|
155
|
-
`-it` and terminal picker input will not behave like a real session.
|
package/docs/picker-ui-plan.md
DELETED
|
@@ -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.
|