Skip to content

feat(tui): add runtime filter popup#321

Open
mvanhorn wants to merge 1 commit into
AlexsJones:mainfrom
mvanhorn:feat/197-runtime-filter-popup
Open

feat(tui): add runtime filter popup#321
mvanhorn wants to merge 1 commit into
AlexsJones:mainfrom
mvanhorn:feat/197-runtime-filter-popup

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Apr 6, 2026

Summary

Adds a runtime/backend filter popup to the TUI, accessible via the B key. Follows the exact pattern of the existing filter popups (Quant, RunMode, Params, License).

  • Added RuntimePopup InputMode variant
  • Added runtime filter state derived from InferenceRuntime::label() (reuses core enum, no duplicate strings)
  • Added B keybind to toggle the popup, with matching event handler
  • Added filtering logic in apply_filters matching the existing popup pattern
  • Added draw_runtime_popup draw function in tui_ui.rs

The API already has RuntimeFilter (serve_api.rs:718) but the TUI lacked a corresponding popup.

Testing

cargo clippy --all-targets --all-features passes (all warnings are pre-existing).

Fixes #197

This contribution was developed with AI assistance (Claude Code).

Add a runtime/backend filter popup to the TUI, accessible via the B key.
Follows the exact pattern of the existing filter popups (Quant, RunMode,
Params, License). Reuses InferenceRuntime::label() for option names
rather than duplicating runtime strings.

Fixes AlexsJones#197

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall: Clean addition of the runtime/backend filter popup. Follows the existing pattern perfectly. Using BTreeSet for sorted deduplicated values and reusing InferenceRuntime::label() avoids string duplication. LGTM.

@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks @three-foxes-in-a-trenchcoat — glad the BTreeSet + InferenceRuntime::label() reuse read cleanly. Ready to merge when you are.

@three-foxes-in-a-trenchcoat
Copy link
Copy Markdown
Collaborator

Clean implementation. Follows the existing popup patterns perfectly — the B key for backend filtering is intuitive. The BTreeSet for unique runtime labels is a nice touch. LGTM.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean implementation — follows existing popup patterns perfectly. However, this PR has merge conflicts (DIRTY). Please rebase on latest main. Once rebased, this is good to merge.

@three-foxes-in-a-trenchcoat
Copy link
Copy Markdown
Collaborator

Ready on my end, but this is showing DIRTY (merge conflicts). Can you rebase on latest main and the CI will re-run? Then we can merge.

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.

[Feature request] Filter by backend, or suggestion about new UI mode

2 participants