Skip to content

PR2 of #136: zero-state onboarding correctness fixes - #221

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/zero-state-onboarding-pr2
Aug 4, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/zero-state-onboarding-pr2

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Second of a phased PR sequence implementing #136 (provider/model/effort picker redesign). PR1 (#215, merged) shipped effort-request wiring, background catalog fetch, and the persistent footer control.

Investigation found most of zero-state onboarding already works today: a welcome overlay auto-opens on a disconnected launch, Enter on it opens the connect picker with "Step 1 of 2" feedback, the picker's Providers column already lists every vendor with correct connected/current tags and dispatches to the right auth flow (API key / OAuth / env / Ollama reachability, unchanged), and a disconnected send attempt gives clear feedback while preserving typed text. None of that needed rebuilding.

Three concrete gaps against the issue's acceptance criteria, fixed here:

  • Real bug — cancelled OAuth could still silently connect. Esc during an in-flight device-code OAuth flow closed the overlay but never cleared connect.oauth_pending, and poll_oauth_tick runs unconditionally every event-loop tick — so a device code completing after the user cancelled would still connect them. Now clearing oauth_pending/oauth_last_poll on close.
  • First connection didn't "transition to the normal state." All three connect-completion paths unconditionally opened the model picker. Now: if this was the first-ever connected route (checked via connected_profiles().len() == 1, no new state needed), auto-select a default model + effort and land directly in steady state. A routine additional/re-connect (already ≥1 connected route) keeps today's picker hand-off — that's a deliberate browse, not onboarding.
  • Onboarding overlay fully blanked the transcript, contradicting "keep the conversation/context visible... this is onboarding, not a routine picker." Overlay::Help/welcome() now dims the background like ConnectModel already does, instead of fully blanking it.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings (ran locally this time — PR1's first CI push missed this)
  • cargo test -p forge-tui --lib (736 passed)
  • cargo test -p forge-connect --lib (184 passed)
  • cargo test --workspace --all-targets --locked — all green except the same pre-existing, unrelated forge-config::permissions failure documented as environmental in PR1 (this dev machine's real local config leaking into unisolated tests; zero diff to that crate).

- Cancelling an in-flight OAuth device-code flow via Esc now stops the
  background poll (clears connect.oauth_pending/oauth_last_poll), so a
  cancelled attempt can never silently complete afterward and mark the
  route connected.
- The first-ever successful connection now auto-selects a default model
  and effort and lands directly in steady state, instead of forcing the
  model picker open. A routine additional/re-connect (already at least
  one connected route) keeps today's picker hand-off unchanged.
- The onboarding overlay (Overlay::Help / welcome()) now dims the
  transcript behind it instead of fully blanking it, matching the
  existing ConnectModel picker's treatment.
@github-actions
github-actions Bot enabled auto-merge (squash) August 4, 2026 00:35
@github-actions
github-actions Bot merged commit b0c6882 into main Aug 4, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
- Cancelling an in-flight OAuth device-code flow via Esc now stops the
  background poll (clears connect.oauth_pending/oauth_last_poll), so a
  cancelled attempt can never silently complete afterward and mark the
  route connected.
- The first-ever successful connection now auto-selects a default model
  and effort and lands directly in steady state, instead of forcing the
  model picker open. A routine additional/re-connect (already at least
  one connected route) keeps today's picker hand-off unchanged.
- The onboarding overlay (Overlay::Help / welcome()) now dims the
  transcript behind it instead of fully blanking it, matching the
  existing ConnectModel picker's treatment.
mohitranka added a commit that referenced this pull request Sep 11, 2026
- Cancelling an in-flight OAuth device-code flow via Esc now stops the
  background poll (clears connect.oauth_pending/oauth_last_poll), so a
  cancelled attempt can never silently complete afterward and mark the
  route connected.
- The first-ever successful connection now auto-selects a default model
  and effort and lands directly in steady state, instead of forcing the
  model picker open. A routine additional/re-connect (already at least
  one connected route) keeps today's picker hand-off unchanged.
- The onboarding overlay (Overlay::Help / welcome()) now dims the
  transcript behind it instead of fully blanking it, matching the
  existing ConnectModel picker's treatment.
mohitranka added a commit that referenced this pull request Sep 11, 2026
- Cancelling an in-flight OAuth device-code flow via Esc now stops the
  background poll (clears connect.oauth_pending/oauth_last_poll), so a
  cancelled attempt can never silently complete afterward and mark the
  route connected.
- The first-ever successful connection now auto-selects a default model
  and effort and lands directly in steady state, instead of forcing the
  model picker open. A routine additional/re-connect (already at least
  one connected route) keeps today's picker hand-off unchanged.
- The onboarding overlay (Overlay::Help / welcome()) now dims the
  transcript behind it instead of fully blanking it, matching the
  existing ConnectModel picker's treatment.
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.

1 participant