Skip to content

Commit aadbcd2

Browse files
quickbeardclaude
andcommitted
feat(tui): move banner hint into the prompt and add home tips
Drop the hint text from the empty-session banner: the session prompt now receives home's placeholder pool while the session is empty, so the suggestion appears inside the input box exactly like home, and the home_bottom tips slot renders beneath the banner logo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3f5e166 commit aadbcd2

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎DIVERGENCES.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ upstream maintainers — see README → Syncing with upstream for why and how.
3737
| `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. |
3838
| `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. |
3939
| `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. |
40-
| `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 plus an `Ask anything... "<suggestion>"` hint drawn per mount from home's `placeholder.normal` pool (flexGrow spacer boxes), 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 + conditional `maxHeight`; take upstream's surrounding changes. |
41-
| `packages/tui/src/routes/home.tsx` | `placeholder` suggestion pool exported (was module-private) | The empty-session banner in routes/session/index.tsx draws from the same pool, so upstream edits to the suggestions flow through. | Keep the `export` keyword; take upstream's changes to the list. |
40+
| `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... "<suggestion>"` 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. |
41+
| `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. |
4242
| `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. |
4343
| `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. |
4444
| `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. |

‎packages/tui/src/routes/home.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useTuiConfig } from "../config"
1414
import { HomeSessionDestinationProvider } from "./home/session-destination"
1515

1616
let once = false
17-
// Fork: also feeds the empty-session banner in routes/session/index.tsx.
17+
// Fork: also feeds the empty-session prompt in routes/session/index.tsx.
1818
export const placeholder = {
1919
normal: ["Fix a TODO in the codebase", "What is the tech stack of this project?", "Fix broken tests"],
2020
shell: ["ls -la", "git status", "pwd"],

‎packages/tui/src/routes/session/index.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,6 @@ export function Session() {
213213
.toSorted((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0))
214214
})
215215
const messages = createMemo(() => sync.data.message[route.sessionID] ?? [])
216-
// One pick per mount; the Session component is keyed on sessionID, so each
217-
// new session draws a fresh suggestion for the empty-session banner.
218-
const bannerHint = placeholder.normal[Math.floor(Math.random() * placeholder.normal.length)]
219216
const foregroundTasks = createMemo(() =>
220217
sync.data.capabilities.experimentalBackgroundSubagents
221218
? messages().flatMap((message) =>
@@ -1177,7 +1174,7 @@ export function Session() {
11771174
<box flexGrow={1} minHeight={0} />
11781175
<box flexShrink={0} alignItems="center" gap={1}>
11791176
<Logo />
1180-
<text fg={theme.textMuted}>{`Ask anything... "${bannerHint}"`}</text>
1177+
<pluginRuntime.Slot name="home_bottom" />
11811178
</box>
11821179
<box flexGrow={1} minHeight={0} />
11831180
</Show>
@@ -1331,6 +1328,7 @@ export function Session() {
13311328
onSubmit={() => {
13321329
toBottom()
13331330
}}
1331+
placeholders={messages().length === 0 ? placeholder : undefined}
13341332
sessionID={route.sessionID}
13351333
right={<pluginRuntime.Slot name="session_prompt_right" session_id={route.sessionID} />}
13361334
/>

0 commit comments

Comments
 (0)