feat(splash): a night scene on the splash and in an empty terminal pane - #21
Merged
Conversation
…ow logo - Remove SplashState, SPLASH_DURATION, and progress bar - Add crow silhouette ASCII art, version, and branch perch - Change splash_loop to block on key press instead of a 1600ms timer - Drop state parameter from draw() signature - Redraw splash on terminal resize
The logo now animates while the splash waits for a key: one wing sweeps from outstretched to raised and back, composited over a body silhouette that never moves. Frame rows are padded to a fixed canvas width so the centred block keeps its column instead of drifting with the wing.
With every pane closed the panel showed a lone hint line. It now shows the same crow the splash does, above that hint. A short pane crops the tail and lets the branch stand in for it, which reads as the bird behind the branch rather than as a cut-off drawing; a pane too small for even head and shoulders keeps the hint alone. The flap runs off a shared origin instead of a caller's counter, so the event loop's existing redraw is all it needs to animate.
The logo becomes a scene: a crow perched on a bough, facing a crescent moon, under a sky of stars. The bird, the bough and the moon are fixed art — only the stars change, each on its own phase, so the screen has motion without an animation to sit through. Cells carry what they are rather than how they look, which lets the renderer paint the bird in the session accent, the bough dim behind it, and the sky in its own palette. A short pane drops sky rows from the top, so the bird and its bough are the last thing to go.
A build.rs stamps the checked-out commit into NIGHTCROW_COMMIT, and the splash and the empty pane print it beside the version. Which build is running was until now invisible from the screen: a client left over from an earlier install looks exactly like a current one, which is how a stale binary went unnoticed against a freshly restarted daemon. A trailing `+` marks a dirty work tree. Builds with no git metadata — a crates.io package — report `unknown` rather than failing.
The bird was one flat accent-coloured mass, so the folded wing did not read at all. Sprites now carry two aligned tables: glyphs for shape and density (█ ▓ ▒ against ▄ ▀ contours) and an ink map naming the surface each cell belongs to. The renderer turns ink into colour, so shading works on both axes at once — the wing sits a step lighter than the body and the underside a step darker, lit from the moon's side. The accent moves to the eye. Painting the whole bird in the session colour made it a red or magenta crow; one bright cell keeps the session's colour on screen and lets the bird be grey. The bough takes browns of its own, which the sixteen named colours cannot supply — hence 256-colour indices throughout the scene.
One frame in fifteen the eye becomes a closed lid, which reads as a blink without the bird moving. It is the second and last thing on the screen allowed to change between frames, so the invariant that pins the drawing down now names it: sky and eye may differ, nothing else may. The blink deliberately misses frame 0 — the first thing anyone sees on the splash should be the bird looking back.
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.
What
The splash screen becomes a drawing: a crow perched on a bough, facing a
crescent moon, under a sky of stars. The same scene fills the terminal panel
when every pane is closed, where a lone hint line used to sit. Both screens
print which build they are.
Why
The old splash was a static block-art crow that cleared on a timer, and the
empty terminal panel said
No terminal — press ^F t to open oneand nothingelse. Neither told the user anything about the build they were running, which
is how a client left over from an earlier install can look identical to a
current one.
How
ui/splash/scene.rs— sprites are a glyph grid plus an aligned ink map: theglyphs carry shape and shading (
█ ▓ ▒density against▄ ▀contours), themap names the surface each cell belongs to. The renderer turns ink into
colour, so the folded wing sits a step lighter than the body and the underside
a step darker, lit from the moon's side. 256-colour indices, because a crow
needs several near-blacks that read apart on black.
fifteen, the eye blinks — an invariant test pins every other cell down.
ui/splash/night.rs— ink → palette, and a bottom-anchored crop: a short panedrops sky rows from the top, so the bird and its bough are the last to go.
or magenta crow; one bright cell keeps the session's colour on screen.
build.rsstamps the checked-out commit intoNIGHTCROW_COMMIT. A dirty worktree gets a trailing
+; a build with no git metadata reportsunknownrather than failing.
Verification
cargo fmt --all --check,cargo clippy --all-targets --all-features -D warnings,cargo test(1602 passed) on Linux. macOS and Windows are on CI.