Skip to content

feat(tui): Plan 22 Phase 1 — RenderFileTree widget + palette tokens#47

Merged
LastStep merged 1 commit into
mainfrom
plan-22-phase-1-filetree
Apr 21, 2026
Merged

feat(tui): Plan 22 Phase 1 — RenderFileTree widget + palette tokens#47
LastStep merged 1 commit into
mainfrom
plan-22-phase-1-filetree

Conversation

@LastStep

Copy link
Copy Markdown
Owner

Summary

Phase 1 of Plan 22 (bonsai init cinematic redesign) — adds a reusable rich file-tree renderer (tui.RenderFileTree) and three palette tokens for the upcoming init-flow chrome. No behavior change to any existing command.

Changes

  • internal/tui/filetree.go — new RenderFileTree + TreeNode types.
  • internal/tui/filetree_test.go — unit tests covering every rendering rule + a visual demo test (TestRenderFileTree_Demo).
  • internal/tui/styles.go — add ColorLeafDim, ColorRule, ColorRule2 adaptive-color tokens.

Plan

station/Playbook/Plans/Active/22-init-redesign.md — Phase 1.

Verification

  • make build — passes
  • go test ./... — passes
  • gofmt -s -l . — clean
  • go vet ./... — clean
  • Existing tui.FileTree callers unchanged (cmd/root.go add/remove/update panels still compile).

Phase 1 of Plan 22 (`bonsai init` cinematic redesign). Adds a reusable
rich file-tree renderer (`tui.RenderFileTree`) and three palette tokens
(`ColorLeafDim`, `ColorRule`, `ColorRule2`) for the upcoming init-flow
chrome.

The new renderer supports NEW/REQUIRED status badges, NodeCurrent leaf
border+tint highlight, nested directories with box-drawing glyphs,
optional root label, Dense mode (no blank separator between siblings),
and MaxWidth-aware note truncation. Unit tests cover every rendering
rule plus a visual demo test (`TestRenderFileTree_Demo`) for eyeballing
against the design reference.

The existing flat `tui.FileTree` helper is unchanged — it still backs
`add`/`remove`/`update` conflict/update panels in `cmd/root.go`.

No behavior change to any existing command; Phase 2 wires the widget
into the init flow.

Plan: station/Playbook/Plans/Active/22-init-redesign.md (Phase 1)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@LastStep LastStep marked this pull request as ready for review April 21, 2026 08:38
@LastStep LastStep merged commit 7553d43 into main Apr 21, 2026
6 checks passed
@LastStep LastStep deleted the plan-22-phase-1-filetree branch April 21, 2026 08:38
LastStep added a commit that referenced this pull request Apr 21, 2026
PR #47 merged (squash 7553d43). Plan 22 moves forward; Phase 2 (initflow
package + chrome + env-flag entrypoint) queued next.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
LastStep added a commit that referenced this pull request Apr 21, 2026
Plan 22 (bonsai init cinematic redesign) shipped end-to-end via 6 PRs
(#47 #48 #49 #50 #51 #52) over 2026-04-21. Default `bonsai init` now
runs the cinematic flow; legacy init path + BONSAI_REDESIGN env-flag
deleted in 5B (main at `5916e05`).

- Move 22-init-redesign.md → Plans/Archive/
- Status.md: In Progress row → 2 Recently Done rows (5A + 5B)
- memory.md: Work State updated (no current task)
- Backlog.md: 2 follow-ups (composition test + dead-path warning)
- Reports/Pending/2026-04-21-plan-22-init-redesign.md: final report

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant