3599b4eb ยท zzmq.dev@gmail.com/zz
Commit
3599b4eb2ef0144de31e099368f4193712b0c80f
zz top: repo discovery (remote /api/me/repos, local process registry) and an Explore tab Implements Phases 4-5 of the repo-tracking plan. zz top previously only ever showed exactly the repos passed via --repos/~/.zz/config.json -- empty config meant an empty dashboard forever, with no way out short of hand-editing a JSON file. Closes that for both axes: - Remote, not logged in: zero config needed (fixed a real bug along the way -- resolveCliBackendMode always called resolveIdentity(), which throws via requireCredentials() with no login; `top` now passes requireIdentity: false and falls back to an anonymous identity instead of crashing). Explore (search) is reachable as an ordinary tab and works anonymously; apiFetch grew an allowAnonymous flag for this one case, every other caller's "not logged in" error is unchanged. - Remote, logged in: starts from GET /api/me/repos (already existed). Added the JSON POST /api/repos/:owner/:repo/track|untrack siblings to the existing HTML-redirect-only route, for Explore's own track action. - Local, no config: unions a new file-based process registry (~/.zz/running/<pid>.json, written by work.ts/review.ts in local mode, stale entries dropped by a process.kill(pid, 0) liveness check) with the current directory, if it's an onboarded GitHub- backed repo (isLocallyOnboarded/inferGitHubSlugFromDir, matching ladder-build.ts's own definition of "onboarded" exactly). Nothing to show prints the real onboarding command and exits cleanly instead of ever rendering an empty TUI with no obvious next step. Explore (tui/Explore.tsx) is one component, two interaction models: remote is a hand-rolled search box (no ink-text-input dependency, matching TabView's existing style) against /api/explore/search; local is a filesystem browser starting at cwd. Free-text typing needed an explicit edit-mode toggle ("/" to start, Enter/Escape to stop) to avoid colliding with TabView's own single-character hotkeys (h/l/q/y/ digits) -- TabView grew one new `inputPaused` prop for exactly that window, defaulting to false so WorkApp's existing usage is unaffected. Also added `zz logout` (clears ~/.zz/credentials.json) -- needed to actually test the not-logged-in path above, and generally useful for switching accounts. Verified live: zz top --local from a plain directory prints guidance and exits 0; from a synthetic onboarded repo it renders normally; zz top (remote) with no login/config renders an empty dashboard instead of crashing; the same with a real login starts from /api/me/repos; the new track/untrack JSON routes and anonymous explore search both confirmed directly against the deployed Worker.
Troy Howard <thoward37@gmail.com> -- 2026-10-13T09:23:20.000Z