Skip to content

Model Groups searchable picker and inline name editor - #21

Merged
ofriw merged 3 commits into
mainfrom
model-tag-router/model-groups-searchable-capped-picker
Aug 3, 2026
Merged

Model Groups searchable picker and inline name editor#21
ofriw merged 3 commits into
mainfrom
model-tag-router/model-groups-searchable-capped-picker

Conversation

@grzegorznowak

@grzegorznowak grzegorznowak commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR improves Model Groups editing in two bounded places:

  • the add-model wizard gains Pi-native fuzzy search and a ten-row scrolling viewport over the complete eligible model catalog; and
  • the existing group-name Input is composed as one prompt-free inline Name: value row while retaining Pi's cursor, IME, Unicode-width, and editing behavior.

The inline editor is explicitly owned by operator-authorized feedback receipt FB-014, resolving the earlier SC-001 scope concern. Rename persistence and keyboard semantics are unchanged.

Original tickets

Requirements

Searchable/capped add-model picker

  • Fuzzy-search eligible models by model ID, provider, provider/model ID, or display name using Pi's public search primitive.
  • Keep candidates limited to authenticated models from the selected provider.
  • Show no more than ten model rows while the complete result set remains counted, scrollable, and selectable.
  • Preserve exact raw provider/model identity independently from escaped, styled, or truncated labels.
  • Retain the Provider → Model → Thinking flow, predictable query editing/back navigation, no-result safety, and query lifecycle behavior.

Inline group-name editor

  • Render the inactive editor row as one logical Name: value row with no separate Pi > prompt or cursor artifact.
  • While active, suppress only the literal Pi prompt and preserve exactly one real cursor/IME marker plus native editing and horizontal scrolling.
  • Keep active and inactive rendering width-bounded for narrow terminals, wide Unicode, and combining graphemes.
  • Preserve existing Enter, Esc, and row-change rename behavior: pending canonical edits flush once and established validation, persistence, and error handling remain intact.

Acceptance criteria

  • The Model step exposes every eligible model, fuzzy-filters the complete set, and displays at most ten model rows.
  • Results beyond the tenth remain reachable; filtered and offscreen selection persists exact registry identity.
  • Query-value changes reset selection; cursor-only movement does not.
  • No-match Enter/Up/Down is inert; nonempty-query Left/Backspace edits; empty-query Left/Backspace and Esc return to Provider.
  • Returning from Thinking preserves the query; abandoning, completing, exiting, or reopening clears it.
  • The group-name value appears on the same row as Name: both inactive and active, without a separate > prompt.
  • The active name editor retains one cursor marker and remains bounded at widths 1, 2, and 12 with wide and combining Unicode.
  • Enter, Esc, and row changes retain existing exact-once rename commit/error behavior.
  • Other Model Groups screens receive no search or viewport behavior changes.
  • No dependency, manifest, lockfile, schema, routing, spawn, or persistence-format changes are introduced.
  • [Unreleased] contains one combined entry covering the picker and inline editor.

Contract changes

  • The add-model wizard's Model step now provides fuzzy search and a ten-visible-row viewport over all eligible results.
  • Model-step query navigation follows the empty/nonempty behavior described above.
  • The existing group-name editor is presented inline; its persistence and keyboard contract is unchanged.

Out of scope

  • Search or viewport changes outside the add-model wizard's Model step.
  • Any EDITOR behavior change beyond FB-014's one-line group-name presentation.
  • Changes to model authorization, validation, storage, routing, spawn behavior, or rename persistence.
  • Custom fuzzy matching, first-ten-only truncation, manual list wrapping, or an additional wizard step.
  • Dependency upgrades, manifest changes, or lockfile changes.
  • Retroactive rewriting of the initiative, merged PR Model Groups spawn router #14, or historical SC-001 evidence.

How to verify

  1. Open /model-groups, edit a group, and select Name:.
  2. Confirm inactive and active states occupy one row, show no separate > prompt, and retain the native editing cursor while active.
  3. Exercise typing, Left, Backspace, Enter, Esc, and row-change commits, including validation or persistence failures.
  4. Confirm narrow widths and wide/combining Unicode remain bounded.
  5. Open Add model and select a provider with more than ten authenticated models.
  6. Search by model/provider/display fields, navigate beyond the tenth result, and select filtered/offscreen entries.
  7. Verify query editing, no-match behavior, back navigation, and query preservation/reset boundaries.
  8. Confirm other Model Groups screens retain their existing list behavior.
  9. Confirm the combined [Unreleased] changelog entry.

Automated coverage includes 493 unit tests, 16 E2E tests, Pi 0.82.0 floor/current compatibility lanes, package-host smoke, typecheck, snapshots, and focused TAP-14/TAP-15 transition and rendering proofs.

Initiative reference

  • Initiative: model-tag-router
  • Story: model-groups-searchable-capped-picker
  • Feedback: FB-014 (resume-current-story)
  • Change workspace: openspec/changes/model-groups-searchable-capped-picker/

@grzegorznowak
grzegorznowak force-pushed the model-tag-router/model-groups-searchable-capped-picker branch from 1e06706 to ae3fb64 Compare August 3, 2026 04:45
@grzegorznowak grzegorznowak changed the title Model Groups searchable/capped model picker Model Groups searchable picker and inline name editor Aug 3, 2026
@grzegorznowak
grzegorznowak marked this pull request as ready for review August 3, 2026 09:11
@grzegorznowak
grzegorznowak requested a review from ofriw August 3, 2026 09:11

@ofriw ofriw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ofriw
ofriw merged commit d4a904f into main Aug 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants