Skip to content

feat(tui): gate the prompt footer model indicator on configured providers - #33

Merged
quickbeard merged 1 commit into
mainfrom
footer-connected-gate
Jul 10, 2026
Merged

quickbeard merged 1 commit into
mainfrom
footer-connected-gate

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

What

Follow-up to #30. That PR gated the prompt footer's model/provider indicator on !isHostedZenModel(), matching the current provider id (opencode/opencode-go). That over-reaches: it also hides the indicator for a user who deliberately authenticated OpenCode / OpenCode-Go.

The actual intent is to suppress the model/provider prose only in the unconfigured default state — where upstream's free hosted Zen (opencode) is the sole provider and the user has configured nothing.

This swaps the gate to the fork's existing useConnected() predicate (packages/tui/src/component/use-connected.tsx) — the same "a real provider is configured" signal already used by app.tsx's startup configure dialog and the provider/model pickers.

State Footer shows
Unconfigured (free hosted Zen) Build — model/provider hidden
Configured (aigateway / real provider) Build · <model> · <provider>
Deliberately authed opencode / opencode-go Build · <model> · <provider> — the case #30 wrongly hid

Why

connected() is false only when the sole provider is the free hosted opencode (all models cost 0). Keying off configuration state rather than provider identity means the footer stays hidden by default but respects a user who intentionally connects any provider, including OpenCode itself.

Notes

  • Reuses useConnected() instead of a bespoke provider-id memo, so the footer, startup gate, and pickers now share one predicate.
  • DIVERGENCES.md entry updated to describe the new gate.
  • Verified: bun typecheck clean; bun test in packages/tui shows 189 pass with 2 failures that are pre-existing on main (app.exit ... epilogue, formats session continuation summary) and unrelated to this change.

🤖 Generated with Claude Code

…ders

PR #30 hid the footer's model/provider indicator whenever the current
provider id was `opencode`/`opencode-go`, which also suppressed it for a
user who deliberately authenticated OpenCode / OpenCode-Go. The intent was
only to hide the free hosted Zen default while nothing is configured.

Gate the indicator on the shared `useConnected()` predicate instead — the
same "a real provider is configured" signal `app.tsx`'s startup dialog and
the provider/model pickers already use. `connected()` is false only in the
unconfigured default state (sole provider is free hosted `opencode`), so a
configured gateway/real provider, or a deliberately-authenticated
opencode/opencode-go, shows its model normally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit aeb50a4 into main Jul 10, 2026
4 of 5 checks passed
@quickbeard
quickbeard deleted the footer-connected-gate branch July 10, 2026 13:59
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