diff --git a/DIVERGENCES.md b/DIVERGENCES.md index 748c6d364d..55fa583f7d 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -37,6 +37,8 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `packages/tui/src/feature-plugins/sidebar/footer.tsx` | Sidebar footer wordmark: upstream's two-tone "Open"+"Code" spans → a single "CoDev" span (text color, bold) | Upstream splits the wordmark across two spans, so it never matched `opencode` greps and survived earlier rebrand passes. | Keep our span; take upstream's surrounding changes. | | `packages/opencode/src/cli/cmd/*.ts` (tui, run, serve, attach, pr, upgrade, uninstall, web) | Help `describe` strings "opencode" → "codev" | `--help` is the first thing users read. | Keep our strings. | | `packages/tui/src/app.tsx` | Terminal title "OpenCode"/"OC \|" → "CoDev Code"/"CC \|"; startup dialog effect gates on `!useConnected()` (not `provider.length === 0` — hosted Zen free models always register) and opens the fork's `DialogConfigure` (component/dialog-configure.tsx, new file); added the `codev.configure` command (`/configure`) and a `CODEV_CONFIGURE=1` mount hook for `codev configure`; home screen skipped — plain startup seeds the `dummy` session route and auto-opens a new empty session (reusing a leftover default-titled empty one via `openNewSession`/`findEmptySession`), `session.new` and the current-session `session.deleted` handler open a new session instead of navigating home, and the `-c` resolver prefers non-default-titled sessions so it lands on the last real conversation | Tab title branding; first-run setup routes to the CoDev gateway configure flow (upstream's `/connect` stays as the escape hatch); `codev` starts directly in the session layout instead of the home screen. | Keep our strings, gate condition, dialog swap + command block, route seed, `openNewSession`/`findEmptySession` + call sites, and the `-c` default-title filter; take upstream's surrounding changes. | +| `packages/tui/src/routes/session/index.tsx` | Empty-session banner: when the session has no messages, the transcript area shows the vertically centered `Logo` wordmark with the `home_bottom` tips slot beneath it (flexGrow spacer boxes), the session `Prompt` gets home's `placeholder` pool so the input shows an `Ask anything... ""` placeholder like home, and the scrollbox is clamped to `maxHeight` 1 until the first message (it holds its flex-derived height even when empty, so `flexGrow` 0 alone does not collapse it) | Startup lands in an empty session instead of the home screen; without this the transcript is a large blank void above the prompt. | Keep our banner block, the `placeholders` prop, and the conditional `maxHeight`; take upstream's surrounding changes. | +| `packages/tui/src/routes/home.tsx` | `placeholder` suggestion pool exported (was module-private) | The empty-session view in routes/session/index.tsx feeds the same pool to its prompt, so upstream edits to the suggestions flow through. | Keep the `export` keyword; take upstream's changes to the list. | | `packages/tui/src/routes/session/permission.tsx`, `packages/opencode/src/cli/cmd/run/permission.shared.ts`, `packages/opencode/test/cli/run/permission.shared.test.ts`, `packages/tui/src/component/error-component.tsx`, `packages/opencode/src/cli/cmd/run/splash.ts` | Visible sentences/badges "OpenCode"/"opencode" → "CoDev Code"/"codev-code" (incl. the permission always-allow copy and its test expectations) | User-facing copy. | Keep our strings. | | `packages/opencode/src/installation/index.ts` | Updater detects/queries/installs `codev-code` (npm-family); GitHub fallback → quickbeard/codev-code | `codev-code upgrade` and the update notification target OUR npm package, never stock opencode. brew/choco/scoop probes never match (no such packages). | Keep our package names. | | `packages/opencode/src/config/config.ts` | `share` defaults to `"disabled"` when unset | Sharing publishes sessions to upstream's share service; internal users must opt in via config. | Keep our default block. | diff --git a/packages/tui/src/routes/home.tsx b/packages/tui/src/routes/home.tsx index d4145e2d87..24cd1d2e18 100644 --- a/packages/tui/src/routes/home.tsx +++ b/packages/tui/src/routes/home.tsx @@ -14,7 +14,8 @@ import { useTuiConfig } from "../config" import { HomeSessionDestinationProvider } from "./home/session-destination" let once = false -const placeholder = { +// Fork: also feeds the empty-session prompt in routes/session/index.tsx. +export const placeholder = { normal: ["Fix a TODO in the codebase", "What is the tech stack of this project?", "Fix broken tests"], shell: ["ls -la", "git status", "pwd"], } diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index f2f2a67fd3..88ab2f4a87 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -53,6 +53,8 @@ import { DialogConfirm } from "../../ui/dialog-confirm" import { DialogTimeline } from "./dialog-timeline" import { DialogForkFromTimeline } from "./dialog-fork-from-timeline" import { DialogSessionRename } from "../../component/dialog-session-rename" +import { Logo } from "../../component/logo" +import { placeholder } from "../home" import { Sidebar } from "./sidebar" import { SubagentFooter } from "./subagent-footer.tsx" import { filetype } from "../../util/filetype" @@ -1165,6 +1167,17 @@ export function Session() { + {/* Fork: startup lands in an empty session instead of the home + screen, so fill the transcript void with a home-like banner + until the first message arrives. */} + + + + + + + + (scroll = r)} viewportOptions={{ @@ -1181,6 +1194,9 @@ export function Session() { stickyScroll={true} stickyStart="bottom" flexGrow={1} + // The scrollbox holds its flex-derived height even when empty, + // so clamp it while the banner is shown. + maxHeight={messages().length === 0 ? 1 : undefined} scrollAcceleration={scrollAcceleration()} > @@ -1312,6 +1328,7 @@ export function Session() { onSubmit={() => { toBottom() }} + placeholders={messages().length === 0 ? placeholder : undefined} sessionID={route.sessionID} right={} />