fix(t3): defer browser setup when the CLI lacks the command

Merged
SH
18d ago
+28-1

Summary

  • setup-browser.sh checks t3 --help for a browser subcommand. If it is missing, the script defers to the connect timer, the same way it does when the CLI is not installed yet.
  • A new spec case covers a CLI without the browser command.

Why

Since #3055, E2E (Ubuntu) and both Docker builds have failed on main at the setupT3Browser activation:

ERROR
  Unexpected positional argument: "setup"
make: *** [Makefile:780: nix-switch] Error 1

package.json pins t3: ^0.0.44, which resolves to npm latest (0.0.45). That release has no browser subcommand, so it reads browser as the cwd argument and rejects setup. Hosts on the nightly runtime (matic: 0.0.46-nightly) list browser and keep running setup.

Since e2e-check and docker-check are required, every open PR is blocked, including #3067-#3070.

decided: probe the help output rather than pin a nightly in package.json - the npm channel is a separate choice, and the connect timer already re-runs setup after t3 update

Test plan

  • shellspec spec/t3_browser_setup_spec.sh (11 examples, 0 failures)
  • shellcheck on the changed script and spec
  • matic's real t3 --help matches the probe ( browser Manage T3's headless browser on this host.)

🤖 Generated with Claude Code


Summary by cubic

Defers t3 browser setup when the installed CLI lacks the browser subcommand, so fresh installs no longer fail on npm's latest release (0.0.45).

  • Probes t3 --help and exits early if the browser command is missing; the connect timer retries setup once t3 update moves to a runtime that has it.
  • Adds a spec case for a CLI without the browser command.

Bug Fixes

  • Adds the missing coverage entry for home-manager/services/cliproxyapi/scripts/backup-check.sh so the shell-test coverage check passes.