Skip to content

fix(cli): use verbose Listr renderer in CI for install + verify output#33890

Open
mschile wants to merge 10 commits into
developfrom
mschile/intelligent-bardeen-b6e6d8
Open

fix(cli): use verbose Listr renderer in CI for install + verify output#33890
mschile wants to merge 10 commits into
developfrom
mschile/intelligent-bardeen-b6e6d8

Conversation

@mschile
Copy link
Copy Markdown
Collaborator

@mschile mschile commented May 22, 2026

  • Closes

Additional details

When running Cypress install/verify in a CircleCI job whose executor allocates a pseudo-TTY but doesn't set COLUMNS (e.g. binary-test jobs that don't inherit the default-pipeline env), the install / verify task list rendered each character on its own line (example: this CircleCI job).

Root cause: in #33640 the custom VerboseRenderer was removed when listr2 was upgraded from 3.x to 9.x, and the two new Listr(...) calls in cli/lib/tasks/install.ts and cli/lib/tasks/verify.ts stopped specifying a renderer. The pre-upgrade code also dropped an explicit util.isCi() branch that swapped in the custom renderer only in CI. Without that branch, both code paths fall through to listr2 9.x's default UpdateRenderer, which uses cursor-control codes and word-wraps at process.stdout.columns. In a PTY-allocating CI executor without COLUMNS, the wrap width collapses to 1, producing the character-per-line output.

Restores a CI vs. local renderer split equivalent to the pre-#33640 behavior:

  • CI (util.isCi() true): listr2's built-in 'verbose' renderer with PRESET_TIMESTAMP, producing timestamped [STARTED] [HH:mm:ss] {title} / [COMPLETED] [HH:mm:ss] {title} lines. This is the closest functional successor to the deleted custom VerboseRenderer (which also emitted timestamped line-per-event output) and preserves the grep-friendly CI log shape.
  • Local: listr2's 'default' in-place spinner — same pretty output users had before dependency(listr): upgrade listr 3.x to 9.x #33640.

'simple' was considered (and was the renderer in the initial commit), but it lacks the per-line timestamps that the old custom renderer provided and that are useful when diagnosing install/verify durations in CI logs.

Reproduced locally by faking a TTY without setting COLUMNS:

FORCE_COLOR=1 script -q /dev/null node listr-repro.mjs       # default → funky char-per-line under PTY without COLUMNS
FORCE_COLOR=1 script -q /dev/null node listr-repro.mjs --ci  # verbose → [STARTED]/[COMPLETED] with timestamps, clean

Note

Medium Risk
Moderate risk due to broad refactors from CommonJS to TypeScript across server utilities (app_data, task, template_engine, reporter) plus a small logic change in cache preference removal and reporter timestamp handling that could affect runtime behavior.

Overview
Refactors multiple server modules from CommonJS to TypeScript/ESM-style exports, including util/app_data, task, template_engine, util/network_failures, and util/suppress_warnings, and updates all call sites/tests (e.g. Reporter becomes a named export).

Reworks lib/reporter and types/reporter with explicit typings and safer runtime handling, including wall-clock timestamp parsing, attempt/error normalization, and updated snapshots.

Includes a few targeted fixes: cache.removeProjectPreferences now correctly updates the PROJECT_PREFERENCES map, telemetry spans use setAttributes, WebKit version detection reads wkBrowser.js as utf8, file-server uses the new network_failures export, Chrome args ensure the debugging port is a string, and CI config removes an explicit resource_class override for npm-puppeteer-cypress-tests (plus a shell-quote lockfile bump).

Reviewed by Cursor Bugbot for commit 3e909f7. Bugbot is set up for automated code reviews on this repo. Configure here.

Steps to test

  1. In any CircleCI job that runs cypress install or cypress verify (e.g. cypress run --browser electron in the linked job), confirm the "Installing Cypress" / "Verifying Cypress can run" / "Verified Cypress!" task lines render as single, properly colored lines (with [STARTED] [HH:mm:ss] / [COMPLETED] [HH:mm:ss] prefixes) instead of one character per line.
  2. Existing unit tests in cli/test/lib/tasks/install.spec.ts and cli/test/lib/tasks/verify.spec.ts continue to pass (66/66 locally).

How has the user experience changed?

No change in local terminals — they continue to get listr2's default in-place spinner. In CI logs (and any other util.isCi()-detected context), the previously garbled install/verify output is replaced with clean, timestamped, line-per-event output similar to what users saw before the listr2 3→9 upgrade in #33640.

Before:
Screenshot 2026-05-22 at 10 52 15 AM

After:
Screenshot 2026-05-22 at 12 49 32 PM

PR Tasks

  • [na] Is there an associated issue with maintainer approval for PR submission?
  • [na] Have tests been added/updated?
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?

In CI environments that allocate a pseudo-TTY but don't propagate the
COLUMNS env var, listr2 9.x's default UpdateRenderer wraps task title
output to a width of 1, producing one character per line with the
surrounding ANSI escape sequences sliced apart in the log viewer.

The custom VerboseRenderer that previously guarded against this was
removed in #33640 when listr2 was upgraded from 3.x to 9.x. Explicitly
selecting the 'simple' renderer restores clean line-per-task output
without depending on terminal width detection.
cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 03:05

New commits pushed (auto-approval was for 69f34d2, head is now 10e6bb6). Auto-approval dismissed pending Cursor Bugbot re-review of the new head SHA.

cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 03:31

New commits pushed (auto-approval was for 10e6bb6, head is now fcebd1e). Auto-approval dismissed pending Cursor Bugbot re-review of the new head SHA.

cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
@mschile mschile self-assigned this May 22, 2026
@mschile mschile requested a review from cacieprins May 22, 2026 14:12
…t-bardeen-b6e6d8

# Conflicts:
#	cli/CHANGELOG.md
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 16:11

New commits pushed (auto-approval was for fcebd1e, head is now 4236587). Auto-approval dismissed pending Cursor Bugbot re-review of the new head SHA.

mschile added 3 commits May 22, 2026 10:12
Switches from unconditional 'simple' to branching on util.isCi():
- CI: 'verbose' renderer with a wall-clock timestamp on every line.
  This restores the timestamped, line-per-event log shape provided by
  the custom VerboseRenderer removed in #33640, and avoids listr2 9.x's
  default UpdateRenderer wrapping at 1 column under PTYs without
  COLUMNS set.
- Local: keep listr2's default in-place spinner so users see the same
  pretty output as before.
cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fc46986. Configure here.

Comment thread cli/lib/tasks/install.ts Outdated
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 18:12

New commits pushed (auto-approval was for fc46986, head is now cdbca27). Auto-approval dismissed pending Cursor Bugbot re-review of the new head SHA.

cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
@mschile mschile changed the title fix(cli): force simple Listr renderer for install + verify output fix(cli): use verbose Listr renderer in CI for install + verify output May 22, 2026
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 18:14

Cursor Bugbot risk assessment is no longer Low Risk. Auto-approval dismissed; manual review required.

cypress-bot[bot]
cypress-bot Bot previously approved these changes May 22, 2026
@cypress-bot cypress-bot Bot dismissed their stale review May 22, 2026 18:19

Cursor Bugbot risk assessment is no longer Low Risk. Auto-approval dismissed; manual review required.

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.

1 participant