Skip to content

feat: search models inside the picker - #113

Open
serhii-londar wants to merge 16 commits into
leepokai:devfrom
serhii-londar:feat/model-search-in-picker
Open

serhii-londar wants to merge 16 commits into
leepokai:devfrom
serhii-londar:feat/model-search-in-picker

Conversation

@serhii-londar

Copy link
Copy Markdown

Summary

The model search field sat on the bot settings form, next to the Model row — nowhere near the
list it filtered, and it pushed the rest of the form down. It now lives inside the model picker
itself, on both clients.

  • iPhone: ChoicePicker opens the system Menu, which cannot host a text field, so the model
    row now uses a new SearchableChoicePicker. Tapping it presents a .codyncSheet with a
    SearchField over the matching choices, mirroring FolderPicker.
  • Desktop: MenuPanel renders a search field at the top of the anchored menu when the caller
    passes one, so the dropdown filters in place. DropdownMenu and ChoicePicker thread that prop
    through.

Two related fixes came out of testing this against a real agent:

  • The desktop filter was reversed — it asked whether the query contained a model's name, so an
    empty query matched nothing and the menu showed only Default. It matches model names against the
    query now, as the iPhone already did. This is why opencode's 533 models looked missing in the
    macOS app while the phone showed all of them.
  • The Default label on the iPhone is derived from the full model list rather than the filtered one,
    so it stops changing as you type.

The terminal UI is unaffected: it edits the model as text, so there is no list popup to search.

Validation

  • cd apps/desktop && npm run typecheck — clean; npm test — 131 pass.
  • cd apps/ios/Kit && xcodebuild build -scheme CodyncKit-Package -destination 'generic/platform=iOS'
    — succeeded; xcodebuild test -scheme CodyncKit-Package -destination 'platform=iOS Simulator,name=iPhone 18 Pro'
    — 87 tests pass.
  • Drove opencode acp (v2.0.21) directly through initialize + session/new and confirmed the host
    receives all 533 advertised models across openrouter (380), opencode (85), github-copilot (37)
    and opencode-go (31). model_catalog forwards them unfiltered, so the loss was client-side only.
  • Ran npm run dev (Dev host on 19223, separate from the production host on 19222) and confirmed the
    macOS picker lists the full opencode catalog and filters correctly while typing.
  • Inspected the iPhone Model sheet in the simulator: the search field sits at the top of the sheet
    and filters the list live, with the current selection kept visible.

Version bump is not included: MARKETING_VERSION stays at 2.14.0 pending a clean .xcodeproj,
since the bump needs xcodegen generate and that project currently holds unrelated in-flight edits.

What's New

zh-Hant

  • 選模型時,搜尋框就在模型清單裡:點一下 Model 就能直接搜尋,不用再回到設定頁面找。

en-US

  • Search for a model right where the list is: tapping Model opens the list with a search field at the
    top, so you no longer hunt for it back on the settings screen.

serhii-londar and others added 7 commits October 12, 2026 13:04
- iOS: add search field that filters models by name (case-insensitive)
- Desktop: add search input that filters models by name (case-insensitive)

Both implementations show 'Default' first, then match models as user types.
Follows existing UI patterns and codebase conventions.
Link the Codync Discord community on the website
Codync 2.15.0: notch island, edit orb, bot reordering on iPhone
Codync 2.15.1: desktop menu fixes
fix(desktop): show update download progress and a restart button
The search field sat on the settings form beside the Model row, nowhere
near the list it filtered. It now lives inside the popup on both
clients: the desktop menu gains a search field at its top, and the phone
opens a sheet with a search field over the matching choices, since a
system Menu cannot host a text field.

The desktop filter was also reversed — it asked whether the query
contained a model's name, so an empty query matched nothing and the menu
showed only Default. It matches model names against the query now, as
the phone already did.

The terminal UI is unaffected: it edits the model as text, so there is
no list popup to search.
Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

serhii-londar and others added 7 commits October 13, 2026 22:19
Codync 2.16.0: oh-my-pi, Extensions, update fixes
Codync 2.16.1: agents on Windows, Node.js setup, crash reports
Codync 2.16.2: move the desktop window from the empty and new-chat panes
Discord: join the server and get GitHub roles from one link
# Conflicts:
#	apps/ios/Kit/Sources/CodyncUI/Bots/AgentModelPicker.swift
@leepokai
leepokai changed the base branch from main to dev October 15, 2026 10:15
@leepokai

Copy link
Copy Markdown
Owner

Thanks @serhii-londar, this is a nice improvement, and finding the reversed filter while testing against opencode's 533 models is a great catch.

Codync takes pull requests against dev (releases go from dev to main), so I've retargeted this one. It merges cleanly there.

One thing on the desktop side before it goes in: the search text lives in AgentModelPicker and is never cleared, so it survives closing the menu. The next time the menu opens it's still filtered, and while the query doesn't match the selected model, that model is re-added with its id as the label, so the pill shows the raw model id instead of its name. Clearing the query when the menu opens (as the iPhone sheet already does with query = "") and taking the pill's label from the full list rather than the filtered one would fix both.

…rom the full list

The desktop search text lived in AgentModelPicker and survived closing the
menu, so the next open was still filtered, and while the query hid the
selected model its pill fell back to the raw id. Clear the query when the
menu opens, as the iPhone sheet already did, and read the pill label from
the full catalog on both clients.
… scrolls

In a long model list the search field scrolled out of reach: the desktop
menu panel and the iPhone sheet both scrolled the field away with the
choices. Pin the field above the list on both clients so only the choices
scroll.
@leepokai leepokai added P3: low Nice to have: features, questions, polish. enhancement New feature or request labels Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request P3: low Nice to have: features, questions, polish.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants