Skip to content

Show the Kizen logo mark before init's first prompt - #28

Merged
jbedient-kizen merged 1 commit into
mainfrom
feat/init-banner
Sep 4, 2026
Merged

Show the Kizen logo mark before init's first prompt#28
jbedient-kizen merged 1 commit into
mainfrom
feat/init-banner

Conversation

@jbedient-kizen

Copy link
Copy Markdown
Contributor

Problem

kizen init dropped 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_terminal false, and --help never 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.size cannot answer "will this fit": _shared.py fixes the shared console's width at 220 so tables render consistently, so it always reports 220 regardless of the real terminal. shutil.get_terminal_size is 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.

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.
@jbedient-kizen
jbedient-kizen deleted the branch main September 4, 2026 16:34
@jbedient-kizen jbedient-kizen reopened this Sep 4, 2026
@jbedient-kizen
jbedient-kizen changed the base branch from refactor/extract-run-render-helpers to main September 4, 2026 16:36
@jbedient-kizen
jbedient-kizen merged commit 7afc65a into main Sep 4, 2026
8 checks passed
@jbedient-kizen
jbedient-kizen deleted the feat/init-banner branch September 4, 2026 16:38
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.

2 participants