Skip to content

fix(app): order help sections consistently - #1865

Draft
Pybsama wants to merge 1 commit into
fastly:mainfrom
Pybsama:codex/fix-help-section-order
Draft

fix(app): order help sections consistently#1865
Pybsama wants to merge 1 commit into
fastly:mainfrom
Pybsama:codex/fix-help-section-order

Conversation

@Pybsama

@Pybsama Pybsama commented Jul 30, 2026

Copy link
Copy Markdown

Change summary

Fixes #1656.

This makes the help hierarchy consistent by displaying command-specific
sections before shared global flags:

  • compact help now shows required/optional flags, arguments, and commands
    before global flags;
  • verbose help now shows arguments and subcommands/commands before global
    flags;
  • the auth guide and See Also footer remain after global flags.

The change only reorders the existing text templates. Flag classification,
command definitions, and JSON help output are unchanged.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Testing

  • GOTOOLCHAIN=go1.25.7 go test -race -run '^TestHelpSectionOrder$' -count=50 ./pkg/app
  • GOTOOLCHAIN=go1.25.7 go test -race -shuffle=on -count=10 ./pkg/app
  • GOTOOLCHAIN=go1.25.7 make all

User Impact

Users see the same command-specific-first ordering in compact and verbose help,
while all existing help content remains available.

Are there any considerations that need to be addressed for release?

No breaking changes or special release steps.

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.

In the --help output, the "Global Flags" and "Commands" output order should be consistent

1 participant