Skip to content

Feat: Keep the installer's progress bar and end every install with the logo - #1271

Merged
huang195 merged 2 commits into
rossoctl:mainfrom
huang195:feat/installer-bar-and-logo
Oct 5, 2026
Merged

huang195 merged 2 commits into
rossoctl:mainfrom
huang195:feat/installer-bar-and-logo

Conversation

@huang195

@huang195 huang195 commented Oct 5, 2026

Copy link
Copy Markdown
Member

What

The v0.9.0-rc.1 one-liner, run as an upgrade on a Mac, showed neither the progress bar nor a logo:

  • The bar was erased as soon as the download ended. It also waited 1–2s on the size requests before drawing its first frame.
  • The logo only appeared on a fresh install, and it was a cramped 2-row wordmark.

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):

  rosso cortex · installer                              v9.9.10 · darwin/arm64
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  100%  7.4 MB · sha256 ✓  2.0s

  This will:
    replace  agentop, cortex, cortex-session-dump  ~/.local/bin (previous kept until healthy)
    run      the cortex proxy                      launchd user agent · 127.0.0.1:65449

  Undo any time: agentop uninstall

  Continue? [Y/n] y

  ✓ installed    agentop, cortex, cortex-session-dump v9.9.9 → v9.9.10    0.0s
  · PATH         in ~/.zshrc; new terminals only
  · config       ~/.cortex/config.yaml (kept)
  ✓ started      launchd user agent · healthy on 127.0.0.1:65449          0.1s
  · routed       Claude Code already routed

   ██████╗ ██████╗ ██████╗ ████████╗███████╗██╗  ██╗
  ██╔════╝██╔═══██╗██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝
  ██║     ██║   ██║██████╔╝   ██║   █████╗   ╚███╔╝
  ██║     ██║   ██║██╔══██╗   ██║   ██╔══╝   ██╔██╗
  ╚██████╗╚██████╔╝██║  ██║   ██║   ███████╗██╔╝ ██╗
   ╚═════╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝

    v9.9.10 ready in 0.1s

install.sh, on a terminal

  • Title line. rosso cortex · installer, with the version and platform right-aligned.
  • The bar.
    • It draws its first frame at once; the two size requests run in the background.
    • It stays on screen at 100% and is marked · sha256 ✓ once the checksums verify.
    • Full cells use the accent colour, unless NO_COLOR is set.
  • Clean lines and cleanup. Warnings, errors and curl's own messages start on a clean line. The size requests are stopped on a die, a ^C, a TERM, a HUP and before the handoff.
  • Handing off. CORTEX_INSTALLER_DREW=1 is exported to setup, so it skips its own header and ✓ downloaded row 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 terminal

  • The logo. Every successful run ends with the 6-row CORTEX logo in the accent colour, then vX 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.
    • No logo on a failure, a rollback, a decline or --install-only.
  • ready in no longer counts time spent at the prompt.
  • Alignment. Timings and the header's version end at column 78, or one less than the terminal width. doctor and uninstall share the checklist, so their animated rows align too.

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 new install.sh were compared byte for byte, and so were the release smoke test's strings and the README demo.

Testing

sh scripts/install_test.sh                                 # macOS sh and dash
shellcheck --severity=error scripts/install.sh scripts/install_test.sh
cd cmd/agentop && env -u SSL_CERT_FILE -u REQUESTS_CA_BUNDLE go test -race -count=1 ./...
cd scripts/readme-demo && go test ./...
  • Shell, on a real pty via script(1):
    • the title, the first frame and the bar staying on screen;
    • sha256 ✓, NO_COLOR, narrow and dumb terminals;
    • a failed download, a checksum mismatch and ^C;
    • CORTEX_INSTALLER_DREW reaching setup on a pty, and only there;
    • hung size requests being stopped, not waited for, on a handoff, a die and a ^C.
  • Go:
    • the logo's exact rows and its accent;
    • column-78 alignment and its fallback;
    • the header and the ✓ downloaded row skipped only with the variable plus the handoff flags;
    • the logo on fresh install, upgrade, repair and nothing-to-change, and not on failure, decline or install-only;
    • ready in excluding prompt time.

Each new check was shown to fail against a deliberately broken copy of the code.

Worth knowing

  • For one main-latest build after this merges, --ref=main can show the title and bar and also setup's old header and ✓ downloaded row, if the binaries still predate this change. Nothing is missing, and it clears on the next build.
  • Windows narrower than about 56 columns now get the plain Downloading… line instead of a bar, because the title has to fit.
  • The bar's time is in whole seconds, as setup's ✓ downloaded row was before.

Assisted-By: Claude Code

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]>
@huang195
huang195 requested a review from a team as a code owner October 5, 2026 02:35
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e8fa28aa-6545-4185-bb54-a52a7830a2ae
📥 Commits

Reviewing files that changed from the base of the PR and between 4b81beb and 9a6f199.

📒 Files selected for processing (8)
  • cmd/agentop/checklist/checklist.go
  • cmd/agentop/checklist/checklist_test.go
  • cmd/agentop/cmd_setup.go
  • cmd/agentop/cmd_uninstall_test.go
  • cmd/agentop/setup_e2e_test.go
  • scripts/install.sh
  • scripts/install_test.sh
  • scripts/readme-demo/demo.yaml
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@esnible esnible left a comment

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 found nothing blocking. I checked these behaviours in the code:

  • Hidden header: CORTEX_INSTALLER_DREW hides 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 warn can fire between the 100% frame and bar_verified, so a terminal never loses both the sha256 ✓ line and setup's ✓ downloaded row.
  • 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) {

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.

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.

Comment thread scripts/install.sh
# 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

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.

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.

@huang195
huang195 merged commit d1ca610 into rossoctl:main Oct 5, 2026
28 checks passed
@huang195
huang195 deleted the feat/installer-bar-and-logo branch October 5, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants