Skip to content

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

Open
zimeg wants to merge 1 commit intomainfrom
zimeg-fix-env-command-output-sections
Open

fix: format env command section headers together as titles#461
zimeg wants to merge 1 commit 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 70.97%. Comparing base (24c1d2c) to head (3e5d6fb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #461   +/-   ##
=======================================
  Coverage   70.96%   70.97%           
=======================================
  Files         220      220           
  Lines       18466    18449   -17     
=======================================
- Hits        13105    13094   -11     
+ Misses       4183     4178    -5     
+ Partials     1178     1177    -1     

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

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!

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!

clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
Emoji: "evergreen_tree",
Text: "App Environment",
Text: "Environment Remove",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Text: "Environment Remove",
Text: "Environment unset",

edit- Saw michaels suggestion above and I like "Unset environment variable"!

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