Repository navigation
Feat: Keep the installer's progress bar and end every install with the logo - #1271
Conversation
On a terminal, every successful setup run now ends with the logo and its
`ready in` line. That covers a fresh install, an upgrade, a repair, make
dev-install, and a re-run with nothing to change. Before, only a fresh
install showed the logo; an upgrade, the most common run, ended on a
single plain line.
The logo is a 6-row block-letter CORTEX ("ANSI Shadow" style) drawn in
the accent colour. It replaces the 2-row half-block wordmark. A fresh
install still follows it with the next command and the undo line. No
logo appears on a failure, a rollback, a decline or --install-only. Plain
mode (no terminal, or NO_COLOR) is unchanged.
Also, on a terminal:
- `ready in` counts from consent (or --yes) to the end, so the time spent
at the prompt is no longer included.
- Finished rows' timings end at column 78, as does the version on setup's
header. That column shrinks to the terminal's width minus 1, and rows
keep a 2-space minimum gap. doctor and uninstall share the checklist,
so their animated rows align the same way.
- When the installer has already drawn its own title and progress bar,
setup skips its header and its `✓ downloaded` row. install.sh signals
that with CORTEX_INSTALLER_DREW=1, an environment variable rather than
one of the frozen handoff flags, so an older agentop ignores it and
still prints both. setup honours the variable only together with the
installer's handoff flags, so a stray value in a later shell does
nothing.
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
On a terminal, install.sh now: - prints `rosso cortex · installer` with the version and platform right-aligned; - draws the first bar frame at once (the size requests run in the background instead of holding up the screen); - leaves the finished 100% frame on screen and marks it `· sha256 ✓` once the checksums verify. Before, the bar was erased as soon as the downloads ended, so a quick download left nothing on screen. Full cells are drawn in the accent colour unless NO_COLOR is set. Any warning or error ends the bar's line first, so it starts on a clean line. curl's own errors are held until then. When the bar was drawn, the script exports CORTEX_INSTALLER_DREW=1 to setup; otherwise it unsets any leftover value. The two size requests are bare background curls, so stopping one stops the curl itself. They are stopped on a die, a ^C, a TERM, a HUP, and before the handoff. Off a terminal, under TERM=dumb, or in a window too narrow for the title, the output is unchanged. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
esnible
left a comment
There was a problem hiding this comment.
I found nothing blocking. I checked these behaviours in the code:
- Hidden header:
CORTEX_INSTALLER_DREWhides setup's header only when the handoff flags are present and stdout animates, and install.sh unsets any value it inherited. - Plain mode: the output is unchanged.
- Download summary: no
warncan fire between the 100% frame andbar_verified, so a terminal never loses both thesha256 ✓line and setup's✓ downloadedrow. - Size requests: the HEADs are bare curls, so
$!is the curl itself, and they are stopped on handoff, on a die and on ^C.
Locally, install_test.sh passes 237/237 under both sh and dash. agentop's go test -race ./... passes, and go vet and gofmt are clean.
The one real finding: the logo ignores a narrow terminal, while the timings and the header already follow it. There's also a nit about CLICOLOR. Neither blocks.
Author: huang195 (MEMBER — maintainer)
Areas reviewed: Go (agentop setup, checklist), Shell (install.sh and its test suite), YAML (readme-demo comment)
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits, all signed-off: yes
CI status: passing
| func (u *UI) Wordmark(right string) { | ||
| // Logo ends a run that worked: the logo in the accent, a blank line, then below, | ||
| // indented under it. The blank line above it is the caller's. | ||
| func (u *UI) Logo(below string) { |
There was a problem hiding this comment.
suggestion: Logo always draws its rows 52 columns wide (50 plus the 2-space indent), even though u.edge already knows when the terminal is narrow. I checked with terminalWidth stubbed to 40: edge is 39 and the widest logo line is still 52, so every row wraps and the logo comes out garbled. This hits setup run by hand in a narrow tmux or IDE pane. It also hits the one-liner: install.sh switches to its plain line below about 51 columns, but setup still animates. Suggest falling back to the plain ending line when u.edge < 52. That keeps the last column empty, as the timings already do.
| # accent is one shade for a light terminal and another for a dark one, and a shell | ||
| # cannot tell which it is drawing on. | ||
| # figures agree with setup's. The bar's full cells are in the accent unless NO_COLOR | ||
| # is set to anything but empty, which is how setup reads it too. The accent here is one |
There was a problem hiding this comment.
nit: "which is how setup reads it too" is only true for NO_COLOR. Setup's renderer (termenv v0.16 EnvNoColor) also turns colour off for CLICOLOR=0, unless CLICOLOR_FORCE is set. So with CLICOLOR=0 the bar is red but setup's rows and logo are not. Either add CLICOLOR=0 to the check, or limit the comment to NO_COLOR.
What
The v0.9.0-rc.1 one-liner, run as an upgrade on a Mac, showed neither the progress bar nor a logo:
This change makes the installer look like the one we designed (opencode's bar-and-logo feel), on every run.
Upgrade, captured on a pty (temp HOME, stubbed services, ANSI stripped):
install.sh, on a terminalrosso cortex · installer, with the version and platform right-aligned.· sha256 ✓once the checksums verify.CORTEX_INSTALLER_DREW=1is exported to setup, so it skips its own header and✓ downloadedrow instead of printing them twice. This is an environment variable, not a new handoff flag, so the frozen flag contract holds: an older agentop ignores it and prints both.agentop setup, on a terminalvX ready in Ns. That covers a fresh install, an upgrade, a repair,make dev-install, and nothing-to-change. A fresh install keeps its next command and undo line.--install-only.ready inno longer counts time spent at the prompt.Plain mode is unchanged. That covers no terminal,
TERM=dumb, a window too narrow for the title, and NO_COLOR. Off a terminal, the old and newinstall.shwere compared byte for byte, and so were the release smoke test's strings and the README demo.Testing
script(1):sha256 ✓, NO_COLOR, narrow and dumb terminals;CORTEX_INSTALLER_DREWreaching setup on a pty, and only there;✓ downloadedrow skipped only with the variable plus the handoff flags;ready inexcluding prompt time.Each new check was shown to fail against a deliberately broken copy of the code.
Worth knowing
main-latestbuild after this merges,--ref=maincan show the title and bar and also setup's old header and✓ downloadedrow, if the binaries still predate this change. Nothing is missing, and it clears on the next build.Downloading…line instead of a bar, because the title has to fit.✓ downloadedrow was before.Assisted-By: Claude Code