fix: cover tui in the CLI inventory and drop the em-dashes it printed

The inventory test predates the `tui` command, so a rename or an
accidental removal would have gone unnoticed: it now asserts the command,
its `-l`/`--list` flag and its optional position operand.

The digest and search-result lines joined their halves with an em-dash,
which the repo's own convention rules out, so both now use the middle dot
the surrounding lines already use. The one em-dash left in `src/tui/` is
load-bearing: `search-service.ts` builds a session snippet with it, and
the pattern that strips the repeated label has to match it.

Also moves `buildSearchEntries`'s doc comment back onto
`buildSearchEntries`; it had ended up stacked above a helper.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-08-22 14:13:58 +02:00
parent a52abd9f96
commit 8b5fc974b0
6 changed files with 23 additions and 15 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
* API the web UI uses, so the two surfaces can never disagree. This module is
* the only place in `src/tui/` that does IO. It covers four jobs:
*
* 1. **Discovery + auth** — find the instance's server (`CODEMAN_API_URL`, else
* 1. **Discovery + auth**: find the instance's server (`CODEMAN_API_URL`, else
* loopback on `CODEMAN_PORT`), accepting the self-signed cert `--https`
* generates, and read credentials the way `codeman attach` already does
* (env, then the data dir's `.env`).
@@ -15,7 +15,7 @@
* 3. **Live updates** over SSE, decoded by `tui-sse.ts`, with a staleness
* watchdog and capped backoff. The TUI does not patch rows from payloads: an
* interesting event means "resync", and the app layer debounces the refetch.
* 4. **Degraded mode** — when nothing answers, sessions are enumerated straight
* 4. **Degraded mode**: when nothing answers, sessions are enumerated straight
* from tmux plus a read-only peek at `state.json`, which keeps the "the
* server died, get me to my sessions" path that `sc` has today.
*