refactor(cli): hierarchical indentation for styled CLI output#4786
refactor(cli): hierarchical indentation for styled CLI output#4786alexander-akait wants to merge 2 commits into
Conversation
|
One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via: Supported
Alternatively, if the co-author should not be included, remove the Please update your commit message(s) by doing |
The styled help/info/version/configtest output prefixed a two-space gutter to every line. Move top-level lines (branded headers, dividers, command descriptions, the Usage line, status messages and the footer) to column 0, and keep the two-space indent only for content nested inside a section (envinfo rows, option/command lists, option-help rows). Indentation now encodes hierarchy instead of being a uniform left margin, and output that never went through the renderer (webpack/dev-server errors) is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgNXy9shNnZEnbCfsSbtiQ
4490aec to
15afe1c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4786 +/- ##
=======================================
Coverage 93.43% 93.43%
=======================================
Files 14 14
Lines 5419 5419
Branches 788 788
=======================================
Hits 5063 5063
Misses 354 354
Partials 2 2
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgNXy9shNnZEnbCfsSbtiQ
What this does
The styled help/info/version/configtest output introduced in #4779 prefixes a two-space gutter to every line. This makes the left margin uniform rather than meaningful.
This change makes the indentation hierarchical:
⬡ webpack …), dividers, command descriptions, theUsage:line, section titles (Options,Global options, …), status messages (✖/✔/⚠/ℹ), and the footer.So the indent now encodes hierarchy, and output that never went through the renderer (e.g. webpack / dev-server validation errors) keeps its own formatting untouched.
Before / after (
info)Scope
webpack-cli.ts(the shared#ui*chrome helpers + the command-help description/usage lines).Testing
build+serve+watch(473) pass with 0 snapshot changes — the change is contained to the framed screens; webpack/dev-server error output is unaffected.help/info/version/configtest/ CLI API suites pass with regenerated snapshots.🤖 Generated with Claude Code
https://claude.ai/code/session_01TgNXy9shNnZEnbCfsSbtiQ