Show the Kizen logo mark before init's first prompt - #28
Merged
Conversation
Interactive terminals only — piped output and test runners leave console.is_terminal False, and --help never reaches the command body. Degrades to a compact box, then to the tagline alone, when the real terminal is too small to hold the art without wrapping into garbage. console.size cannot answer that question: the shared console fixes its width at 220 so tables render consistently, so it always reports 220 here rather than the terminal's actual width. shutil.get_terminal_size is the same real signal Rich falls back to internally.
annaliu-kizen
approved these changes
Sep 4, 2026
jbedient-kizen
changed the base branch from
refactor/extract-run-render-helpers
to
main
September 4, 2026 16:36
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.
Problem
kizen initdropped straight into its first prompt with no indication of what tool you were talking to.Solution
Print the Kizen logo mark and a tagline before the first prompt, matching the mark the node CLI (
@kizenapps/cli) already shows so the two tools look like the same product.Interactive terminals only. Piped output and test runners leave
console.is_terminalfalse, and--helpnever reaches the command body, so nothing new appears in either. It degrades to a compact box and then to the tagline alone when the terminal is too small to hold the art without wrapping into garbage.Testing
bin/check.sh— all five steps pass:1430 passed, 4 skipped(+4 for the new tests).The art's integrity is asserted against its declared constants — 22 rows of exactly 43 columns — so an editor that strips the trailing spaces (which are part of the art) fails the suite rather than shipping a broken banner.
Design notes / tradeoffs
console.sizecannot answer "will this fit":_shared.pyfixes the shared console's width at 220 so tables render consistently, so it always reports 220 regardless of the real terminal.shutil.get_terminal_sizeis the same signal Rich itself falls back to internally, so this reads the real one._init_is_interactive()exists as a one-line wrapper purely so a test can monkeypatch it instead of mutating the process-wide console singleton's private state, which would leak between tests.Third of six stacked branches.