feat(tui): wire Model browser to PluginBridge for search & install #105
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/model-browser-wire-89"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
search_all_models+search_all_lorasviatokio::spawn, with results delivered through anmpscchannel and drained on each Tick eventlist_models/list_loraswith client-side query filteringinstall_modelon the selected result card via the Loom extensionfilename_from_url,subdir_for_type,drain_results, and source-switch re-triggerCloses charles/loom#89
Test plan
cargo clippy -p loom-tui -- -D warningscleancargo test -p loom-tuipasses (118 tests)🤖 Generated with Claude Code
Review — PR #105: Model browser wired to PluginBridge for search & install
Well-structured async search pattern. Debounce + mpsc channel + drain-on-tick is the right approach for a TUI.
Concern:
filename_from_urledge caseCivitAI download URLs look like
https://civitai.com/api/download/models/12345?type=Model&format=SafeTensor. This returns"12345"as the filename, which loses the extension. Thefilenamefield has a fallback (format!("{}.safetensors", card.name.replace(' ', "_"))) so it's not broken, but thefilename_from_urlresult is misleading. Consider checking if the result has an extension before using it.Minor
run_remote_searchalways searches both models AND LoRAs and merges them. For the IP-Adapter filter case, you probably don't want LoRA results mixed in. Consider skipping the LoRA search whenip_adapter_onlyis true.install_selectedfires-and-forgets the install task. There's no way to track progress or cancel. The status line shows "installing…" but never updates to "installed" unless anotherBridgeResultarrives. Consider adding anInstallCompletevariant.#[allow(clippy::cast_possible_truncation)]on the entire render function is broad. Consider narrowing it to the specific cast.Good test coverage.
fddb19ddc8toa09a1bafa5