Skip to content

fix: show welcome banner on first CLI run after install/upgrade#132

Merged
anandgupta42 merged 1 commit intomainfrom
fix/postinstall-welcome-banner
Mar 14, 2026
Merged

fix: show welcome banner on first CLI run after install/upgrade#132
anandgupta42 merged 1 commit intomainfrom
fix/postinstall-welcome-banner

Conversation

@anandgupta42
Copy link
Contributor

Summary

  • npm v7+ silences postinstall stdout, so the welcome banner was never visible to users
  • Postinstall now writes a .installed-version marker file to XDG_DATA_HOME
  • CLI reads the marker on startup, shows a styled welcome banner with version info, then removes it
  • Fixed double-v bug (vv0.2.4) in printWelcome() version display

Test plan

  • 10 new tests (5 postinstall + 4 welcome module + 1 fixture update)
  • All 39 related tests pass
  • Full suite: 1634 pass, 4 pre-existing failures (unrelated timeouts)
  • Typecheck passes
  • Verify banner appears after npm install -g @altimateai/altimate-code on next release

🤖 Generated with Claude Code

npm v7+ silences postinstall stdout, so the `printWelcome()` banner was
never visible to users despite running correctly.

**Fixes:**
- Postinstall now writes a `.installed-version` marker to `XDG_DATA_HOME`
- CLI reads the marker on startup, displays a styled welcome banner, then
  removes it — works regardless of npm's output suppression
- Fixed double-v bug (`vv0.2.4`) in `printWelcome()` version display

**Tests (10 new):**
- Postinstall: marker file creation, v-prefix stripping, missing version
- Welcome module: marker cleanup, empty marker, fs error resilience
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@anandgupta42 anandgupta42 merged commit 5cda6a0 into main Mar 14, 2026
11 of 12 checks passed
anandgupta42 added a commit that referenced this pull request Mar 17, 2026
npm v7+ silences postinstall stdout, so the `printWelcome()` banner was
never visible to users despite running correctly.

**Fixes:**
- Postinstall now writes a `.installed-version` marker to `XDG_DATA_HOME`
- CLI reads the marker on startup, displays a styled welcome banner, then
  removes it — works regardless of npm's output suppression
- Fixed double-v bug (`vv0.2.4`) in `printWelcome()` version display

**Tests (10 new):**
- Postinstall: marker file creation, v-prefix stripping, missing version
- Welcome module: marker cleanup, empty marker, fs error resilience
@anandgupta42 anandgupta42 deleted the fix/postinstall-welcome-banner branch March 17, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant