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:
@@ -374,6 +374,11 @@ func (m Model) updateLogs(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// popup centres a dialog of at most preferredWidth (clamped to width-6) and
|
||||
// truncates every line to that width so a modal cannot break the layout. Below
|
||||
// roughly 20 columns the boxed dialog no longer fits, so popup falls back to the
|
||||
// bare truncated lines without chrome; the TUI is designed for terminals at
|
||||
// least 20 columns wide.
|
||||
func popup(width, height, preferredWidth int, lines []string) string {
|
||||
inner := min(preferredWidth, max(1, width-6))
|
||||
for i := range lines {
|
||||
|
||||
Reference in New Issue
Block a user