Skip to content

feat(create): cleanup app creation outputs when slack create -app passed#598

Open
srtaalej wants to merge 1 commit into
mainfrom
ale-create-app-outputs
Open

feat(create): cleanup app creation outputs when slack create -app passed#598
srtaalej wants to merge 1 commit into
mainfrom
ale-create-app-outputs

Conversation

@srtaalej

Copy link
Copy Markdown
Contributor

Changelog

Reduced verbose output when using create --app to link an existing app during project creation.

Summary

When --app is provided to slack create, the linking step previously printed multiple noisy sections (App Link header, App Manifest details, App footer, and "Added existing app" message). Now it only prints the single 🏠 App summary section showing team, App ID, Team ID, User ID, and Status.

Preview

Screenshot 2026-06-22 at 4 16 44 PM

Testing

  • make test
  • Manual test - ./bin/slack create my-test -t slack-samples/bolt-js-starter-template --app A123 --team T123 --environment local

Notes

Adresses comments on PR #565 - Improve the output experience for create when --app is provided.

Requirements

@srtaalej srtaalej added this to the Next Release milestone Jun 22, 2026
@srtaalej srtaalej self-assigned this Jun 22, 2026
@srtaalej srtaalej requested a review from a team as a code owner June 22, 2026 20:21
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels Jun 22, 2026
@srtaalej srtaalej changed the title feat: cleanup app creation outputs when passed feat(create): cleanup app creation outputs when slack create -app passed Jun 22, 2026
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.59%. Comparing base (f0d20ad) to head (a0f86d7).

Files with missing lines Patch % Lines
cmd/app/link.go 0.00% 19 Missing ⚠️
cmd/project/create.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #598      +/-   ##
==========================================
- Coverage   71.64%   71.59%   -0.06%     
==========================================
  Files         226      226              
  Lines       19176    19195      +19     
==========================================
+ Hits        13739    13742       +3     
- Misses       4222     4240      +18     
+ Partials     1215     1213       -2     

☔ View full report in Codecov by Harness.
📢 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.

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@srtaalej Super thanks for taking a pass at better create outputs. I'm leaving some comments to help us maintain these commands as ongoing changes are introduced with more "DRY" functions 👁️‍🗨️

Comment thread cmd/app/link.go
Comment on lines +195 to +224
// LinkExistingAppQuiet links an existing app without verbose output. It resolves
// the team and environment, validates the app, saves it, and prints only the app
// summary. Used by `create --app` where the surrounding create output is enough.
func LinkExistingAppQuiet(ctx context.Context, clients *shared.ClientFactory, app *types.App) error {
linkedApp, auth, err := promptExistingApp(ctx, clients)
if err != nil {
return err
}
*app = linkedApp

appIDs := []string{app.AppID}
_, err = clients.API().GetAppStatus(ctx, auth.Token, appIDs, app.TeamID)
if err != nil {
return err
}

err = saveAppToJSON(ctx, clients, *app)
if err != nil {
clients.IO.PrintDebug(ctx, "Error saving app to file when linking existing app: %s", err)
return err
}

clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
Emoji: "house",
Text: "App",
Secondary: formatListSuccess([]types.App{*app}),
}))

return nil
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔭 thought: This is near identical to the lines above and I'm wondering if we can somehow keep a single source of truth for this logic?

slack-cli/cmd/app/link.go

Lines 170 to 190 in a0f86d7

var auth *types.SlackAuth
*app, auth, err = promptExistingApp(ctx, clients)
if err != nil {
return err
}
appIDs := []string{app.AppID}
_, err = clients.API().GetAppStatus(ctx, auth.Token, appIDs, app.TeamID)
if err != nil {
return err
}
// Save the app to the project
err = saveAppToJSON(ctx, clients, *app)
if err != nil {
clients.IO.PrintDebug(ctx, "Error saving app to file when linking existing app: %s", err)
return err
}
// Footer section
LinkAppFooterSection(ctx, clients, app)

@srtaalej srtaalej Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure good call! @zimeg to clarify though, do you mean the entire link command should return the way LinkExistingAppQuiet is returning? or should we have something like

func LinkExistingApp(ctx context.Context, clients *shared.ClientFactory, app *types.App, shouldConfirm bool, quiet bool) (err error) {
	if !quiet {
		// Header section
		LinkAppHeaderSection(ctx, clients, shouldConfirm)
	}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@srtaalej I missed the edited mention! question But separating output from logic might make this possible? I think outputs and even the "should confirm" logic should be moved to adjacent functions:

  • app.LinkExistingApp: What I permalink above
  • app.LinkCommandRunE: Perhaps most the "link" outputs not meant to share

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah got it 🙌 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants