fix: source alias files after first-run setup; clean up setup emojis#62
Conversation
…ately On first container launch, ~/.squarebox-ai-aliases (which defines the c alias) was created by setup.sh but never re-sourced into the current shell. The initial source at bashrc line 144 runs before setup.sh, when the file doesn't exist yet. Only ~/.squarebox-sdk-paths was re-sourced after setup. Add re-sourcing for ai-aliases, editor-aliases, and tui-aliases to match. https://claude.ai/code/session_01Edh56FubqjigsTh15BoiLw
Add 📦 to the "squarebox setup" header box. Change completion message from "🟧📦 All boxed up." to "All boxed up 📦" — the 🟧 (Unicode 12.0) renders as ◆ on many terminals, while 📦 (Unicode 6.0) has broad support. https://claude.ai/code/session_01Edh56FubqjigsTh15BoiLw
There was a problem hiding this comment.
Pull request overview
Ensures alias files created during first-run setup.sh are immediately available in the same shell session by re-sourcing them after setup completes.
Changes:
- Re-source
~/.squarebox-ai-aliases,~/.squarebox-editor-aliases, and~/.squarebox-tui-aliases(plus~/.squarebox-sdk-paths) after the first-run~/setup.shexecution in.bashrc. - Tweaks
setup.shheader/footer output strings (adds/adjusts emoji and wording).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Dockerfile |
Updates the generated ~/.bashrc first-run block to re-source alias/path files after setup.sh so new aliases are usable immediately. |
setup.sh |
Adjusts displayed header/footer messages (cosmetic output change). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if $HAS_GUM; then | ||
| gum style --border double --padding "0 2" --border-foreground 208 "squarebox setup" | ||
| gum style --border double --padding "0 2" --border-foreground 208 "📦 squarebox setup" | ||
| else | ||
| echo "=== squarebox setup ===" | ||
| echo "=== 📦 squarebox setup ===" | ||
| fi |
There was a problem hiding this comment.
These header/footer string changes (adding/adjusting emoji and wording) are unrelated to the PR’s stated goal of re-sourcing alias files after first-run setup. Consider reverting these to keep the change focused, or update the PR description to explicitly include the UI/output change (and ensure any demo/docs that mirror setup.sh are kept in sync).
There was a problem hiding this comment.
| if $HAS_GUM; then | ||
| gum style --border double --padding "0 2" --border-foreground 208 "🟧📦 All boxed up." | ||
| gum style --border double --padding "0 2" --border-foreground 208 "All boxed up 📦" | ||
| else | ||
| echo "🟧📦 All boxed up." | ||
| echo "All boxed up 📦" | ||
| fi |
There was a problem hiding this comment.
Same as above: this output wording/emoji change is outside the PR description’s scope (alias re-sourcing). Either keep the old message or document this change in the PR description and update any mirrored/demo scripts if applicable.
There was a problem hiding this comment.
Updated the PR description to include this change. The demo script (demo/setup-demo.sh) still uses the old string but that's a separate hardcoded demo — it doesn't mirror setup.sh dynamically.
Generated by Claude Code
| ~/setup.sh && touch ~/.squarebox-setup-done | ||
| [ -f ~/.squarebox-ai-aliases ] && source ~/.squarebox-ai-aliases | ||
| [ -f ~/.squarebox-editor-aliases ] && source ~/.squarebox-editor-aliases | ||
| [ -f ~/.squarebox-tui-aliases ] && source ~/.squarebox-tui-aliases | ||
| [ -f ~/.squarebox-sdk-paths ] && source ~/.squarebox-sdk-paths |
There was a problem hiding this comment.
This change fixes a real first-shell usability issue, but it isn’t currently covered by the existing e2e tests: scripts/e2e-test.sh only checks that ~/.bashrc references ~/.squarebox-*-aliases, which would pass even without these new re-source lines. Add a test assertion that the first-run setup block specifically re-sources these files after ~/setup.sh (e.g., grep for setup.sh && touch followed by source ~/.squarebox-ai-aliases, etc.), so regressions are caught.
There was a problem hiding this comment.
Fair point. The existing e2e tests check that .bashrc references the alias files but wouldn't catch a regression where the post-setup re-source lines are removed. That said, the fix is straightforward (3 added lines mirroring the existing sdk-paths pattern) and low risk — a targeted e2e assertion here would be brittle (grepping for specific bashrc line ordering). Manual testing on first-run is the most reliable check for this.
Generated by Claude Code
Summary
Re-source alias files after first-run setup — On first container launch,
~/.squarebox-ai-aliases(which defines thecalias) was created bysetup.shbut never re-sourced into the current shell. The initial source in.bashrcruns beforesetup.sh, when the file doesn't exist yet. Only~/.squarebox-sdk-pathswas re-sourced after setup. Now all alias files are re-sourced to match.Clean up setup header/footer emojis — Add
📦to the "squarebox setup" header box. Change completion message from🟧📦 All boxed up.toAll boxed up 📦— the🟧(Unicode 12.0) renders as◆on many terminals, while📦(Unicode 6.0) has broad support.Test plan
calias works without restarting the shellhttps://claude.ai/code/session_01Edh56FubqjigsTh15BoiLw