fix(cli): use verbose Listr renderer in CI for install + verify output#33890
Open
mschile wants to merge 10 commits into
Open
fix(cli): use verbose Listr renderer in CI for install + verify output#33890mschile wants to merge 10 commits into
mschile wants to merge 10 commits into
Conversation
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.
…t-bardeen-b6e6d8 # Conflicts: # cli/CHANGELOG.md
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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
Cursor Bugbot risk assessment is no longer Low Risk. Auto-approval dismissed; manual review required.
Cursor Bugbot risk assessment is no longer Low Risk. Auto-approval dismissed; manual review required.
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.

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
VerboseRendererwas removed whenlistr2was upgraded from 3.x to 9.x, and the twonew Listr(...)calls incli/lib/tasks/install.tsandcli/lib/tasks/verify.tsstopped specifying a renderer. The pre-upgrade code also dropped an explicitutil.isCi()branch that swapped in the custom renderer only in CI. Without that branch, both code paths fall through to listr2 9.x's defaultUpdateRenderer, which uses cursor-control codes and word-wraps atprocess.stdout.columns. In a PTY-allocating CI executor withoutCOLUMNS, 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:
util.isCi()true): listr2's built-in'verbose'renderer withPRESET_TIMESTAMP, producing timestamped[STARTED] [HH:mm:ss] {title}/[COMPLETED] [HH:mm:ss] {title}lines. This is the closest functional successor to the deleted customVerboseRenderer(which also emitted timestamped line-per-event output) and preserves the grep-friendly CI log shape.'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: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, andutil/suppress_warnings, and updates all call sites/tests (e.g.Reporterbecomes a named export).Reworks
lib/reporterandtypes/reporterwith explicit typings and safer runtime handling, including wall-clock timestamp parsing, attempt/error normalization, and updated snapshots.Includes a few targeted fixes:
cache.removeProjectPreferencesnow correctly updates thePROJECT_PREFERENCESmap, telemetry spans usesetAttributes, WebKit version detection readswkBrowser.jsasutf8, file-server uses the newnetwork_failuresexport, Chrome args ensure the debugging port is a string, and CI config removes an explicitresource_classoverride fornpm-puppeteer-cypress-tests(plus ashell-quotelockfile bump).Reviewed by Cursor Bugbot for commit 3e909f7. Bugbot is set up for automated code reviews on this repo. Configure here.
Steps to test
cypress installorcypress verify(e.g.cypress run --browser electronin 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.cli/test/lib/tasks/install.spec.tsandcli/test/lib/tasks/verify.spec.tscontinue 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:

After:

PR Tasks
cypress-documentation?type definitions?