Skip to content

fix: format env command section headers together as titles#461

Merged
zimeg merged 4 commits intomainfrom
zimeg-fix-env-command-output-sections
Apr 7, 2026
Merged

fix: format env command section headers together as titles#461
zimeg merged 4 commits intomainfrom
zimeg-fix-env-command-output-sections

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Apr 2, 2026

Changelog

The sections of env command outputs are now titled to match the command itself and are grouped under one section for each command.

Summary

This PR formats the env command section headers together in a standard title format.

Preview

demo

Notes

Requirements

@zimeg zimeg added this to the Next Release milestone Apr 2, 2026
@zimeg zimeg self-assigned this Apr 2, 2026
@zimeg zimeg requested a review from a team as a code owner April 2, 2026 05:42
@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment labels Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.12%. Comparing base (0fd8736) to head (bb1384e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #461   +/-   ##
=======================================
  Coverage   71.12%   71.12%           
=======================================
  Files         220      220           
  Lines       18547    18530   -17     
=======================================
- Hits        13192    13180   -12     
+ Misses       4178     4175    -3     
+ Partials     1177     1175    -2     

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

@zimeg
Copy link
Copy Markdown
Member Author

zimeg commented Apr 2, 2026

📋 note: This follows feedback from #451!

Copy link
Copy Markdown
Member

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

✅ Thank you so much for standardizing the headers! I've left a question that I'll detail below, but approaching to keep this PR unblocked. 🎉

💬 I've left a question around whether we want to change this to Set/Unset based on PR #460. Either way, I'll approve this PR so that it's not blocked by nits because it's an improvement either way.

cmd/env/set.go Outdated
fmt.Sprintf("Successfully added \"%s\" as an app environment variable", variableName),
},
}))
details = append(details, fmt.Sprintf("Successfully added \"%s\" as an app environment variable", variableName))
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.

question: Should we start using the terms "set" and "unset" based on PR #460? While using another word like "added" might solidify what's happening, I think "set" is more accurate because it may be adding or updating the key.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mwbrooks @srtaalej Noted in #460 also that "remove" might have a few places to change! I agree with both comments and mirror this here to not forget 👾

looking great!! i noticed there are still a few references to removing in the file 👁️‍🗨️
line 120 "Select a variable to remove"
line 150 "Successfully removed "%s" from the app's environment variables"
might be nice to update these too 🚀

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🧪 note: This will require updates to our E2E tests too!

cmd/env/add.go Outdated
clients.IO.PrintTrace(ctx, slacktrace.EnvAddSuccess)
clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
Emoji: "evergreen_tree",
Text: "Environment Add",
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.

question: Based on #460 what about?

  • Set Environment Variable
  • Unset Environment Variable
  • List Environment Variables (plural)
Suggested change
Text: "Environment Add",
Text: "Set Environment Variable",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mwbrooks Haha I realize these branches overlap! Would we want to use:

  • Environment Set
  • Environment List
  • Environment Unset

Instead? I agree this reads odd but matching the command name might let use expand more in details that follow I hope 📚

Copy link
Copy Markdown
Contributor

@srtaalej srtaalej left a comment

Choose a reason for hiding this comment

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

looks good! it'd be nice to use set and unset everywhere but non-blocking 😁 thank you for these very nice changes to env!

zimeg and others added 3 commits April 7, 2026 10:12
Accept main's rename of add→set and remove→unset while preserving the
branch's section header consolidation pattern across all env commands.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Ale Mercado <maria.mercado@slack-corp.com>
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
@zimeg
Copy link
Copy Markdown
Member Author

zimeg commented Apr 7, 2026

@mwbrooks @srtaalej Both amazing thanks for the reviews and share eyes shared 👁️‍🗨️ ✨

I'm merging this once tests pass with changes that:

  • Use command headers
  • Replace wording with "set" instead of "save" or "add" alternatives

Thanks again for bringing polish to this experience 🙏

@zimeg zimeg merged commit a0b5565 into main Apr 7, 2026
8 checks passed
@zimeg zimeg deleted the zimeg-fix-env-command-output-sections branch April 7, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented 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.

3 participants