feat(footer): name the repository and show effort #61

Merged
owlburtoe merged 1 commit from footer-project-name-and-effort into master 2026-07-25 20:07:38 -04:00
Owner

Why

In a git worktree the folder is named after the branch, so the statusline printed the same string twice:

sim-276-badge-dynamic-type │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol │ Ctx: 23% │ Week: 20% ▓▓░░░░░░░░

That first segment was basename $PWD, faithful to the captured statusline script — but useless in a worktree.

What changed

simpler │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol · high │ Ctx: 23% │ Week: 20% ▓▓░░░░░░░░
  • Directory segment names the main repository. Resolved via git rev-parse --path-format=absolute --git-common-dir, which reports the main checkout's .git from a linked worktree. Memoized per cwd because render() runs every frame. Outside a repo, or if git fails, it falls back to the cwd basename, exactly as before.
  • Effort suffix on the model segment. pi exposes the live level through ctx.getThinkingLevel(); the footer appends it compactly (GPT-5.6 Sol · high), hidden when the level is off or unavailable. New footerEffort boolean row in the Footer section, default on, read at render time so the toggle reflects live without a reinstall.

Both are deliberate divergences from Claude Code — its script has no effort segment and shows effort only in banner prose ("Fable 5 with high effort"). Recorded in docs/plans/2026-07-16-cc-input-box-footer.md.

Validation

  • bun run test — 15/15 suites green, including new coverage for projectNameFrom (linked worktree, main checkout, bare repo, non-repo, trailing slash), the effort suffix grammar in all three color modes' model segment, and the live footerEffort toggle.
  • tsc --strict clean over all four entry points.
  • Drove the real installClaudeFooter path against the actual ~/Projects/worktrees/simpler/sim-276-badge-dynamic-type worktree; it renders simpler │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol · high │ Ctx: 23%.
  • Not yet smoked in a live pi session — that happens before the release publish.
## Why In a git worktree the folder is named after the branch, so the statusline printed the same string twice: ``` sim-276-badge-dynamic-type │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol │ Ctx: 23% │ Week: 20% ▓▓░░░░░░░░ ``` That first segment was `basename $PWD`, faithful to the captured statusline script — but useless in a worktree. ## What changed ``` simpler │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol · high │ Ctx: 23% │ Week: 20% ▓▓░░░░░░░░ ``` - **Directory segment names the main repository.** Resolved via `git rev-parse --path-format=absolute --git-common-dir`, which reports the main checkout's `.git` from a linked worktree. Memoized per cwd because `render()` runs every frame. Outside a repo, or if git fails, it falls back to the cwd basename, exactly as before. - **Effort suffix on the model segment.** pi exposes the live level through `ctx.getThinkingLevel()`; the footer appends it compactly (`GPT-5.6 Sol · high`), hidden when the level is `off` or unavailable. New `footerEffort` boolean row in the Footer section, default on, read at render time so the toggle reflects live without a reinstall. Both are deliberate divergences from Claude Code — its script has no effort segment and shows effort only in banner prose ("Fable 5 with high effort"). Recorded in `docs/plans/2026-07-16-cc-input-box-footer.md`. ## Validation - `bun run test` — 15/15 suites green, including new coverage for `projectNameFrom` (linked worktree, main checkout, bare repo, non-repo, trailing slash), the effort suffix grammar in all three color modes' model segment, and the live `footerEffort` toggle. - `tsc --strict` clean over all four entry points. - Drove the real `installClaudeFooter` path against the actual `~/Projects/worktrees/simpler/sim-276-badge-dynamic-type` worktree; it renders `simpler │ ⎇ sim-276-badge-dynamic-type │ GPT-5.6 Sol · high │ Ctx: 23%`. - Not yet smoked in a live pi session — that happens before the release publish.
The first statusline segment printed `basename $PWD`, faithful to the captured
statusline script but degenerate inside a git worktree, where the folder is
named after the branch — the footer read
`sim-276-badge │ ⎇ sim-276-badge │ …`. It now resolves the main repository
through `git rev-parse --git-common-dir` (memoized per cwd, since render() runs
every frame) and falls back to the cwd basename outside a repo.

The model segment also carries pi's live thinking level as a compact suffix
(`Fable 5 · high`), hidden when thinking is off and toggleable via the new
`footerEffort` row in the Footer section.

Both are deliberate divergences from Claude Code, recorded in
docs/plans/2026-07-16-cc-input-box-footer.md.
owlburtoe force-pushed footer-project-name-and-effort from 68b6ff7a7a to a96cfb51be
All checks were successful
Plane Sync / Close referenced Plane work items (pull_request) Successful in 2s
2026-07-25 20:04:37 -04:00
Compare
owlburtoe merged commit 1e31149a73 into master 2026-07-25 20:07:38 -04:00
owlburtoe deleted branch footer-project-name-and-effort 2026-07-25 20:07:39 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
owlburtoe/pi-claudify!61
No description provided.