feat: add animated CLI banner with static logo fallback#33
Merged
Conversation
Renders an Ink-based braille animation on init/login/signup, plus a synchronous static logo on bare `linq` (via help). Animation and static both reuse the same frame data so they stay visually aligned.
- Split banner-motion.tsx into banner-frames.ts (pure data) + banner-motion.tsx (ink/react component). banner.ts imports STATIC_LOGO_LINES from banner-frames.ts so the static path doesn't load ink at all. - renderBanner() now dynamic-imports ink + react + banner-motion only when an animation actually plays. Bare linq / linq tokens / etc no longer pay the ~50-100ms ink load cost. - Suppress Node's "Importing JSON modules is an experimental feature" warning in bin/run.js + bin/dev.js. It's emitted by ink's transitive deps; targeted by warning name + message so other warnings still surface. - Derive ANIMATION_MS from the sum of frame durations instead of the hard-coded 2100ms guess. Fixes the 3 broken test files (init/login/signup) that previously failed because ink loaded yoga-layout WASM at module-import time.
Collaborator
|
🎉 This PR is included in version 2.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Adds an Ink-rendered braille animation that plays before the interactive prompts on
linq init,linq login, andlinq signup. The static logo (already shown on barelinqvia help) is now generated from the same frame data, so animated and static versions stay visually aligned.Where
src/lib/banner-motion.tsx— new Ink/React component with 43-frame braille animation (auto-generated from ASCII Motion, patched for crop + theming).src/lib/banner.ts— exportsrenderBanner()(animated, used by commands) andLOGO(static string, derived from the first frame of the animation, used byhelp.ts). Falls back to the static logo when stdout isn't a TTY orNO_COLOR/CIis set.src/commands/{init,login,signup}.ts— callawait renderBanner()before the welcome line. Forlogin, it's gated behind the interactive token prompt so--tokenusers don't see it.package.json/tsconfig.json— addink,reactdeps and enablejsx: "react-jsx".Preview