feat(cli): polish self-update progress - #947
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds a compact Clack-based presentation for interactive
Confidence Score: 4/5The plain-output predicate should be fixed before merging because documented color-disabled and CI invocations can receive animated terminal output. The new renderer is selected for an empty Files Needing Attention: src/core/install/selfUpdate.ts, src/core/install/selfUpdate.test.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
src/core/install/selfUpdate.ts:358
**Plain-output gating ignores environment**
When `NO_COLOR` is present with an empty value, this truthiness check still enables the Clack renderer. If a CI job allocates a pseudo-terminal, the missing CI guard does the same, causing animated terminal control output to replace the documented stable plain-text output in captured logs.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(cli): polish self-update progress" | Re-trigger Greptile |
| const alreadyCurrent = input.version | ||
| ? installedVersion === targetVersion | ||
| : !isComparableVersion(installedVersion) || !isNewerVersion(installedVersion, targetVersion); | ||
| const interactive = Boolean(io.stdoutIsTTY && io.output && !env.NO_COLOR && env.TERM !== "dumb"); |
There was a problem hiding this comment.
Plain-output gating ignores environment
When NO_COLOR is present with an empty value, this truthiness check still enables the Clack renderer. If a CI job allocates a pseudo-terminal, the missing CI guard does the same, causing animated terminal control output to replace the documented stable plain-text output in captured logs.
Knowledge Base Used: Application runtime and startup
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/core/install/selfUpdate.ts
Line: 358
Comment:
**Plain-output gating ignores environment**
When `NO_COLOR` is present with an empty value, this truthiness check still enables the Clack renderer. If a CI job allocates a pseudo-terminal, the missing CI guard does the same, causing animated terminal control output to replace the documented stable plain-text output in captured logs.
**Knowledge Base Used:** [Application runtime and startup](https://app.greptile.com/modem/-/custom-context/knowledge-base/modem-dev/hunk/-/docs/application-runtime.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 87799705. Interactive rendering now requires that neither CI nor NO_COLOR is present, including empty values, and regression coverage exercises both cases. I also hardened Clack cancellation so SIGINT/SIGTERM terminate the full installer process tree and return the corresponding shell status instead of allowing an update to continue.
Responded by Pi using gpt-5.6-sol.
This comment was generated by Pi using gpt-5.6-sol
Summary
hunk updateas a compact Clack-guided flow in interactive terminalsNO_COLOR, andTERM=dumbPreview
During installation, the status line animates in place as
◒ ◐ ◓ ◑ Updating with npm.Validation
bun run typecheckbun run lintbun run deps:checkbun test src/core/install/selfUpdate.test.tsbun run test— 2,136 passed, 3 skippedbunx oxfmt --check src/core/install/selfUpdate.ts src/core/install/selfUpdate.test.ts src/main.tsx package.json .changeset/cool-hunk-update.mdgit diff --checkTested on Linux. Windows and macOS were not manually tested; the existing cross-platform command-selection coverage remains green.
This PR description was generated by Pi using gpt-5.6-sol