Repository navigation
fix(pi): make supervision model picker searchable and scrollable - #3099
Merged
Merged
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (8): Last reviewed commit: "no-mistakes: apply CI fixes" | Re-trigger Greptile |
Pi's generic extension selector renders every option at once with no search box, so a real eligible catalog ran off the top of the terminal. The model step now draws the same rows through Pi's own SelectList - the bounded scrolling primitive behind Pi's /model picker - with Pi's own Input and fuzzy filter above it for search, keeping 'Follow main' first, the branch-runtime eligibility filter intact, and the pick branch-only. Pi's ModelSelectorComponent is deliberately not reused: its selection handler writes the captain's default model through Pi's settings manager, which would move main's conversation as a side effect of pinning the branch. The effort step's menu is a handful of levels and stays on Pi's plain selector dialog.
kunchenguid
force-pushed
the
fm/fm-supervision-model-picker-ux-r1
branch
from
August 26, 2026 08:05
a12df8f to
903bb86
Compare
kunchenguid
force-pushed
the
fm/fm-supervision-model-picker-ux-r1
branch
from
August 26, 2026 19:06
6359ae2 to
5878f44
Compare
This was referenced Aug 27, 2026
akrcdev
added a commit
to akrcdev/firstmate
that referenced
this pull request
Aug 29, 2026
Intent
Fix the /supervision-model picker UX in Firstmate's Pi supervision-branch extension (.pi/extensions/fm-branch-supervision.ts) so its model list scrolls and is searchable, matching Pi's own /model picker, instead of overflowing the screen.
Captain-reported problem: running /supervision-model rendered a very long model list that overflowed the terminal with no way to search or filter it. Root cause: the command built its chooser with the generic ctx.ui.select(), whose ExtensionSelectorComponent renders every option at once with no search box.
What was asked and decided:
Tests: a headless driver test in tests/fm-pi-branch-extension.test.sh runs the real picker component through a scripted ui.custom, asserting the bounded visible count, 'Follow main' first, the eligibility filter, that typing narrows the list, that cancelling changes nothing, and that pinning writes only the branch config and never touches a main-model setter; a unit test of the lib's ordering/filtering including a rank-reversing filter proves 'Follow main' stays first; and a real-package guard (self-skipping when the npm package is absent) imports the installed Pi's SelectList/Input/fuzzyFilter/DynamicBorder, renders a 42-row catalog through the real SelectList, asserts it stays bounded, and fails naming the installed Pi version if a primitive disappears. Docs: docs/configuration.md (the operator-facing owner) describes the bounded searchable list and the branch-only guarantee; docs/verification/runtime-backends.md records the dated evidence. The picker component's own rendering/scrolling/key handling is Pi's code, covered by that real-package guard rather than by unit tests of Pi internals.
IMPORTANT branch state - this head is FINAL and already carries every fix this pipeline's own earlier runs applied on this branch: the stock macOS bash 3.2 compatibility rewrite of the changed test file, the escaped \0 'follow main' sentinel instead of a raw NUL byte in the source, the documentation wording, and the docs/verification wording tweak. Those earlier runs were cancelled only because each auto-fix push moved the head after the PR-body attestation was written, leaving 'PR must be raised via no-mistakes' red while every other check passed. No code was ever hand-edited. This run's purpose is to re-validate the unchanged head and re-bind the attestation to it; no further content changes are expected or wanted, and cosmetic rewording of already-accurate documentation is not a needed fix.
Delivery: no-mistakes pipeline, yolo OFF - the captain owns the merge. Escalate any ask-user finding rather than answering it.
What Changed
SelectList, searchableInput, fuzzy filtering, and existing branch-runtime eligibility rules.Risk Assessment
✅ Low: The change is well-bounded, preserves eligibility and branch-only model persistence, and implements searchable bounded rendering through Pi’s supported primitives with behavior-focused coverage.
Testing
Inspected the target diff, ran the focused branch-extension regression including the real Pi-package primitive guard, and exercised the actual Pi 0.82.0 TUI end to end. The picker displayed a bounded 10-row window, filtered 16 choices to four after typing “mini,” kept Follow main first, and cancellation persisted no model or effort pin.
Evidence: Raw ANSI transcript from the real Pi TUI session
Source: Raw ANSI transcript from the real Pi TUI session
Evidence: Manual verification result
Source: Manual verification result
Real Pi 0.82.0 TUI: /supervision-model opened 16 eligible choices in a 10-row scrolling window; typing "mini" narrowed it to 4 rows with Follow main first; Escape left both branch pin files absent.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git status --short && git diff --stat 07bf0c8556c70b5241516efad0e51f802484c748..5878f44b7cd56122119ea91f3a67493e15416a5fbash tests/fm-pi-branch-extension.test.shpi --offline --list-modelsReal Pi 0.82.0 TUI launched in a 100×30 pseudo-terminal; opened/supervision-model, typedmini, pressed Escape, and asserted both supervision branch pin files remained absent.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.