Skip to content

feat(chat): unify runtime selection into a header harness picker#4477

Open
rafavalls wants to merge 4 commits into
mainfrom
rafavalls/decopilot-local-vs-cloud
Open

feat(chat): unify runtime selection into a header harness picker#4477
rafavalls wants to merge 4 commits into
mainfrom
rafavalls/decopilot-local-vs-cloud

Conversation

@rafavalls

@rafavalls rafavalls commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

What is this contribution about?

Consolidates the cloud/local runtime selection into a single header button (to the right of the sidebar toggle) that stacks the Codex, Claude Code, and Decopilot icons — the active runtime rendered frontmost — with a Cloud/Local label and a dropdown, replacing the duplicate mode picker that lived in the chat input. It also removes the now-redundant desktop link indicator from the sidebar footer and the mobile header, and fixes a local-mode gap: with no cloud provider keys but a linked Claude Code / Codex CLI, the chat now defaults to that local harness and skips the "connect a provider" empty state (SaaS still defaults to cloud when a key is present).

Screenshots/Demonstration

Header picker with stacked icons + Cloud/Local label and its dropdown; no-provider empty state no longer shown when a local CLI is linked.

How to Test

  1. Open the app and locate the new harness button next to the sidebar toggle in the header — click it to open the dropdown and switch between Decopilot (cloud/local), Claude Code, and Codex; the selected runtime becomes the frontmost stacked icon.
  2. With bunx decocms@latest link running (Claude Code and/or Codex available) and no cloud AI provider keys, open the org home: you should land in the chat with a local CLI selected by default, not the "connect a provider" empty state.
  3. Confirm the desktop indicator is gone from the sidebar footer and the mobile top bar.

Migration Notes

Not applicable.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Unifies runtime selection into a single header Harness Picker and adds per‑org model overrides for local CLI tiers (Claude Code/Codex). This makes CLI defaults configurable and keeps provider prompts only for Decopilot.

  • New Features

    • Header Harness Picker to switch between Decopilot (cloud/local), Claude Code, and Codex; shown in desktop and mobile headers.
    • Animated icon rearrangement when changing selection (300ms; respects reduced motion).
    • Smart default: with no provider keys, auto-select a linked local CLI (Claude Code, then Codex); with keys, cloud remains default.
    • Local CLI tier models are configurable in Settings (“Local models”): per-harness fast/smart/thinking; chat tier popover reflects titles; backend prefers simple_mode.cli via resolveCliTier with fallback.
  • Bug Fixes

    • Gate “connect a provider” on the selected runtime: only for Decopilot with zero keys; never for Claude Code/Codex.
    • Removed the duplicate input ModePicker and the desktop link indicator from the sidebar footer and mobile header.

Written for commit affb052. Summary will update on new commits.

Review in cubic

rafavalls and others added 4 commits July 12, 2026 12:41
Move the cloud/local runtime selection out of the chat input and into a
single header button that stacks the Codex, Claude Code, and Decopilot
icons (active runtime shown frontmost) with a Cloud/Local label and a
dropdown. Remove the redundant desktop link indicator from the sidebar
footer and mobile header. In local mode with no cloud provider keys,
default to a linked local CLI harness and skip the no-provider empty
state so Claude Code / Codex work out of the box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Choosing Cloud (Decopilot) in local mode with no provider keys let the
user submit and then fail with "No model available for tier". Show the
provider picker whenever the selected runtime is Decopilot (cloud or
local sandbox) and the org has no keys; Claude Code / Codex skip it since
they bring their own inference. Replaces the capability-only gate in the
home page and side-panel chat with an `agentModeNeedsCloudProvider` check,
and retires the now-unused `hasLocalCliHarness` helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep the three runtime circles in a stable DOM order and drive each
one's slot via an inline translateX + z-index, so switching the selected
harness animates them sliding into place (active → rightmost/frontmost)
with a 300ms ease-in-out CSS transition. No layout library or effect
needed; honors prefers-reduced-motion via motion-reduce.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds per-org fast/smart/thinking model overrides for the Claude Code and
Codex desktop runtimes, mirroring the cloud "Default models" section.
Overrides live in an optional `simple_mode.cli` block (no migration);
dispatch resolves via a new `resolveCliTier` that prefers the override
and falls back to the hardcoded default. A new "local models" settings
section (shown when a CLI is linked) lets admins pick from each harness's
model list, and the chat tier popover reflects the configured choice.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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