Skip to content

refactor: remove logger from create command#366

Open
mwbrooks wants to merge 2 commits intomainfrom
mwbrooks-chopping-the-log-2
Open

refactor: remove logger from create command#366
mwbrooks wants to merge 2 commits intomainfrom
mwbrooks-chopping-the-log-2

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented Mar 6, 2026

Changelog

  • N/A

Summary

This pull request is part 2 of removing internal/logger package and is focused on the the create command.

  • The appCreateSpinner is removed because it was never used
    • The production code successfully stopped it, but it never started it. Stops are ignored when the spinner has not started.
    • The installing dependencies spinner continues to display as it does in production
    • I looked into re-adding it, but the spinner but it no longer looks good with our new create UX

Test Steps

$ lack create my-app
# → Select "Starter app"
# → Select "Bolt for Python"
# → Confirm spinner displayed when installing dependencies
# → Confirm all output looks as expected

# Cleanup
$ rm -rf my-app/

Requirements

@mwbrooks mwbrooks self-assigned this Mar 6, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Mar 6, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Mar 6, 2026
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.24%. Comparing base (c449532) to head (6149149).

Files with missing lines Patch % Lines
internal/pkg/create/create.go 33.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
+ Coverage   65.06%   65.24%   +0.17%     
==========================================
  Files         215      215              
  Lines       18179    18123      -56     
==========================================
- Hits        11829    11824       -5     
+ Misses       5254     5206      -48     
+ Partials     1096     1093       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

Comments for the patient reviewers 🙇🏻

Comment on lines +34 to +37
### Formatting

Always run `gofmt -w` on changed Go files after making edits to ensure proper formatting.

Copy link
Member Author

Choose a reason for hiding this comment

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

note: Just adding this to scratch an itch where Claude fails to format files correctly.

Comment on lines -46 to -50
var appCreateSpinner *style.Spinner

const copyTemplate = "Copying"
const cloneTemplate = "Cloning"

Copy link
Member Author

Choose a reason for hiding this comment

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

note: Removing because the spinner was never started in the current code.

Comment on lines -200 to -203
case "on_app_create_template_default":
printAppCreateDefaultemplate(cmd, event)
case "on_app_create_template_custom":
printAppCreateCustomTemplate(cmd, event)
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Neither of these events were ever called. This is why the spinner was never started.

Comment on lines -204 to -205
case "on_app_create_completion":
printProjectCreateCompletion(clients, cmd, event)
Copy link
Member Author

Choose a reason for hiding this comment

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

note: This event was correctly called, but the spinner was never started so any calls to stop it are ignored.

Comment on lines -231 to -232
// Notify listeners
log.Log("info", "on_app_create_template")
Copy link
Member Author

Choose a reason for hiding this comment

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

note: This event name doesn't exist 🤦🏻 It should have been on_app_create_template_[default|custom].

@mwbrooks mwbrooks marked this pull request as ready for review March 6, 2026 22:59
@mwbrooks mwbrooks requested a review from a team as a code owner March 6, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant