Repository navigation
PR1 of #136: effort wiring, background catalog fetch, persistent footer control - #215
Merged
github-actions[bot] merged 2 commits intoAug 4, 2026
Conversation
…og fetch, persistent footer control PR1 of #136 (provider/model/effort picker redesign), split per the phased plan: onboarding and cross-route search follow in later PRs. - Fix a real bug: the selected reasoning effort was never sent on outbound requests (AgentSession::build_model_request hardcoded None). Wire it through AgentSession.reasoning_effort, synced fresh each turn from the active model's actual support. - Replace synchronous, blocking catalog refresh (opening /connect or /model froze the UI thread on live HTTP calls) with a background-thread fetch, polled non-blocking from the event loop and warmed once per session the first tick a profile is connected — never from draw(), which must stay a side-effect-free projection of state. - Add the persistent [vendor/route] [model] [effort] footer control: reuses the existing ConnectModel overlay machinery in a smaller, anchored "compact" mode instead of a full-screen-only picker, activated via Alt+C, mouse click, or the existing /connect and /model commands.
CI's cargo clippy -D warnings caught what my local validation (fmt + test, no clippy) missed.
This was referenced Aug 4, 2026
mohitranka
added a commit
that referenced
this pull request
Aug 21, 2026
…er control (#215) * feat(tui,core): wire reasoning effort into requests, background catalog fetch, persistent footer control PR1 of #136 (provider/model/effort picker redesign), split per the phased plan: onboarding and cross-route search follow in later PRs. - Fix a real bug: the selected reasoning effort was never sent on outbound requests (AgentSession::build_model_request hardcoded None). Wire it through AgentSession.reasoning_effort, synced fresh each turn from the active model's actual support. - Replace synchronous, blocking catalog refresh (opening /connect or /model froze the UI thread on live HTTP calls) with a background-thread fetch, polled non-blocking from the event loop and warmed once per session the first tick a profile is connected — never from draw(), which must stay a side-effect-free projection of state. - Add the persistent [vendor/route] [model] [effort] footer control: reuses the existing ConnectModel overlay machinery in a smaller, anchored "compact" mode instead of a full-screen-only picker, activated via Alt+C, mouse click, or the existing /connect and /model commands. * fix(tui): satisfy clippy::obfuscated_if_else in footer effort label CI's cargo clippy -D warnings caught what my local validation (fmt + test, no clippy) missed.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…er control (#215) * feat(tui,core): wire reasoning effort into requests, background catalog fetch, persistent footer control PR1 of #136 (provider/model/effort picker redesign), split per the phased plan: onboarding and cross-route search follow in later PRs. - Fix a real bug: the selected reasoning effort was never sent on outbound requests (AgentSession::build_model_request hardcoded None). Wire it through AgentSession.reasoning_effort, synced fresh each turn from the active model's actual support. - Replace synchronous, blocking catalog refresh (opening /connect or /model froze the UI thread on live HTTP calls) with a background-thread fetch, polled non-blocking from the event loop and warmed once per session the first tick a profile is connected — never from draw(), which must stay a side-effect-free projection of state. - Add the persistent [vendor/route] [model] [effort] footer control: reuses the existing ConnectModel overlay machinery in a smaller, anchored "compact" mode instead of a full-screen-only picker, activated via Alt+C, mouse click, or the existing /connect and /model commands. * fix(tui): satisfy clippy::obfuscated_if_else in footer effort label CI's cargo clippy -D warnings caught what my local validation (fmt + test, no clippy) missed.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…er control (#215) * feat(tui,core): wire reasoning effort into requests, background catalog fetch, persistent footer control PR1 of #136 (provider/model/effort picker redesign), split per the phased plan: onboarding and cross-route search follow in later PRs. - Fix a real bug: the selected reasoning effort was never sent on outbound requests (AgentSession::build_model_request hardcoded None). Wire it through AgentSession.reasoning_effort, synced fresh each turn from the active model's actual support. - Replace synchronous, blocking catalog refresh (opening /connect or /model froze the UI thread on live HTTP calls) with a background-thread fetch, polled non-blocking from the event loop and warmed once per session the first tick a profile is connected — never from draw(), which must stay a side-effect-free projection of state. - Add the persistent [vendor/route] [model] [effort] footer control: reuses the existing ConnectModel overlay machinery in a smaller, anchored "compact" mode instead of a full-screen-only picker, activated via Alt+C, mouse click, or the existing /connect and /model commands. * fix(tui): satisfy clippy::obfuscated_if_else in footer effort label CI's cargo clippy -D warnings caught what my local validation (fmt + test, no clippy) missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First of a phased PR sequence implementing #136 (provider/model/effort picker redesign). This PR covers the foundational fixes and the persistent steady-state control; zero-state onboarding and cross-route model search polish follow in later PRs.
AgentSession::build_model_request()hardcodedreasoning_effort: None. AddedAgentSession.reasoning_effort, synced fresh each turn (sync_effort_to_session) from the active model's actual effort support, so an unsupported model never gets sent a stale/meaningless value./connector/modelused to block the UI thread on live HTTP calls (refresh_stale: true). Now the overlay opens instantly from cache, and a background thread (mirroring the existingpoll_repo_headeroff-thread pattern) refreshes the on-disk catalog cache, polled non-blocking from the event loop — never fromdraw(). Warms once per session, the first event-loop tick after a profile is connected (not at construction — see note below).[vendor/route] [model] [effort]footer control: reuses the existingConnectModeloverlay/picker machinery in a new smaller "compact" anchored-above-footer render mode instead of building a parallel state machine, so Tab/Shift-Tab/Enter/Escape and the focus-vs-selection distinction all come for free. Activated byAlt+C, clicking a footer segment, or the existing/connect//modelcommands. Footer row stays capped at height 1 (no second row) — it now persistently shows the control instead of sitting empty whenever there's no contextual hint.Note on a mid-review fix
Initially wired the background catalog warm-up into
restore_saved_auth()(construction time). That causedrender_perf.rs's allocation-regression guard to fail — a global-allocator-based test that counts allocations across all threads, so the newly spawned background network thread's allocations bled into its measurement, and asymmetrically so (construction time scales with transcript setup cost). Moved the warm-up to a one-time event-loop tick instead (warm_catalog_once_connected, gated by acatalog_fetch.warmedflag) — this also keeps it further fromdraw()per the issue's own guidance, and as a side effect fixed a real ~3x slowdown it had introduced across the wholeforge-tuitest suite (any test constructing a connectedTuiAppwas spawning a real background thread).Test plan
cargo fmt --all -- --checkcargo test -p forge-tui --lib(733 passed)cargo test -p forge-connect --lib(184 passed)cargo test --workspace --all-targets --locked— all green except a pre-existing, unrelatedforge-configfailure (permissions::tests::*), confirmed viagit diffshowing zero changes to that crate and reproduced identically against unmodifiedmain: this dev machine's real~/Library/Application Support/forge/permissions.tomlleaks into those tests, which don't isolatedirs::config_dir(). Not introduced by this PR; out of scope to fix here.