From 695e31f63898b46449f7c8471df0acf34eaa3c04 Mon Sep 17 00:00:00 2001 From: Caroline Chen <324939130+caroline-db@users.noreply.github.com> Date: Fri, 30 Oct 2026 19:57:42 +0000 Subject: [PATCH 1/3] air: clarify empty active run listings --- cmd/air/list.go | 2 +- cmd/air/list_tui.go | 15 +++++++++++++-- cmd/air/list_tui_test.go | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/cmd/air/list.go b/cmd/air/list.go index 4b5c623eccc..b80c644d17e 100644 --- a/cmd/air/list.go +++ b/cmd/air/list.go @@ -173,7 +173,7 @@ Filters: warnIfTruncated(ctx, fetcher) return renderEnvelope(ctx, listData{Rows: rows}) } - return renderListText(cmd, fetcher, limit) + return renderListText(cmd, fetcher, limit, !allStatus) } return cmd diff --git a/cmd/air/list_tui.go b/cmd/air/list_tui.go index 636836a84a0..e3f7e2f335a 100644 --- a/cmd/air/list_tui.go +++ b/cmd/air/list_tui.go @@ -17,7 +17,7 @@ import ( // renderListText renders the table for text output: an inline navigable table in // a terminal (paging in older runs on demand), otherwise printed once. JSON is // handled by the caller. -func renderListText(cmd *cobra.Command, f *runFetcher, limit int) error { +func renderListText(cmd *cobra.Command, f *runFetcher, limit int, activeOnly bool) error { ctx := cmd.Context() out := cmd.OutOrStdout() @@ -36,7 +36,7 @@ func renderListText(cmd *cobra.Command, f *runFetcher, limit int) error { return err } if len(first) == 0 { - _, err := io.WriteString(out, "No runs found.\n") + _, err := io.WriteString(out, emptyListMessage(activeOnly)) return err } _, err = tea.NewProgram( @@ -53,10 +53,21 @@ func renderListText(cmd *cobra.Command, f *runFetcher, limit int) error { return err } warnIfTruncated(ctx, f) + if len(rows) == 0 { + _, err = io.WriteString(out, emptyListMessage(activeOnly)) + return err + } _, err = io.WriteString(out, staticListTable(r, rows, color)) return err } +func emptyListMessage(activeOnly bool) string { + if activeOnly { + return "No active runs found.\n" + } + return "No runs found.\n" +} + // staticListTable renders the whole table once, with no selection — used when // piped or non-interactive. func staticListTable(r *lipgloss.Renderer, rows []listRow, links bool) string { diff --git a/cmd/air/list_tui_test.go b/cmd/air/list_tui_test.go index 50dfa7706f1..5a7d6b4ea61 100644 --- a/cmd/air/list_tui_test.go +++ b/cmd/air/list_tui_test.go @@ -183,6 +183,11 @@ func TestStaticListTable(t *testing.T) { assert.Equal(t, "No runs found.\n", staticListTable(r, nil, false)) } +func TestEmptyListMessage(t *testing.T) { + assert.Equal(t, "No active runs found.\n", emptyListMessage(true)) + assert.Equal(t, "No runs found.\n", emptyListMessage(false)) +} + func TestStatusColor(t *testing.T) { assert.Equal(t, colGreen, statusColor("SUCCESS")) assert.Equal(t, colAmber, statusColor("RUNNING")) From 2864f6f8993b259d9ab11a98d03410f675f1a963 Mon Sep 17 00:00:00 2001 From: Caroline Chen <324939130+caroline-db@users.noreply.github.com> Date: Fri, 30 Oct 2026 20:00:30 +0000 Subject: [PATCH 2/3] air: add changelog entry --- .nextchanges/air/active-runs-empty-message.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nextchanges/air/active-runs-empty-message.md diff --git a/.nextchanges/air/active-runs-empty-message.md b/.nextchanges/air/active-runs-empty-message.md new file mode 100644 index 00000000000..71e55247c87 --- /dev/null +++ b/.nextchanges/air/active-runs-empty-message.md @@ -0,0 +1 @@ +* `air list` now reports `No active runs found.` for an empty active-only result. ([#7276](https://github.com/databricks/cli/pull/7276)) From 526c8df7e3beba500be8ee616e4b5083ba4191e2 Mon Sep 17 00:00:00 2001 From: Caroline Chen <324939130+caroline-db@users.noreply.github.com> Date: Fri, 30 Oct 2026 20:56:45 +0000 Subject: [PATCH 3/3] air: suggest listing non-active runs --- cmd/air/list_tui.go | 2 +- cmd/air/list_tui_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/air/list_tui.go b/cmd/air/list_tui.go index e3f7e2f335a..10ce1ca76dc 100644 --- a/cmd/air/list_tui.go +++ b/cmd/air/list_tui.go @@ -63,7 +63,7 @@ func renderListText(cmd *cobra.Command, f *runFetcher, limit int, activeOnly boo func emptyListMessage(activeOnly bool) string { if activeOnly { - return "No active runs found.\n" + return "No active runs found. Use --all-status to include runs that are no longer active.\n" } return "No runs found.\n" } diff --git a/cmd/air/list_tui_test.go b/cmd/air/list_tui_test.go index 5a7d6b4ea61..583cc570c07 100644 --- a/cmd/air/list_tui_test.go +++ b/cmd/air/list_tui_test.go @@ -184,7 +184,7 @@ func TestStaticListTable(t *testing.T) { } func TestEmptyListMessage(t *testing.T) { - assert.Equal(t, "No active runs found.\n", emptyListMessage(true)) + assert.Equal(t, "No active runs found. Use --all-status to include runs that are no longer active.\n", emptyListMessage(true)) assert.Equal(t, "No runs found.\n", emptyListMessage(false)) }