Skip to content

Allow turning off starfield/logo animation#36

Merged
kevinmcconnell merged 2 commits intomainfrom
reduced-motion-flag
Apr 2, 2026
Merged

Allow turning off starfield/logo animation#36
kevinmcconnell merged 2 commits intomainfrom
reduced-motion-flag

Conversation

@kevinmcconnell
Copy link
Copy Markdown
Collaborator

Running with ONCE_REDUCED_MOTION=true will now supress the first-run animation, for cases where it's problematic or distracting.

Also documented the tool's ENV vars in the README.

Copilot AI review requested due to automatic review settings April 2, 2026 14:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) and ONCE_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.

Comment thread internal/ui/install.go
Comment on lines 352 to 354
func (m Install) showLogo() bool {
return len(m.namespace.Applications()) == 0
return len(m.namespace.Applications()) == 0 && os.Getenv("ONCE_REDUCED_MOTION") != "true"
}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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().

Copilot uses AI. Check for mistakes.
@kevinmcconnell kevinmcconnell merged commit 18e5307 into main Apr 2, 2026
9 checks passed
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