refactor: make upgrade notification non-blocking and use bordered box#365
Merged
refactor: make upgrade notification non-blocking and use bordered box#365
Conversation
…gent hints Move the upgrade notification to appear after command execution (just before outro) so it's the last substantive output. Display it in a unicode-bordered box using log.warn for visual prominence. Add [Agent Hints] section so AI agents can easily parse the upgrade suggestion. https://claude.ai/code/session_01GDFqeAimhxEVBWJNLEB96Z
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.44-pr.365.b07a1d8Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.44-pr.365.b07a1d8"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.44-pr.365.b07a1d8"
}
}
Preview published to npm registry — try new features instantly! |
The command is already displayed in the human-readable lines — the [Agent Hints] block just duplicated it unnecessarily. https://claude.ai/code/session_01GDFqeAimhxEVBWJNLEB96Z
kfirstri
reviewed
Mar 8, 2026
kfirstri
requested changes
Mar 8, 2026
Replace hand-rolled Unicode box-drawing with the native box() function from @clack/prompts, as requested in PR review. https://claude.ai/code/session_01GDFqeAimhxEVBWJNLEB96Z
Keep error output clean — only show upgrade notification on success. https://claude.ai/code/session_01GDFqeAimhxEVBWJNLEB96Z
Match original formatUpgradeMessage style. https://claude.ai/code/session_01GDFqeAimhxEVBWJNLEB96Z
781918c to
9884c47
Compare
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.
Note
Description
This PR improves the upgrade notification UX by making it distribution-aware and non-blocking. Instead of always showing
npm install -g base44@latest, the CLI now detects whether it was installed via npm, Homebrew, or as a standalone binary and shows the appropriate upgrade command. The notification is moved to display after the command completes (rather than before) and is skipped entirely when a command errors.Related Issue
None
Type of Change
Changes Made
Distributiontype ("npm" | "binary") anddistributionfield toCLIContext;binary-entry.tspasses"binary"at startup while npm defaults to"npm"detectInstallMethod()to distinguishnpm,brew(by checkingprocess.execPathfor Homebrew paths), andbinarydistributionsgetUpgradeInstruction()to return the correct upgrade command per install method (npm install -g base44@latest,brew upgrade base44, or a GitHub releases download link)startUpgradeCheck()(starts early, in parallel with the command) andprintUpgradeNotification()(awaits and displays after command success only)log.message()tonote()for a boxed, more visually distinct notificationnpm install -g base44@latesttext (now distribution-dependent)Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The upgrade check promise is started immediately after the banner is printed (before the command runs), so the network request runs in parallel with command execution and adds no latency to the notification display.
🤖 Generated by Claude | 2026-03-11 00:10 UTC