Skip to content

fix(cli): gateway startup no longer waits for claw animation - #105774

Merged
steipete merged 2 commits into
mainfrom
codex/nonblocking-gateway-banner
Jul 13, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/nonblocking-gateway-banner

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #105748

What Problem This Solves

Fixes an issue where users starting the Gateway in a foreground terminal would wait for the decorative claw animation before gateway module loading began, adding roughly 1.3–2.1 seconds to startup.

Why This Change Was Made

Gateway module loading now starts in parallel with the existing animation. If loading wins, the banner immediately settles on its exact static frame and restores terminal state before logs continue; if the animation wins, the existing module-loading spinner owns the remaining wait. Wizard animation behavior and non-interactive output remain unchanged.

Startup trace emission is separated from import completion so both the banner and spinner clean up before trace logs write to the terminal.

User Impact

Foreground Gateway startup no longer waits for decorative terminal art. Users still see the full animation when startup work is slower, while fast startup proceeds as soon as modules are ready.

Evidence

  • Testbox focused regression suite: 110 tests passed across src/cli/claw-banner.test.ts, src/cli/gateway-cli/run.option-collisions.test.ts, and src/commands/onboard-helpers.test.ts.
  • Latest-main Testbox changed gate passed: tbx_01kxccgaex7eewq4hnf1xs7e4n (run 29214490590).
  • Production pnpm build passed in Testbox tbx_01kxcc0kyp7657vwc53xahh9r6.
  • Real 120-column PTY launch against built output: readiness 3.854 s, server import 1.3 ms, 2 animation frames (initial + settled static), cursor restored before startup trace output.
  • Behavior contract: all fast-work, slow-work, static/non-TTY, terminal cleanup, and error-propagation clauses passed.
  • Fresh autoreview --mode local: clean; no accepted/actionable findings.

Exact-head GitHub CI remains the final merge gate.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Jul 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 091ddf1995

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md Resolved
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 12, 2026, 8:18 PM ET / July 13, 2026, 00:18 UTC.

Summary
Runs Gateway module loading concurrently with the interactive claw banner, settles the banner when loading finishes first, defers startup-trace emission until terminal cleanup, and adds focused banner regression coverage.

PR surface: Source +82, Tests +35. Total +117 across 3 files.

Reproducibility: yes. from source and supplied live proof: in an eligible rich TTY, the pre-fix command awaited the decorative banner before Gateway loading, while the PR reports a built-output PTY run showing loading and animation overlap. This review did not independently execute the path.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #105748
Summary: This PR is the linked candidate fix for the foreground Gateway startup-delay issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] A fresh full-source comparison against current main was not possible, so sibling banner users, complete error-ordering behavior, and the exact three-way merge result remain unverified in this review.
  • [P1] The branch is behind current main; mergeability is reported clean, but the review should be refreshed against the latest base before landing.
  • [P1] Several exact-head test shards were still in progress in the supplied check snapshot.

Maintainer options:

  1. Decide the mitigation before merge
    Refresh the branch review against current main, inspect every printClawBanner caller and the complete startup measurement/error path, then land the concurrent-loading design if exact-head checks remain green and the PTY proof still shows cleanup before logs.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] A maintainer should perform the blocked full-source/current-main review and wait for exact-head checks; no concrete automated repair defect is established.

Maintainer decision needed

  • Question: After a fresh full-source review against current main, should this protected CLI fix land with the concurrent banner-settlement design?
  • Rationale: The maintainer label requires explicit handling, and this review could not complete the repository-wide source and history checks needed to independently confirm the final merge verdict.
  • Likely owner: steipete — The available commit history connects this person to both the introduced banner behavior and the proposed repair, making them the best available routing candidate despite incomplete broader history inspection.
  • Options:
    • Refresh and land (recommended): Rebase or refresh the review, verify all banner callers and exact-head checks, then merge if no regression appears.
    • Pause for redesign: Keep the PR open if the startup-trace or banner ownership model should be simplified before landing.

Security
Cleared: The supplied three-file CLI diff adds no dependency, workflow, secret, permission, package-resolution, or downloaded-code surface, and no concrete security regression is evident.

Review details

Best possible solution:

Refresh the branch review against current main, inspect every printClawBanner caller and the complete startup measurement/error path, then land the concurrent-loading design if exact-head checks remain green and the PTY proof still shows cleanup before logs.

Do we have a high-confidence way to reproduce the issue?

Yes from source and supplied live proof: in an eligible rich TTY, the pre-fix command awaited the decorative banner before Gateway loading, while the PR reports a built-output PTY run showing loading and animation overlap. This review did not independently execute the path.

