Skip to content

chore: CLI improvements.#668

Merged
cpojer merged 2 commits intomainfrom
cli-polish
Mar 3, 2026
Merged

chore: CLI improvements.#668
cpojer merged 2 commits intomainfrom
cli-polish

Conversation

@cpojer
Copy link
Copy Markdown
Member

@cpojer cpojer commented Mar 2, 2026

This PR introduces general helpers to unify the printing of CLI output in Rust and in JS. As you can see from the snapshots, it already aligns a bunch of printing that was previously looking differently. It figures out the widths dynamically, which compresses output quite a bit and saves vertical space.

This was 100% done by Codex, but I think it's mostly good.

Later, I will improve the overall printing style.

@cpojer cpojer requested review from Brooooooklyn and fengmk2 March 2, 2026 09:09
Copy link
Copy Markdown
Member

fengmk2 commented Mar 2, 2026

@cpojer windows ci still fails after I retry.

@cpojer cpojer force-pushed the cli-polish branch 4 times, most recently from fd84514 to bd97aa9 Compare March 3, 2026 01:38
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Mar 3, 2026

Merge activity

  • Mar 3, 3:35 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Mar 3, 3:35 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@cpojer cpojer force-pushed the cli-polish branch 5 times, most recently from bd1530b to e93abdb Compare March 3, 2026 05:18
@cpojer cpojer merged commit 1a17ccd into main Mar 3, 2026
17 checks passed
@cpojer cpojer deleted the cli-polish branch March 3, 2026 06:02
export function replaceUnstableOutput(output: string, cwd?: string) {
// Normalize line endings and strip ANSI escapes so snapshots are stable
// across CI platforms and terminal capabilities.
output = output.replaceAll(ANSI_ESCAPE_REGEX, '').replaceAll(/\r\n/g, '\n').replaceAll(/\r/g, '');
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.

I love this!

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.

2 participants