From 5e5de4ea1aa98f75d470e4a61644d4b9f100c4b0 Mon Sep 17 00:00:00 2001 From: Clawd Date: Tue, 17 Feb 2026 07:51:44 -0800 Subject: Update TODO #2: simplify local state, remove v1 cruft --- TODO.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 2c6a6be..c92175c 100644 --- a/TODO.md +++ b/TODO.md @@ -54,16 +54,20 @@ This allows custom routes (NIP-05, LNURL, rewrites, etc.) while still letting sh ### ship host init doesn't create local state.json **Problem:** After `ship host init`, the local `~/.config/ship/state.json` isn't created with the base_domain. Deploys fail with "HOST_NOT_CONFIGURED". -**Workaround:** Manually create `~/.config/ship/state.json`: +**Design:** v2 uses remote state (`/etc/ship/ports/` on server) for port allocation and app tracking. Local state only needs: +- `default_host` — which host to use when `--host` isn't specified +- `base_domain` — for generating URLs + +**Fix:** `ship host init` should create minimal local state: ```json { "default_host": "alaskav6", "hosts": { "alaskav6": { - "next_port": 8001, - "base_domain": "northwest.io", - "apps": {} + "base_domain": "northwest.io" } } } ``` + +**Also:** Clean up `internal/state/state.go` — remove `next_port`, `apps`, `AllocatePort()`, and other v1 cruft. Keep it minimal. -- cgit v1.2.3