feat(init): Plan 22 Phase 2 — initflow package + Chromeless harness hook#48
Merged
Conversation
Adds the internal/tui/initflow/ scaffolding for the cinematic `bonsai init` redesign (Plan 22): - harness: Chromeless optional capability; harness.View() yields Step.View() verbatim when a step opts in. Regression-guarded by a new harness_test entry. - initflow/fallback.go: WideCharSafe() + StageLabels table + StageLabel.Render with kanji/kana-safe and ASCII-only branches. - initflow/enso.go: RenderEnsoRail draws the 4-stage progress rail with [kanji]-box current marker, ● / ○ dots, and LeafDim/Rule2 connectors. ASCII fallback renders [x]/[N]/[ ] brackets. - initflow/chrome.go: RenderHeader (enso-ringed brand + PLANTING INTO breadcrumb) and RenderFooter (一 BONSAI 一 + KeyHint list). - initflow/stage.go: Stage base type (projectDir, stationDir, version, agentDisplay, startedAt) satisfying harness.Step + Chromeless, plus renderFrame composing header + rail + body + footer into the full AltScreen frame. - initflow/stub.go: Phase-2 placeholder stage used by runInitRedesign. - cmd/init.go: BONSAI_REDESIGN=1 branches to runInitRedesign; legacy path untouched. - cmd/init_redesign.go: stub orchestrator — captures startedAt, loads catalog/agent, builds 4 placeholder stages, runs harness.Run, no file writes. - go.mod: promotes mattn/go-runewidth from indirect to direct. Legacy `bonsai init` remains the default — Phase 5 will flip the default and delete the env-flag branch. 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 2 of Plan 22 (
bonsai initcinematic redesign) — addsinternal/tui/initflow/package with chrome/enso/stage/fallback primitives, aChromelessoptional capability on the harness, and an env-flag branch incmd/init.gorouting to a stubrunInitRedesign. Legacybonsai initflow unchanged; new path runs only underBONSAI_REDESIGN=1and renders empty stage scaffolds.Changes
internal/tui/harness/harness.go—Chromelessoptional interface + short-circuit inView().internal/tui/harness/harness_test.go— coverage for chromeless render path.internal/tui/initflow/fallback.go—WideCharSafe()+StageLabel.internal/tui/initflow/fallback_test.go— tests.internal/tui/initflow/enso.go—RenderEnsoRail.internal/tui/initflow/chrome.go—RenderHeader,RenderFooter,KeyHint.internal/tui/initflow/stage.go—Stagebase +renderFrame.internal/tui/initflow/stub.go—StubStageused by Phase 2's four placeholder stages.cmd/init.go— env-flag branch.cmd/init_redesign.go— stubrunInitRedesignwith 4 placeholder stages.go.mod— promotesmattn/go-runewidthfrom indirect to direct (now imported byinitflow/fallback.go).Plan
station/Playbook/Plans/Active/22-init-redesign.md — Phase 2.
Verification
make buildgo test ./...gofmt -s -l .cleango vet ./...cleanbonsai init(no env) runs legacy flow unchanged.BONSAI_REDESIGN=1 bonsai initrenders 4-stage chrome; Enter cycles; Esc pops; Ctrl-C aborts cleanly.BONSAI_ASCII_ONLY=1 BONSAI_REDESIGN=1 bonsai inituses ASCII rail..bonsai.yamlin tmpdir.Snapshot (120 × 32)
Redesign — stage 2 (Branches), wide-char safe:
Redesign — stage 2 (Branches), ASCII fallback (
BONSAI_ASCII_ONLY=1):Live tmux smoke test — first stage of redesign (VESSEL), wide-char:
🤖 Generated with Claude Code