Skip to content

air: Fit air list Experiment and User columns to the terminal width - #7583

Merged
dimk0 merged 12 commits into
mainfrom
air-list-fit-width
Nov 14, 2026
Merged

dimk0 merged 12 commits into
mainfrom
air-list-fit-width

Conversation

@dimk0

@dimk0 dimk0 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Changes

In the interactive air list table, the Experiment and User columns now shrink to fit the terminal width instead of pushing the columns to their right past the window edge.

  • The list tracks the terminal width from WindowSizeMsg and lays the columns out against it, on resize and when a lazily loaded page arrives.
  • When the table is wider than the terminal, Experiment and User give up cells, widest first, down to floors of 12 and 8 cells.
  • A shortened Experiment keeps its end behind a leading …, the rule air: Shorten MLflow run names and IDs the same way in air list #7582 uses for the MLflow column, because experiment names often share a prefix. A shortened User keeps its start, since emails differ there.
  • The one-shot table (piped output, NO_COLOR, --limit) is unchanged, including which end of a long Experiment it keeps.

This PR builds on #7582 (merged), which provides truncateStart and the display-width truncate.

Known gaps:

  • The other columns have fixed widths, so the table only fits from about 136 columns up (measured on real runs; it depends on the statuses and durations shown). In narrower terminals it is narrower than before but the rightmost columns are still cut off. Fitting those widths means shrinking or hiding fixed columns, which this PR doesn't do. Tracked internally as CNXT-2619.
  • The full experiment name is meant to be read in the info pane (i), which shows N/A for many runs today. air: Show the experiment, accelerators and config in the air list info pane #7587 fixes that.

Why

Every column was sized from its content, with Experiment and User capped at 36 cells, and nothing looked at the terminal width. With long experiment names the table was about 180 cells wide, so the columns to the right of Experiment were unreadable in most terminals. Internal ticket: CNXT-2610.

In a 133-column terminal against real runs, cutting 14 distinct experiment names to 12 cells at their end left 7 distinct labels; keeping the end leaves all 14 distinct.

Tests

  • Unit tests for the width allocation at 80, 120, 134, 160 and 200 columns, for relayout on resize and on a lazily loaded page, for which end each column keeps, and for the unchanged one-shot table.
  • go test ./cmd/air, ./task lint-q.

Manual test

air list --all-status --all-users against a staging workspace in a 133-column terminal: Experiment shrank to 12 cells and User to 8. All 20 Experiment cells kept their end behind a leading …, and all 20 User cells kept their start. The table was 136 cells wide, so the Accelerators header lost its last 3 characters.

The list model with fixture rows, long Experiment and User values:

160 columns, w/o fix (cut at the window edge):

   Run ID           Experiment                            Status     Started              Duration    Progress  MLflow                  User
▸  684127395104822  /Users/someone.longname@example.com…  ● SUCCESS  2026-10-23T17:32:39    1h 14m           -  qwen-run-001            someone.with.a.long.name.for

160 columns, w/ fix:

   Run ID           Experiment               Status     Started              Duration    Progress  MLflow                  User                     Accelerators
▸  684127395104822  …art/qwen-finetune-lora  ● SUCCESS  2026-10-23T17:32:39    1h 14m           -  qwen-run-001            someone.with.a.long.na…  8x H100

120 columns, w/ fix (Accelerators still cut off):

   Run ID           Experiment    Status     Started              Duration    Progress  MLflow                  User
▸  684127395104822  …netune-lora  ● SUCCESS  2026-10-23T17:32:39    1h 14m           -  qwen-run-001            someone…

This pull request and its description were written by Isaac.

dimk0 and others added 3 commits November 12, 2026 23:43
The MLflow column of `air list` cut a long run name to its first
characters, but showed the last characters of the run ID when the run
had no name. Rows with long names sharing a prefix looked identical.

The column now shows the run's name, or its ID when the name is unknown,
and shortens either one the same way: a label that doesn't fit keeps its
end behind a leading "…".

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The interactive list sized every column from its content, capped at 36
cells, and never looked at the terminal width. Long Experiment and User
values pushed the columns to their right past the window edge.

The list now tracks the width from WindowSizeMsg and shrinks Experiment
and User, widest first, down to floors of 12 and 8 cells. The one-shot
table (piped, NO_COLOR, --limit) is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 12, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: e004948

