feat(tui): Plan 22 Phase 1 — RenderFileTree widget + palette tokens#47
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of Plan 22 (
bonsai initcinematic 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— newRenderFileTree+TreeNodetypes.internal/tui/filetree_test.go— unit tests covering every rendering rule + a visual demo test (TestRenderFileTree_Demo).internal/tui/styles.go— addColorLeafDim,ColorRule,ColorRule2adaptive-color tokens.Plan
station/Playbook/Plans/Active/22-init-redesign.md — Phase 1.
Verification
make build— passesgo test ./...— passesgofmt -s -l .— cleango vet ./...— cleantui.FileTreecallers unchanged (cmd/root.goadd/remove/update panels still compile).