feat: non-blocking version check on CLI startup (Phase 1)#367
Merged
bradygaster merged 1 commit intobradygaster:mainfrom Mar 13, 2026
Merged
Conversation
Adds a background update check that runs when the interactive shell starts. On startup, Squad checks the npm registry for a newer version and displays a passive notification banner if one is available. Key design decisions: - Fire-and-forget: never blocks or delays shell startup - 24-hour cache: avoids repeated network calls - 3-second fetch timeout via AbortController - Opt-out via SQUAD_NO_UPDATE_CHECK=1 env var - Triple-wrapped error handling: silent on any failure New file: packages/squad-cli/src/cli/self-update.ts Modified: packages/squad-cli/src/cli-entry.ts (wired into no-args shell path) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher
pushed a commit
to tamirdresher/squad
that referenced
this pull request
Mar 16, 2026
* chore(squad): quality review findings — 7 issues filed Quality audit complete: 5 agents assessed CLI across testing, coverage, stability, accessibility, UX. Results: 4 P0 blockers (bradygaster#365–bradygaster#368), 3 P1 items (bradygaster#369–bradygaster#371). Blocking: Waingro dead sessions, ErrorBoundary, dropped input; Marquez help text consistency. Changes: - Logged session summary to .squad/log/2026-02-24T0205-quality-review-complete.md - Updated .squad/identity/now.md with quality review findings and new issue numbers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): merge decision — Marquez UX audit findings Quality assessment merged from inbox (Grade B): 11 improvements (3 P0, 4 P1, 4 P2). help text, stub commands, vocabulary, separators, roster. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: update waingro history with hostile test coverage sprint Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: P0 quality fixes — ErrorBoundary, session eviction, input buffer, stub removal (closes bradygaster#365, closes bradygaster#366, closes bradygaster#367, closes bradygaster#371) - Add ErrorBoundary class component wrapping App in Ink render call (bradygaster#365) Shows friendly message on crash, logs error to stderr - Dead session eviction in dispatchToAgent/dispatchToCoordinator (bradygaster#366) Deletes dead session from Map on error so next attempt creates fresh one - Input buffering while disabled in InputPrompt (bradygaster#367) Buffers keystrokes via useRef, restores on re-enable, no auto-submit - Remove stub commands: loop, hire; wire triage/watch to real runWatch (bradygaster#371) Remove stub help text entries for loop and hire - 10 new tests across repl-ux and cli-shell-comprehensive Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher
pushed a commit
to tamirdresher/squad
that referenced
this pull request
Mar 16, 2026
* chore(squad): quality review findings — 7 issues filed Quality audit complete: 5 agents assessed CLI across testing, coverage, stability, accessibility, UX. Results: 4 P0 blockers (bradygaster#365–bradygaster#368), 3 P1 items (bradygaster#369–bradygaster#371). Blocking: Waingro dead sessions, ErrorBoundary, dropped input; Marquez help text consistency. Changes: - Logged session summary to .squad/log/2026-02-24T0205-quality-review-complete.md - Updated .squad/identity/now.md with quality review findings and new issue numbers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(squad): merge decision — Marquez UX audit findings Quality assessment merged from inbox (Grade B): 11 improvements (3 P0, 4 P1, 4 P2). help text, stub commands, vocabulary, separators, roster. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: P0 quality fixes — ErrorBoundary, session eviction, input buffer, stub removal (closes bradygaster#365, closes bradygaster#366, closes bradygaster#367, closes bradygaster#371) - Add ErrorBoundary class component wrapping App in Ink render call (bradygaster#365) Shows friendly message on crash, logs error to stderr - Dead session eviction in dispatchToAgent/dispatchToCoordinator (bradygaster#366) Deletes dead session from Map on error so next attempt creates fresh one - Input buffering while disabled in InputPrompt (bradygaster#367) Buffers keystrokes via useRef, restores on re-enable, no auto-submit - Remove stub commands: loop, hire; wire triage/watch to real runWatch (bradygaster#371) Remove stub help text entries for loop and hire - 10 new tests across repl-ux and cli-shell-comprehensive Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds a background update check that runs when the interactive shell starts. If a newer version of Squad is available on npm, a passive notification banner is displayed.
Changes
packages/squad-cli/src/cli/self-update.ts— self-contained update check modulepackages/squad-cli/src/cli-entry.ts— wired fire-and-forget check into no-args shell startup pathDesign
%APPDATA%,~/.config,~/Library/Application Support)SQUAD_NO_UPDATE_CHECK=1environment variable⚡ Squad vX.Y.Z available (you have vA.B.C). Run: npm i -g @bradygaster/squad-cliRoadmap: Phase 1 of 3
Phase 1 — Background check + notify ✅ (this PR)
Passive, non-blocking startup notification. No mutations, no prompts. The safest possible foundation.
Phase 2 — Explicit
squad self-updatecommandAdds a user-invoked CLI command that updates the installed Squad CLI package itself, separate from the existing
squad upgrade(which upgrades project files/templates).Command surface:
squad self-update— update CLI to latest stablesquad self-update --check— check only, don't installsquad self-update --channel insider— update from a specific channelsquad upgrade --self— compatibility aliasKey design decisions:
.squad/orsquad.config.tsnpm install -g @bradygaster/squad-cli@<previous-version>)Security:
Implementation approach:
upgrade.tspluggable architecture (setVersionFetcher(), addsetUpgradeInstaller())latest,preview,insidernpm install -g @bradygaster/squad-cli@<exact-version>as child processPrerequisites: Phase 1 plumbing (this PR), package-name consistency cleanup, global settings system.
Phase 3 — Optional auto-apply (user opt-in)
If the user or enterprise explicitly opts in, Squad can check for a new CLI version on startup and automatically apply it in supported environments.
Key design decisions:
Security (strict requirements):
Global settings schema:
{ "selfUpdate": { "enabled": true, "mode": "notify | auto | prompt", "channel": "stable", "ttlHours": 24, "pinnedVersion": null, "registry": null } }Fallback behavior:
Prerequisites: Phase 2 fully shipped, global settings/policy system, install-context detection, integrity + provenance verification, enterprise policy support, package identity cleanup.
No issue — this was identified through team analysis (Flight, EECOM, Network, RETRO) as a high-value minimal addition.
cc @bradygaster for review