First run: friendly empty lists, actionable unreachable server, clearer installer
- CLI: empty list/runs/drafts/skills say so on stderr with the next command (stdout and --json unchanged); empty stats skip the zero table; connection shows ntfy not configured. - CLI: a refused or unresolvable server says where it dialled and how to start it (pipelines start/doctor, or pipelines serve), redacting the URL. - skills list/show/import dial the saved client.json address like every other server command instead of always 127.0.0.1:8080. - Status: an unreachable server says how to start it; unconfigured ntfy reads as optional phone notifications rather than a Docker misconfiguration. - Installer: missing tools name where to get them; Docker missing vs not running are told apart; the summary ends with numbered next steps (open the URL, sign in with the password just chosen, set up harnesses, start a chat or example pipeline). - README: prerequisites, password and a short First steps; install docs updated (password rule was stale). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -189,8 +189,40 @@ class SetupNativeTests(unittest.TestCase):
|
||||
self.assertIn("curl", message)
|
||||
self.assertIn("node", message)
|
||||
self.assertIn("never installs tools", message)
|
||||
self.assertIn("https://nodejs.org/", message)
|
||||
self.assertNotIn("https://go.dev/dl/", message)
|
||||
self.assertEqual(recorder.calls, [])
|
||||
|
||||
def test_docker_failure_says_whether_to_install_or_start_it(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
installer = self.installer(directory, Recorder())
|
||||
for docker, expected in ((None, "not found on PATH"), ("/usr/bin/docker", "installed but not running")):
|
||||
with self.subTest(docker=docker), \
|
||||
patch.object(setup_native.app_build, "docker_available", return_value=False), \
|
||||
patch.object(setup_native.shutil, "which", return_value=docker):
|
||||
with self.assertRaisesRegex(ValueError, expected):
|
||||
installer.build_app_web()
|
||||
|
||||
def test_summary_names_the_address_password_and_harness_next_steps(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
installer = self.installer(directory, Recorder())
|
||||
prefix = Path(directory) / "prefix"
|
||||
manifest = {"web": {"port": 8082, "host": "tailnet"}, "opencode_env": {}}
|
||||
for chosen, password in ((True, "the web password you just chose"), (False, "your existing web password")):
|
||||
with self.subTest(chosen=chosen):
|
||||
if chosen:
|
||||
installer.chosen_web_password = "chosen tulip orbit canyon"
|
||||
else:
|
||||
installer.__dict__.pop("chosen_web_password", None)
|
||||
with redirect_stdout(io.StringIO()) as output:
|
||||
installer.print_summary(prefix, manifest, "192.168.1.20", "opencode")
|
||||
text = output.getvalue()
|
||||
self.assertIn("http://localhost:8082/", text)
|
||||
self.assertIn("sign in with " + password, text)
|
||||
self.assertIn(f"{prefix / 'bin/pipelines'} harness setup claude|codex|opencode|pi", text)
|
||||
self.assertIn("Add the commands to your PATH", text)
|
||||
self.assertLess(text.index("http://localhost:8082/"), text.index("Next steps"))
|
||||
|
||||
def test_registration_uses_native_supervisor_on_both_platforms(self):
|
||||
for system in ("Darwin", "Linux"):
|
||||
with self.subTest(system=system), tempfile.TemporaryDirectory() as directory:
|
||||
|
||||
Reference in New Issue
Block a user