Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

11.2 KB
Raw Blame

hn lists vs fzf 0.67 — round 19

Score: 9.0 / 10. The rendering and normal key/mouse behavior are substantially closer to fzf than round 18. All 75 targeted baseline comparison cases passed. The remaining material inconsistency is session search: an OR-only query loses external conversations, and a bound search(...) does not ask the session index. Two smaller action-chain/rendering edges are new below.

Reviewed 32f43bb0d541445c312b739d39c2d9265ca45c6a, using a private copy of the frozen executable. SHA-256: 1df2f355d7b3d5841d91f53a36d744234d93145108768a88565aeacf4cc8b3f9. Reference programs: fzf 0.67.0 (Homebrew) and tmux 3.5a. This report describes that frozen build, including findings subsequently sent to the implementer. No product source was edited by this reviewer. Creature/tim was excluded.

Comparisons used real side-by-side tmux panes, capture-pane -e, foreground/background/SGR parsing, and visible cursor coordinates. The key-list fixture supplies hn and fzf with the same rows. Hidden cursor coordinates are ignored only when both programs hide the cursor. Session search was exercised against the repository mock, with a private copy using the index's letter/digit tokenization for these Latin queries and an optional 14-turn tail. This is not a test of the real daemon's index or remote latency.

Prior findings rechecked

Area Result on frozen build Evidence
Hidden input and section boxes Fixed layout19.py, plus misc17.py ... no-input: hiding/removing/restoring the input matches fzf, including full/reverse layouts.
--info-command Fixed in the rechecked cases ANSI output, empty output, inline/right modes, position/query/counts, and multi-selection count match. raw-edge19.py also matches FZF_RAW. A new FZF_INPUT_STATE toggle case matched.
Four section label positions Fixed Positive/negative positions and bottom edge: layout19.py, five position cases.
Jump edges/events Fixed Empty/wide pointer, striped padding, reverse layout, limited labels, selection, cancellation, and jump-cancel query change: misc17.py.
Mouse marking and list-border clicks Fixed Right-click, shift-click, shift-wheel, section/border clicks, scrollbar movement, reverse and disabled mouse: mouse17.py, 10/10.
NFD and Thai horizontal scrolling Fixed Widths 44, 36, 30; end, clear, cafe: thai17.py, 12/12 snapshots.
Short separator beside section borders Fixed sb18c.py, 10/10 combinations.
--black, --no-black, explicit background precedence Fixed layout19.py.
Raw matching/navigation/selection Fixed raw19.py 12/12, raw-edge19.py 3/3: nonmatches, gutter/styles, --tac, reverse, wrap, match-only movement, best/first, toggles and bulk selection.
ANSI prompt over configured attributes Fixed Three prompt/SGR/reset/trailing-space cases in layout19.py.
Search spinner Fixed A private 900 ms reply delay produced all ten spinner glyphs, then cleared at 1.15 s. spinner19.py; no spinner stayed after completion.
Negative session queries, round-18 H1 Fixed !decimal → 7/8; decimal !billing → 0/8; !nfc → 8/8, with no excluded conversation appended.
OR-only session query, other limb of round-18 H1 Remains nfc | decimal → billing only, 1/8. M1 below.
Search-result blinking, round-18 M1 Fixed in the timed repro Starting from reader, append drop one character at a time. NFC stayed visible in every sample, taken roughly every 30–50 ms for 0.55 s per character.
Unlit snippet, round-18 M2 Fixed keep awake shows Keep it awake…; floats shows Move invoices off floats. Matching cells use current-row highlight color 151. Preview matches are distinguishable even inside bold asks (color 108).
Help keys unsearchable/pre-highlighted, round-18 M3 Fixed ?C-b z returns ranked matches with Zoom first; ?M-1 and ?PPage each return 1/103. Keys highlight only where matched.
Negation inside keyword OR group, round-18 L1 Remains L3 below.
Explicit preview +N / fixed ~N header Still observed With a 48-line tail and right,50%,~3,+3 at 160×24, hn's narrow preview opens at 42/48, and three S-Up presses move it to 39/48, with no fixed header. C-/ hides it and returns its space. This repeats the old limitation; a full paired preview comparison was not rerun in this bounded round.

The baseline totals are 14 layout + 23 misc + 10 mouse + 12 raw + 3 raw-edge + 10 separator + 3 Thai-width cases = 75, all matching captured cells and applicable cursor positions. These are targeted regressions, not a repeat of round 18's entire query fuzz, 55-key, theme, or preview matrix. Older backlog items not listed above were not recertified.

Confirmed remaining findings

No Critical findings or crashes were observed.

M1 — OR-only queries still omit external conversations

This is the remaining OR limb of round-18 H1, reduced in severity because the negation cases now work.

Repro: run sessions19.py below. Open C-b s with the demo mock, clear the query, and type nfc | decimal. The mock contains Continue NFC device chat, whose title matches the first branch, and the billing harness, whose visible detail matches the second.

actual hn:   1/8   Refactor billing service … Invoices now use Decimal …
expected:          billing and Continue NFC device chat
control:     reader → 2/9, including Continue NFC device chat