Is this the best way to solve the issue?

Likely yes: starting useful work immediately and settling only the decorative foreground animation is narrower than removing the banner or changing non-interactive and wizard behavior. A final verdict needs complete caller and error-path inspection against current main.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 37807242c998.

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded foreground CLI startup regression that adds roughly one to two seconds but does not prevent Gateway operation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR provides after-fix built-output PTY measurements and observable terminal-state ordering, supported by a successful Real behavior proof check; private terminal details should remain redacted in any additional artifacts.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides after-fix built-output PTY measurements and observable terminal-state ordering, supported by a successful Real behavior proof check; private terminal details should remain redacted in any additional artifacts.
Evidence reviewed

PR surface:

Source +82, Tests +35. Total +117 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 114 32 +82
Tests 1 35 0 +35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 149 32 +117

What I checked:

  • Linked regression: The PR closes Gateway startup waits for claw banner animation #105748, which provides a source-level reproduction: foreground rich-TTY startup awaited printClawBanner before Gateway initialization, adding approximately 1.26–2.07 seconds. (src/cli/gateway-cli/run.ts, 24a4f0bbbf85)
  • Proposed behavior: The supplied diff starts measured Gateway loading before awaiting the banner and gives the banner a settlement signal so useful startup work can end decorative animation early. (src/cli/gateway-cli/run.ts:131, 091ddf1995b6)
  • Focused regression coverage: The added test verifies that early settlement redraws the exact static frame, restores the cursor, emits the trailing newline, and removes the SIGINT listener. (src/cli/claw-banner.test.ts:90, 091ddf1995b6)
  • Real behavior proof: The PR body reports a built-output 120-column PTY launch with 3.854-second readiness, a 1.3 ms server import, two banner frames, and cursor restoration before startup trace output; the GitHub context also records a successful Real behavior proof check. (7aa7bac250f5)
  • Validation state: The provided exact-head checks show build, lint, production types, test types, security-fast, QA smoke, and most test shards successful, with several shards still in progress at review time. (7aa7bac250f5)
  • Prior review follow-up: The earlier changelog-policy finding appears resolved by the second commit, whose message records release notes in PR metadata; the supplied current file list contains no CHANGELOG.md change. (CHANGELOG.md, 7aa7bac250f5)

Likely related people:

  • steipete: The provided history ties the claw-banner behavior to commit 24a4f0b and the proposed repair to commits 091ddf1 and 7aa7bac; deeper ownership sampling was blocked by the repository-read failure. (role: feature introducer and recent CLI contributor; confidence: medium; commits: 24a4f0bbbf85, 091ddf1995b6, 7aa7bac250f5; files: src/cli/claw-banner.ts, src/cli/gateway-cli/run.ts, src/cli/claw-banner.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-13T00:14:01.934Z sha 7aa7bac :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof

Maintainer review completed on exact head 7aa7bac250f5aa57c5e9b80e19aded5fd2d949a0; no accepted/actionable autoreview findings remain.

Validation:

  • Focused tests: pnpm test src/cli/claw-banner.test.ts src/cli/gateway-cli/run.option-collisions.test.ts src/commands/onboard-helpers.test.ts — 110 tests passed on Testbox.
  • Changed gate: pnpm check:changed — passed on Testbox tbx_01kxccgaex7eewq4hnf1xs7e4n (run).
  • Production build: pnpm build — passed on Testbox tbx_01kxcc0kyp7657vwc53xahh9r6.
  • Exact-head hosted CI: all required jobs passed (run).
  • Repo-native prepare gate: OPENCLAW_TESTBOX=1 scripts/pr prepare-run 105774 — passed; prepared and PR heads both 7aa7bac250f5aa57c5e9b80e19aded5fd2d949a0.
  • Built CLI PTY proof: 120-column rich TTY reached ready in 3854 ms; Gateway module import measured 1.3 ms; the banner emitted two frames (initial plus settled static); cursor restoration completed before startup trace output.
  • Rejection/cleanup ordering: maintainer code-path review and deterministic banner-settlement coverage confirm banner cleanup precedes import result/error observation; trace emission is deferred until banner/spinner cleanup.

Known proof gaps: none for this three-file CLI timing change.

@steipete
steipete merged commit 55067fd into main Jul 13, 2026
139 of 145 checks passed
@steipete
steipete deleted the codex/nonblocking-gateway-banner branch July 13, 2026 00:20
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 13, 2026
…w#105774)

* fix(cli): avoid gateway delay from claw animation

* chore: keep release notes in PR metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gateway startup waits for claw banner animation

1 participant