Skip to content

feat(cli): redesign checkout, reset, test, log, lane and merge outputs#10271

Merged
davidfirst merged 12 commits intomasterfrom
feat/cli-toolkit-alignment-part2
Apr 6, 2026
Merged

feat(cli): redesign checkout, reset, test, log, lane and merge outputs#10271
davidfirst merged 12 commits intomasterfrom
feat/cli-toolkit-alignment-part2

Conversation

@davidfirst
Copy link
Copy Markdown
Member

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.underline section headers → formatTitle (bold white)
  • Manual item lists → formatSection + formatItem with bullet symbols
  • Raw chalk.green(...) success messages → formatSuccessSummary (✔ prefix)
  • chalk.yellow hints → formatHint (dim text)
  • compact([...]).join('\n\n')joinSections
  • Hardcoded [deleted]/[deprecated] markers in bit logerrorSymbol/warnSymbol
  • chalk.bold.underline('Summary') in checkout → formatTitle('Checkout Summary')
  • Lane list: structured sections with formatSection for available lanes, formatHint for footer
  • Lane show: formatTitle for lane name, joinSections for metadata
  • Lane create: formatSuccessSummary + formatHint for scope info
  • Merge report: formatSection/formatItem for skipped/resolved/aborted/snapped sections

E2e test assertions updated to match new output strings (12 assertions across 6 test files).

…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.
Copilot AI review requested due to automatic review settings April 3, 2026 16:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 use formatTitle/formatSection/formatItem/formatHint/formatSuccessSummary and joinSections.
  • 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.

Comment thread scopes/component/merging/merge-cmd.ts
Copilot AI review requested due to automatic review settings April 3, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Comment thread scopes/lanes/merge-lanes/merge-lane.cmd.ts Outdated
Comment thread scopes/lanes/merge-lanes/merge-lane.cmd.ts Outdated
Comment thread scopes/lanes/lanes/switch.cmd.ts
Comment thread scopes/lanes/lanes/lane.cmd.ts
Comment thread scopes/lanes/lanes/lane.cmd.ts Outdated
Comment thread scopes/lanes/lanes/lane.cmd.ts Outdated
Comment thread scopes/lanes/lanes/lane.cmd.ts Outdated
- 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
Copilot AI review requested due to automatic review settings April 3, 2026 20:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/deprecatedStr now include pre-colored errorSymbol/warnSymbol, but the whole title is wrapped in c.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) +

Comment thread scopes/component/merging/merge-cmd.ts
Comment thread scopes/defender/tester/test.cmd.ts
Comment thread scopes/component/snapping/reset-cmd.ts Outdated
Copilot AI review requested due to automatic review settings April 6, 2026 12:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment thread scopes/lanes/lanes/lane.cmd.ts
Comment thread scopes/component/component-log/log-cmd.ts Outdated
Copilot AI review requested due to automatic review settings April 6, 2026 13:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

@davidfirst davidfirst enabled auto-merge (squash) April 6, 2026 15:02
@davidfirst davidfirst merged commit 0ab4a28 into master Apr 6, 2026
12 checks passed
@davidfirst davidfirst deleted the feat/cli-toolkit-alignment-part2 branch April 6, 2026 15:36
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.
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.

3 participants