From 0f1f582c04c0f81ae0da51ace11503bd34885724 Mon Sep 17 00:00:00 2001 From: minhn4 Date: Tue, 14 Jul 2026 15:16:31 +0700 Subject: [PATCH] feat(tui): remove upstream getting-started sidebar card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dismissable card pitches upstream's hosted free Zen models — which this fork hides — and points at /connect while first-run setup routes through /configure. The sidebar footer keeps only the cwd path display. Co-Authored-By: Claude Fable 5 --- DIVERGENCES.md | 1 + .../src/feature-plugins/sidebar/footer.tsx | 45 ++----------------- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/DIVERGENCES.md b/DIVERGENCES.md index 9fdc9f1650..d150dead02 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -68,6 +68,7 @@ from the squash message first, or use a plain merge. | `bun.lock` | Mirrors the bin key rename above and the fork-only workspace packages/deps (`@codev/gateway`) | Lockfile records workspace bin mappings and workspace deps. | Regenerate with `bun install`; never hand-merge. | | `packages/tui/package.json` | Added dependency `"@codev/gateway": "workspace:*"` | The fork's gateway configure dialog imports SSO/backend/config-block logic from the fork-only `packages/codev-gateway`. | Keep our dependency line; take upstream's other fields. | | `packages/tui/src/feature-plugins/home/tips-view.tsx` | `NO_MODELS_TIP` points at `/configure` (CoDev gateway) instead of `/connect` | The unconfigured-state tip should lead to the fork's configure flow. | Keep our tip text. | +| `packages/tui/src/feature-plugins/sidebar/footer.tsx` | Deleted the dismissable "Getting started" card (free-models pitch + `/connect` pointer + `dismissed_getting_started` KV flag); the sidebar footer keeps only the cwd path display | The card advertises upstream's hosted free Zen models — which the fork hides — and points at `/connect` while first-run setup routes through `/configure`; the fork's startup gate covers onboarding. | Keep the card deleted; take upstream's changes to the remaining path display. | | `packages/tui/src/ui/dialog.tsx` | Added a `persistent` store flag (with `setPersistent`/`persistent` accessors): escape and the click-outside backdrop no-op while set, and ctrl+c dispatches `app.exit.confirm` (base-mode-only, so suppressed under modal) instead of closing; every `replace`/`clear` resets it to false | The CoDev gateway configure flow is a non-dismissable first-run gate; ctrl+c stays the quit escape hatch (double-press — see the double-Ctrl+C row). Default-false keeps every other dialog dismissable. | Keep our persistent flag, the escape/backdrop guards, the ctrl+c `app.exit.confirm` dispatch, and the reset lines; take upstream's surrounding changes. | | `packages/tui/src/ui/dialog-select.tsx` | Added a `persistent?` prop that hides the top-right `esc` hint | A non-dismissable select shouldn't advertise `esc` (the dialog store's persistent flag blocks the actual close). | Keep our prop + the `Show` wrapper around the esc label; take upstream's surrounding changes. | | `packages/tui/src/ui/dialog-prompt.tsx` | Added `persistent?` (hides the `esc` hint + `DialogPrompt.show` re-arms the store flag), `onInput?` (fires on textarea content change), and `ref?` props | The configure flow's prompts (SSO login, manual credentials) are non-dismissable, and the SSO view watches `onInput` for the lone-`c` copy shortcut on the paste-back link (needs the `ref` to clear the field). | Keep our three props, the `Show` around the esc label, the textarea `onContentChange`, and the `.show` re-arm; take upstream's surrounding changes. | diff --git a/packages/tui/src/feature-plugins/sidebar/footer.tsx b/packages/tui/src/feature-plugins/sidebar/footer.tsx index 0d8b693c62..6b64d4193f 100644 --- a/packages/tui/src/feature-plugins/sidebar/footer.tsx +++ b/packages/tui/src/feature-plugins/sidebar/footer.tsx @@ -1,21 +1,17 @@ import type { TuiPlugin, TuiPluginApi } from "@opencode-ai/plugin/tui" import type { BuiltinTuiPlugin } from "../builtins" -import { createMemo, Show } from "solid-js" +import { createMemo } from "solid-js" import { abbreviateHome } from "../../runtime" import { useTuiPaths } from "../../context/runtime" const id = "internal:sidebar-footer" +// Fork: upstream also renders a dismissable "Getting started" card here (free +// Zen models pitch + /connect pointer); removed — the fork hides the hosted +// free models and routes first-run setup through /configure. function View(props: { api: TuiPluginApi; sessionID: string }) { const paths = useTuiPaths() const theme = () => props.api.theme.current - const has = createMemo(() => - props.api.state.provider.some( - (item) => item.id !== "opencode" || Object.values(item.models).some((model) => model.cost?.input !== 0), - ), - ) - const done = createMemo(() => props.api.kv.get("dismissed_getting_started", false)) - const show = createMemo(() => !has() && !done()) const path = createMemo(() => { const session = props.api.state.session.get(props.sessionID) const dir = session?.directory || props.api.state.path.directory || paths.cwd @@ -31,39 +27,6 @@ function View(props: { api: TuiPluginApi; sessionID: string }) { return ( - - - - ⬖ - - - - - Getting started - - props.api.kv.set("dismissed_getting_started", true)}> - ✕ - - - OpenCode includes free models so you can start immediately. - - Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc - - - Connect provider - /connect - - - - {path().parent}/ {path().name}