Rework omni search onto a typed search contract and add a TUI artifacts view

Protocol: replace the loose Query/Kind/Matches/Limit search fields with a Search request object and a SearchResults response, and have the server answer search from Store.Search over the shared run projections (runFrom/runStamps).

CLI: add the read-only 'pipelines search QUERY [--type KIND] [--limit N] [--json]' command with usage/help, and document the typed targets, ranking and bounds in docs/cli.md.

TUI: the '/' popup keeps type-to-search, up/down, Enter and Esc, renders one ranked list with kind badges and a bracketed (non-colour) match snippet, and Enter opens the matched pipeline, run, step, artifact or field; footer text updated to match.

TUI: add a dedicated run artifacts view ('A') with open/copy of recorded files, and move artifacts out of the run-detail File changes section (artifactCaptureNotes).

Tests: add Store.OpenReadOnly for read-only inspection of a live database plus pipeline/server/TUI search tests and artifacts tests, including env-gated live checks.
This commit is contained in:
2026-10-16 23:48:38 +01:00
parent fae1005962
commit 865993b200
24 changed files with 1761 additions and 68 deletions
+14 -11
View File
@@ -48,13 +48,15 @@ Search includes pipeline name, version, status, outcome, stage and diagnostic;
`#123` searches run-ID prefixes. Esc while searching clears the filter without
closing the list. The filter survives inspection/back and live list refreshes.
Home's `/` instead opens the omni popup, which searches pipelines, versions, runs,
stages/visits, artifact names, and the text of stage inputs, outputs and evidence.
A bare status word (`queued`, `running`, `succeeded`, `failed`, `canceled`,
`interrupted`) or a date (`today`, `yesterday`, `this week`, or `YYYY-MM-DD`
interpreted in UTC) selects runs, and a leading `pipeline:`/`version:`/`run:`/
`step:`/`field:`/`artifact:`/`match:` prefix narrows the result kind. Enter opens
the matched pipeline, run, stage visit, artifact or field; unrecognised words
remain text.
steps/visits, artifact names, and the text of stage inputs, outputs and evidence.
Each row carries a short type badge (`pipeline`, `run`, `step`, `artifact` or
`match`); a text match also shows a snippet with the matched part bracketed so it
is legible without colour. A bare status word (`queued`, `running`, `succeeded`,
`failed`, `canceled`, `interrupted`) or a date (`today`, `yesterday`, `this week`,
or `YYYY-MM-DD` in local time) selects runs. Enter opens the matched pipeline,
run, stage visit, artifact or field. The same query is available non-interactively
as `pipelines search QUERY [--type KIND] [--limit N] [--json]`; `--type` is the
only kind-narrowing mechanism.
Wide terminals
show runs and pipelines side by side, with stacked panels on narrow terminals.
Home run cards prioritize reported results, status, completed visits and duration;
@@ -214,7 +216,7 @@ Submitting activates included schedules, so review them before publishing.
| TUI action | Agent-capable CLI |
| --- | --- |
| Browse/search pipelines | `list --json`, `show NAME --json` |
| Browse/search pipelines | `list --json`, `show NAME --json`, `search QUERY --json` |
| Original source and history | `export NAME --version N`, `versions NAME --json` |
| Browse templates/source | `templates --json`, `template KEY --source` |
| Create or edit a definition | `new`, `edit`, `drafts` |
@@ -241,9 +243,10 @@ printf '%s' '{"type":"get_pipeline","pipeline_id":1,"version":1}' | pipelines rp
Existing protocol commands: `ping`, `list_pipelines`, `get_pipeline`,
`list_templates`, `validate`, `submit`, `run_pipeline`, `list_runs`, `get_run`,
`cancel_run`, `retry_run`, `decide_run`, `set_run_title`, `get_run_evidence`,
`get_status`, `search`. `search` takes `query` and an
optional `kind` and `limit` and returns ranked typed `matches`, each with a stable
`target` the client can open. `list_runs` also returns all-history `usage`
`get_status`, `search`. `search` takes a `search` request object (`query`, with an
optional `kind` and `limit`) and returns a `search_results` response whose ranked
`results` each carry a stable `target` the client can open plus the typed payload
and matched field. `list_runs` also returns all-history `usage`
aggregates. See `internal/protocol/message.go` for JSON envelopes. Mutating RPCs
have real effects; they are not previews. TUI-only animation, scrolling, and
transient client logs are presentation, not separate server capabilities.