The normal fzf OR model retains either matching row; the key-list reference exercises that model directly. Here said_terms drops both OR alternatives and produces an empty index query. input.rs then clears the external search rows instead of searching either alternative. The count difference is caused by discovery, not by fzf ranking. Capture: out/session-03-nfc_|_decimal.ansi; paired controls are in out/sessions.log.

Suggested fix: search the necessary alternatives, combine/deduplicate their hits, then apply the complete query before offering them. A query whose only positive terms are alternatives still needs discovery.

M2 — search(...) bindings do not use session search

Repro: sessions19.py, with:

FZF_DEFAULT_OPTS="--preview-window=hidden --bind 'ctrl-l:clear-query,alt-f:search(reader),alt-0:first'"

Clear the C-b s query, press Alt-f, then compare with clearing and typing reader.

Alt-f:         1/8, only the scattered-letter billing match
session_search request count: 8 → 8
Type reader:   2/9, NFC conversation first plus billing

A search(reader) action correctly leaves the displayed input unchanged; it should nevertheless search the same corpus as typing reader. The key-list fzf comparison confirms its filtering behavior. hn's bound action updates picker.search, while the index scheduling and hit identity use only picker.query. Capture: out/session-bound-search.ansi; request counts and the typed control are in out/sessions.log.

Suggested fix: derive index requests and hit applicability from the effective search expression, while preserving the visible input as fzf does.

L1 — change-multi+toggle uses the old marking state for the rest of the chain

Repro: actions19.py multi-chain. Start without --multi, with 40 key rows and:

FZF_DEFAULT_OPTS="--bind 'alt-m:change-multi+toggle,alt-z:change-multi(0)+toggle'"
                    hn                  fzf 0.67
first Alt-m         40/40 (0), no mark   40/40 (1), current row marked ┃
second Alt-m        40/40 (1), marked    40/40 (0), current row unmarked
Alt-z               identical           identical

The initial screen matches. Both differing snapshots affect the marker and info count only. bound_actions receives one multi boolean and continues using it after change-multi changes the mode. Evidence: out/actions.log.

L2 — Dynamic section labels discard ANSI styling

Repro: actions19.py label-list label-input label-header label-footer. Example options, with a literal ESC generated portably:

esc=$(printf '\033')
FZF_DEFAULT_OPTS="--list-border --list-label=before --bind 'alt-l:change-list-label(${esc}[32m green ${esc}[0m)'"

Press Alt-l. Text and position match, but hn paints green with foreground 145; fzf paints it 2 (green). The same result occurs for change-input-label, change-header-label, and change-footer-label (the latter with --footer=foot). The four static ANSI section labels work; the dynamic actions remove their SGR with strip_ansi. Evidence: four one-row color differences in out/actions.log.

L3 — Removing a negated keyword still joins its OR neighbors

This is round-18 L1, not a new regression.

Repro: edges19.py keyword-or, same 40 key rows, type:

bindings | !zz $
hn:         40/40, all 40 bindings remain
fzf 0.67:   0/40

The lines contain bindings, but no literal $. fzf applies (bindings OR !zz) AND $. The extra-keyword fallback drops !zz before building its OR groups, effectively admitting rows through bindings OR $. The actual captured cells/counts are in the CASE keyword-or section of out/edges.log.

Exact reruns and isolation

Reusable drivers, fixtures, logs and ANSI captures remain in /tmp/hnr19fz-review/. Run from a checkout with the existing cli/node_modules, Python 3, Node, tmux 3.5a and fzf 0.67 on PATH. The driver accepts HNR19FZ_REPO so the checkout can be anywhere. The original frozen executable remains hn in that private directory; do not replace it while any test is running.

export HNR19FZ_REPO="$(git rev-parse --show-toplevel)"
cd /tmp/hnr19fz-review

python3 actions19.py
python3 sessions19.py
python3 edges19.py keyword-or

python3 layout19.py
python3 misc17.py 19511 jump info-command no-input
python3 mouse17.py 19512
python3 thai17.py 19510
python3 sb18c.py 19511
python3 raw19.py
python3 raw-edge19.py
python3 spinner19.py

The scripts encode the exact sizes, rows, query strings and key sequences. KPair uses a 40-binding throwaway tmux config and feeds those exact drawn lines to real fzf. hn's status row is excluded from the fzf comparison. For manual runs of either program, use the driver classes rather than an unqualified hn/tmux command.

All hn invocations use the copied executable, -L hnr19fzr_<case>, matching HN_SOCKET_NAME, PORT plus --port in 19510–19519, throwaway HOME, and HN_TMPDIR=/tmp/h19fza. TMUX, TMUX_PANE and HN_SOCKET are removed both outside and inside outer tmux children. Every tmux command has -L hnr19fzr…. The port guard rejects every port outside the assigned range, and each hn object requires that its mock was started by that driver. Ports 18473/18907, default sockets, real daemons and installed hn were never used.

Pairs and mocks register cleanup, and traced cases clean up in finally. Cleanup terminates only exact owned hn PIDs and their descendants, plus their named tmux servers and mock processes; no broad pkill is used. Final inspection found no review process and no listener on 19510–19519. Only this review's stale socket files were removed. No commit, push, merge, release or installation was performed.