Run: 43396795477

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 15 7:10
💚​ aws-windows-latest-4core-16gb 1 272 13 6:07
💚​ azure linux-2core-8gb 1 269 15 7:28
💚​ azure-windows-latest-4core-16gb 1 271 13 5:07
💚​ gcp linux-2core-8gb 1 270 15 7:35
🔄​ gcp-windows-latest-4core-16gb 1 272 13 6:04
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
🔄​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:54 gcp linux-2core-8gb TestAccept
3:45 aws-windows-latest-4core-16gb TestAccept
3:30 azure-windows-latest-4core-16gb TestAccept
3:20 azure linux-2core-8gb TestAccept
3:20 aws linux-2core-8gb TestAccept
2:52 gcp-windows-latest-4core-16gb TestAccept

dimk0 and others added 6 commits November 13, 2026 07:00
Covers the list row's width budget when a retry note follows a shortened
label, and the whole run ID in the info pane. Also corrects the label's
doc comment and widens the changelog entry to cover run IDs.

Co-authored-by: Isaac <no-reply@databricks.com>
truncate measured display width but cut by character count, so a cell
with wide (for example CJK) text overflowed its column. It now cuts by
display width. truncateStart is the keep-the-end variant, and the MLflow
label uses it instead of its own loop.

Co-authored-by: Isaac <no-reply@databricks.com>
Experiment names often share a prefix and differ at the end, so a cell
shrunk to fit the terminal showed the same text for different
experiments. The interactive list now keeps the end of the name behind
a leading "…", the same rule the MLflow column uses. User still keeps
its start, and the one-shot table is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@dimk0
dimk0 changed the base branch from main to cnxt-2611-mlflow-label November 13, 2026 08:16
Co-authored-by: Isaac <no-reply@databricks.com>
@dimk0
dimk0 marked this pull request as ready for review November 13, 2026 08:18
@dimk0
dimk0 requested review from a team as code owners November 13, 2026 08:18
@dimk0
dimk0 requested a review from janniklasrose November 13, 2026 08:18
Base automatically changed from cnxt-2611-mlflow-label to main November 13, 2026 08:24
@dimk0
dimk0 added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 8bc778f Nov 14, 2026
28 checks passed
@dimk0
dimk0 deleted the air-list-fit-width branch November 14, 2026 00:18
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: 8bc778f

Run: 43533401335

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 12 1623 1316 211:58
💚​ azure linux-2core-8gb 12 1603 1324 183:31
🔄​ gcp linux-2core-8gb 4 12 1606 1322 219:38
16 interesting tests: 12 RECOVERED, 4 flaky
Test Name aws linux-2core-8gb azure linux-2core-8gb gcp linux-2core-8gb
💚​ TestAccept 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS= ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true ✅​p ✅​p 🔄​f
💚​ TestAccept/bundle/resources/apps/lifecycle-started 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-omitted 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS= 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started/DMS= 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started/DMS=true 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/postgres_endpoints/update_pg_settings ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/postgres_endpoints/update_pg_settings/DMS=true ✅​p ✅​p 🔄​f
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS= 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS=true 💚​R 💚​R 💚​R
Top 50 slowest tests (at least 2 minutes):
duration env testname
11:35 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:26 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:15 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
9:08 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:45 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:34 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:26 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:02 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
8:00 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:35 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:27 gcp linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
7:26 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:13 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:04 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
7:03 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:01 azure linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=
6:58 aws linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/simple/DMS=true
6:48 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:40 gcp linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
6:26 gcp linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
6:17 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:53 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
5:43 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:37 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:32 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:28 gcp linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
5:27 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:06 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
5:06 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:05 gcp linux-2core-8gb TestAccept/pipelines/run/refresh-flags
5:04 azure linux-2core-8gb TestAccept/pipelines/run/refresh-flags
4:49 aws linux-2core-8gb TestAccept/pipelines/run/refresh-flags
4:47 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
4:14 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
4:11 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
3:54 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
3:54 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
3:45 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=
3:43 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
3:42 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
3:39 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=
3:37 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
3:37 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/data_security_mode/DMS=true
3:35 aws linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/data_security_mode/DMS=
3:32 azure linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=
3:30 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=
3:28 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
3:27 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
3:25 gcp linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
3:20 gcp linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants