feat(cli): redesign checkout, reset, test, log, lane and merge outputs#10271
Merged
davidfirst merged 12 commits intomasterfrom Apr 6, 2026
Merged
feat(cli): redesign checkout, reset, test, log, lane and merge outputs#10271davidfirst merged 12 commits intomasterfrom
davidfirst merged 12 commits intomasterfrom
Conversation
…d outputs Apply the shared CLI formatting toolkit to 8 more commands: checkout, reset, test, log, lane show, lane create, lane list, and lane merge (including switch). Replace chalk.underline headers with formatTitle, manual item lists with formatSection/formatItem, raw chalk.green success messages with formatSuccessSummary, chalk.yellow hints with formatHint, compact().join with joinSections, and hardcoded [deleted]/[deprecated] markers with errorSymbol/warnSymbol.
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the shared CLI output formatting toolkit (@teambit/cli output-formatter helpers) to additional commands, continuing the CLI output redesign work from #10269 and updating e2e assertions to match the new strings.
Changes:
- Refactors multiple command outputs (
checkout,reset,test,log,lane*,merge,switch) to useformatTitle/formatSection/formatItem/formatHint/formatSuccessSummaryandjoinSections. - Replaces hardcoded markers/symbols and ad-hoc list formatting with consistent toolkit-based sections and summaries.
- Updates e2e tests to assert against the redesigned output text.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scopes/lanes/merge-lanes/merge-lane.cmd.ts | Uses joinSections() to assemble merge + delete outputs consistently. |
| scopes/lanes/lanes/switch.cmd.ts | Converts switch output to toolkit sections/summaries and removes lodash compact. |
| scopes/lanes/lanes/lane.cmd.ts | Redesigns lane list/show/create outputs using sections, titles, hints, and symbols. |
| scopes/defender/tester/test.cmd.ts | Updates bit test output messages to use formatHint/formatSuccessSummary. |
| scopes/component/snapping/reset-cmd.ts | Refactors reset output into sections + summary, joined via joinSections. |
| scopes/component/merging/merge-cmd.ts | Updates merge output sections/items and removes lodash compact import. |
| scopes/component/component-log/log-cmd.ts | Replaces [deleted]/[deprecated] markers with errorSymbol/warnSymbol. |
| scopes/component/checkout/checkout-cmd.ts | Refactors checkout output into sections/titles/hints and uses joinSections. |
| e2e/harmony/snap.e2e.2.ts | Updates merge-related output assertions to match redesigned merge output. |
| e2e/harmony/lanes/merge-lanes-remote.e2e.ts | Updates lane-merge skip output assertion to new section title. |
| e2e/harmony/lanes/lane-snapping.e2e.ts | Updates reset output assertion to new success-summary phrasing. |
| e2e/harmony/delete.e2e.ts | Updates reset output assertion to new success-summary phrasing. |
| e2e/flows/id-with-wildcard.e2e.2.ts | Updates reset output assertion to new success-summary phrasing. |
| e2e/commands/reset.e2e.ts | Updates reset output assertions to new success-summary phrasing. |
- Use joinSections for remote delete output in lane merge - Use formatHint instead of formatSuccessSummary for informational lane list results - Use formatHint for lane create note instead of chalk.yellow - Only show warnSymbol for unsnapped readme components
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
scopes/component/component-log/log-cmd.ts:102
deletedStr/deprecatedStrnow include pre-colorederrorSymbol/warnSymbol, but the wholetitleis wrapped inc.yellow(title). The ANSI reset inside the symbol strings will cancel the outer yellow styling, so parts of the title after the symbol may render in the default terminal color. To keep consistent coloring, avoid wrapping a string that contains independently-colored segments (e.g., color only the base title parts and append the colored markers separately).
const deletedStr = deleted ? ` ${errorSymbol} deleted` : '';
const deprecatedStr = !deleted && deprecated ? ` ${warnSymbol} deprecated` : '';
const title = tag ? `tag ${tag} (${hash})${deletedStr}${deprecatedStr}\n` : `snap ${hash}\n`;
return (
c.yellow(title) +
paintAuthor(email, username) +
GiladShoham
approved these changes
Apr 6, 2026
davidfirst
added a commit
that referenced
this pull request
Apr 9, 2026
… toolkit (#10283) Applies the shared CLI formatting toolkit (`@teambit/cli`) to ~50 additional commands, continuing the work from #10269 and #10271. **Pattern applied across all commands:** - `chalk.underline` headers → `formatTitle` (bold white) - `chalk.green('successfully ...')` → `formatSuccessSummary` (✔ prefix) - `chalk.yellow` hints → `formatHint` (dim text) - Manual item lists → `formatItem` with bullet symbols - `compact([...]).join('\n\n')` → `joinSections` **Commands modernized:** `add`, `deps` (set/remove/unset/reset/eject/blame/diagnose), `lint`, `link`, `remove`, `delete`, `fork`, `recover`, `scope rename`, `remote`, `init`, `clear-cache`, `eject-conf`, `scope set`, `deprecate`, `undeprecate`, `rename`, `move`, `aspect` (set/update/unset/get), `envs` (set/unset/update/list/get), `use`, `unuse`, `create`, `stash`, `scope fork`, `format`, `validate`, `login`, `logout`, `whoami`, `build`, `new`, `merge-abort`, `merge-move`, `capsule`, `check-types`, `fetch`, `version-history`, `artifacts`, `templates`, `npmrc`, `graph`, `git merge-bitmaps`, `set-merge-driver`, `pattern`, `mcp setup` Remaining files use chalk only for inline text emphasis (not structural patterns) per the style guide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the shared CLI formatting toolkit (
@teambit/cli) to 8 more commands, continuing the work from #10269.Commands redesigned:
checkout,reset,test,log,lane show,lane create,lane list,lane merge(+switch)What changed:
chalk.underlinesection headers →formatTitle(bold white)formatSection+formatItemwith bullet symbolschalk.green(...)success messages →formatSuccessSummary(✔ prefix)chalk.yellowhints →formatHint(dim text)compact([...]).join('\n\n')→joinSections[deleted]/[deprecated]markers inbit log→errorSymbol/warnSymbolchalk.bold.underline('Summary')in checkout →formatTitle('Checkout Summary')formatSectionfor available lanes,formatHintfor footerformatTitlefor lane name,joinSectionsfor metadataformatSuccessSummary+formatHintfor scope infoformatSection/formatItemfor skipped/resolved/aborted/snapped sectionsE2e test assertions updated to match new output strings (12 assertions across 6 test files).