From abbbed5a4f76798e8a9c601a2df2e8d4a154eb04 Mon Sep 17 00:00:00 2001 From: minhn4 Date: Tue, 21 Jul 2026 09:55:58 +0700 Subject: [PATCH 1/2] feat(tui): drop the cwd:branch label from the prompt footer Remove the fork-added directory+branch label from the prompt footer's right-side group on the home screen and in sessions. The path and branch stay visible in the sidebar footer and the home footer, so the prompt footer keeps only the shortcut hints and token usage. Deletes the fork-only directory-label.tsx with its tests, drops the sidebarVisible prop on Prompt, and retires the matching DIVERGENCES row. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 11 +++ DIVERGENCES.md | 1 - .../src/component/prompt/directory-label.tsx | 44 --------- packages/tui/src/component/prompt/index.tsx | 19 ---- packages/tui/src/routes/session/index.tsx | 1 - .../tui/test/directory-label-view.test.tsx | 38 -------- packages/tui/test/directory-label.test.ts | 56 ----------- .../tui/test/prompt-footer-directory.test.tsx | 96 ------------------- 8 files changed, 11 insertions(+), 255 deletions(-) delete mode 100644 packages/tui/src/component/prompt/directory-label.tsx delete mode 100644 packages/tui/test/directory-label-view.test.tsx delete mode 100644 packages/tui/test/directory-label.test.ts delete mode 100644 packages/tui/test/prompt-footer-directory.test.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index e72bd98042..3c3afbd1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,17 @@ file is the human-readable summary of what changed and why. ([#108](https://github.com/quickbeard/codev-code/pull/108), [#109](https://github.com/quickbeard/codev-code/pull/109)) +### Prompt + +- **Footer no longer shows `cwd:branch`** — the abbreviated directory + branch + label from [#65](https://github.com/quickbeard/codev-code/pull/65) is removed + from the prompt footer's right-side group, on the home screen and in sessions. + The path and branch remain visible in the sidebar footer (when the sidebar is + open) and in the home footer once a session destination is selected. This + retires the sidebar-visibility suppression from + [#70](https://github.com/quickbeard/codev-code/pull/70) along with the label. + ([#113](https://github.com/quickbeard/codev-code/pull/113)) + ### Sidebar - **Editor context moved to the sidebar** — the open editor file and selected diff --git a/DIVERGENCES.md b/DIVERGENCES.md index e78e9f3b9d..f8f9f20c7e 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -117,7 +117,6 @@ from the squash message first, or use a plain merge. | `packages/tui/src/component/dialog-provider.tsx`, `packages/tui/src/component/dialog-model.tsx`, `packages/opencode/src/cli/cmd/providers.ts` | Filter `opencode`/`opencode-go` out of provider pickers and the `/model` dialog (model list + Favorites/Recent; the model dialog's opencode-first sort became a plain name sort) | Upstream's hosted offerings (Zen/Go) are detours for gateway users. | Keep our filters. | | `packages/tui/src/component/dialog-provider.tsx` | The "Other" custom-provider option routes into the fork-only `runCustomProviderFlow` (component/dialog-custom-provider.tsx, new file) — id → API key → optional base URL → model discovery via `/v1/models` → `provider.` block PATCHed into global codev.json (key stays in auth.json) — instead of upstream's credential-only `ApiMethod`; the local `promptCustomProviderID` helper moved into that flow (upstream's "only stores a credential" description no longer holds). `ApiMethod`'s `custom` prop is now unreferenced but left in place. | An empty base URL keeps upstream's credential-only behavior; with one, the provider is usable without hand-editing codev.json. The configure gate's "Custom provider" option shares the same flow. | Keep our `onSelect` + import and the helper deletion; take upstream's changes to `ApiMethod`/other methods (the flow only wraps the entry point). | | `packages/tui/src/component/prompt/index.tsx` | Gated the prompt footer's model/provider indicator on `useConnected()` (the shared "a real provider is configured" predicate) | Don't advertise the free hosted Zen default (e.g. "Big Pickle · OpenCode Zen") in the footer while nothing is configured — same rationale and predicate as `app.tsx`'s startup gate and the provider/model filters. A configured gateway/real provider, or a deliberately-authenticated opencode/opencode-go, still shows its model. | Keep the extra `Show` condition; take upstream's surrounding changes. | -| `packages/tui/src/component/prompt/index.tsx` | Added a `directoryLabel` memo (abbreviated cwd, `:branch` suffix when known, middle-truncated; last path segment + branch in text color, parent path muted, matching the sidebar footer) rendered as the first item of the prompt footer's right-side group, left of the editor open-file label. The memo delegates to `directoryFooterLabel(...)` and the render goes through a `