Allow turning off starfield/logo animation#36
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reduced-motion option to suppress the first-run animated logo/starfield and documents relevant environment variables for installation and UI behavior.
Changes:
- Gate the first-run animated logo/starfield behind
ONCE_REDUCED_MOTION=true. - Add unit coverage for
Install.showLogo()behavior with/without apps and with reduced motion enabled. - Document
ONCE_INTERACTIVE=false(installer) andONCE_REDUCED_MOTION=true(UI) in the README.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Documents installer/UI environment variables for non-interactive install and reduced-motion mode. |
| internal/ui/install.go | Disables first-run animation when ONCE_REDUCED_MOTION=true. |
| internal/ui/install_test.go | Adds tests to validate the new reduced-motion gating behavior. |
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func (m Install) showLogo() bool { | ||
| return len(m.namespace.Applications()) == 0 | ||
| return len(m.namespace.Applications()) == 0 && os.Getenv("ONCE_REDUCED_MOTION") != "true" | ||
| } |
There was a problem hiding this comment.
showLogo() now depends on ONCE_REDUCED_MOTION, but it’s used as a guard in multiple places (e.g., NewInstall decides whether to allocate m.starfield/m.logo, while Init() later re-calls showLogo() to decide whether to call m.starfield.Init()). If the env var (or other showLogo() inputs) change between construction and Init(), this can lead to a nil-pointer panic. Consider caching the computed value in the struct at construction time, or making Init()/View() guard on m.starfield != nil/m.logo != nil instead of re-evaluating showLogo().
Running with
ONCE_REDUCED_MOTION=truewill now supress the first-run animation, for cases where it's problematic or distracting.Also documented the tool's ENV vars in the README.