Skip to content

fix: source alias files after first-run setup; clean up setup emojis#62

Merged
BrettKinny merged 2 commits into
mainfrom
claude/fix-c-alias-container-KZKwE
Apr 10, 2026
Merged

fix: source alias files after first-run setup; clean up setup emojis#62
BrettKinny merged 2 commits into
mainfrom
claude/fix-c-alias-container-KZKwE

Conversation

@BrettKinny
Copy link
Copy Markdown
Collaborator

@BrettKinny BrettKinny commented Apr 10, 2026

Summary

  • Re-source alias files after first-run setup — 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 in .bashrc runs before setup.sh, when the file doesn't exist yet. Only ~/.squarebox-sdk-paths was 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. to All boxed up 📦 — the 🟧 (Unicode 12.0) renders as on many terminals, while 📦 (Unicode 6.0) has broad support.

Test plan

  • Build container and verify first-run c alias works without restarting the shell
  • Verify "📦 squarebox setup" header displays correctly
  • Verify "All boxed up 📦" completion message displays correctly
  • Verify aliases still work on subsequent container starts

https://claude.ai/code/session_01Edh56FubqjigsTh15BoiLw

claude added 2 commits April 10, 2026 06:12
…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
Copilot AI review requested due to automatic review settings April 10, 2026 06:20
Copy link
Copy Markdown
Contributor

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

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.sh execution in .bashrc.
  • Tweaks setup.sh header/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.

Comment thread setup.sh
Comment on lines 65 to 69
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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated the PR title and description to cover both changes.


Generated by Claude Code

Comment thread setup.sh
Comment on lines 1170 to 1174
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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

Comment thread Dockerfile
Comment on lines 158 to 162
~/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
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

@BrettKinny BrettKinny changed the title fix: source alias files after first-run setup so c alias works immediately fix: source alias files after first-run setup; clean up setup emojis Apr 10, 2026
@BrettKinny BrettKinny merged commit 41843aa into main Apr 10, 2026
5 checks passed
@BrettKinny BrettKinny deleted the claude/fix-c-alias-container-KZKwE branch April 10, 2026 06:31
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.

3 participants