Skip to content

Add TUI table overrides for high-traffic list commands - #4732

Merged
simonfaltum merged 8 commits into
simonfaltum/list-tui-paginatedfrom
simonfaltum/list-tui-overrides-2
Mar 23, 2026
Merged

Add TUI table overrides for high-traffic list commands#4732
simonfaltum merged 8 commits into
simonfaltum/list-tui-paginatedfrom
simonfaltum/list-tui-overrides-2

Conversation

@simonfaltum

@simonfaltumsimonfaltum commented Mar 13, 2026

Copy link
Copy Markdown
Member

Why

PR #4731 added curated TUI table overrides for 15 list commands. This follow-up covers 5 additional commands that are among the most frequently used in the CLI, but were missing curated columns.

Changes

Before: these 5 commands used either generic text templates (secrets, cluster-policies) or raw JSON output (lakeview, pipeline events) with no curated TUI table columns.

Now: all 5 register curated TableConfig overrides so they show useful columns in the interactive TUI. Commands that had no text template override (lakeview list, pipelines list-pipeline-events) also get template annotations for the non-interactive fallback.

This PR stacks on #4731. It only adds per-command overrides, no engine changes.

Post-review fixes

  • Sanitize control whitespace (\n, \r, \t) in pipeline event messages to prevent table row corruption
  • Increase MaxWidth for pipeline event Message column from 60 to 200 (pragmatic cap until non-destructive clipping is implemented)
  • Remove redundant PaginatedModel type alias, use FinalModel interface instead
  • Remove duplicate TestPaginatedErrAccessor test
  • Trim verbose MaxWidth truncation comment

Test plan

  • go build ./...
  • make checks passes
  • make lintfull passes (0 issues)
  • Manual smoke test: verify curated columns for secrets list-scopes, lakeview list, pipelines list-pipeline-events

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Commit: 3725d38

Run: 23413230086

Env🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
💚​aws linux892717978:49
💚​aws windows892737954:47
🔄​aws-ucws linux4793667128:16
💚​aws-ucws windows893717106:38
💚​azure linux2112747957:35
💚​azure windows2112767933:52
🔄​azure-ucws linux41113717089:39
🔄​azure-ucws windows31113747066:19
💚​gcp linux2112707989:46
💚​gcp windows2112727968:59
20 interesting tests: 9 SKIP, 6 RECOVERED, 5 flaky
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
🔄​TestAccept💚​R💚​R💚​R💚​R💚​R💚​R💚​R🔄​f💚​R💚​R
🙈​TestAccept/bundle/resources/permissions🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions💚​R💚​R💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions💚​R💚​R💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct💚​R💚​R💚​R💚​R
💚​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/resources/postgres_branches/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/update_protected🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/without_branch_id🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_projects/update_display_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/synced_database_tables/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🔄​TestAccept/ssh/connect-serverless-gpu🙈​s🙈​s🔄​f✅​p🙈​s🙈​s🔄​f🔄​f🙈​s🙈​s
🔄​TestAccept/ssh/connect-serverless-gpu/DATABRICKS_BUNDLE_ENGINE=direct🔄​f✅​p🔄​f🔄​f
🔄​TestAccept/ssh/connection💚​R💚​R🔄​f💚​R💚​R💚​R🔄​f💚​R💚​R💚​R
🔄​TestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p🔄​f✅​p✅​p✅​p🔄​f✅​p✅​p✅​p
Top 32 slowest tests (at least 2 minutes):
durationenvtestname
6:27gcp linuxTestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct
6:10gcp windowsTestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct
5:34gcp linuxTestSecretsPutSecretStringValue
5:28aws linuxTestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct
5:19aws linuxTestSecretsPutSecretStringValue
5:17gcp windowsTestSecretsPutSecretStringValue
4:30azure linuxTestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct
3:53azure-ucws linuxTestSecretsPutSecretStringValue
3:43azure linuxTestSecretsPutSecretStringValue
3:42gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:39gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:38gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:22aws windowsTestSecretsPutSecretStringValue
3:21aws-ucws windowsTestAccept/ssh/connection/DATABRICKS_BUNDLE_ENGINE=direct
3:14gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:46aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:45aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:40aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:38aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:35aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:34aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:34azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:14azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:09azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:09azure windowsTestSecretsPutSecretStringValue
2:08azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:07azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:06azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:04azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

@simonfaltum
simonfaltum marked this pull request as ready for review March 13, 2026 10:33

@shreyas-goenkashreyas-goenka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This review was posted by Claude (AI assistant). Shreyas will do a separate, more thorough review pass.

Priority: LOW — Clean mechanical PR

This is a straightforward PR that adds TUI table overrides for 5 commands. No bugs or correctness issues found.

Minor Nits

  • Unused listReq variables: Several overrides declare listReq (e.g., listReq := &catalog.ListCatalogsRequest{}) that is never used after flag binding. Consider using _ or removing if unneeded.
  • Consistency: The pattern matches the existing override style in the codebase, which is good.

What looks good

  • Clean, consistent pattern across all 5 overrides
  • Correct use of tableview.RegisterConfig for each command
  • Proper column selection for each resource type

No blocking issues.

@shreyas-goenkashreyas-goenka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stamping. I'm assuming the TUI UI is better.

Comment threadlibs/cmdio/render.go

// sanitizeControlWhitespace replaces newlines and tabs with spaces to prevent
// corrupting tab-delimited text output.
func sanitizeControlWhitespace(s string) string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is also defined in cmd/workspace/pipelines/overrides.go. Consolidate?

Base automatically changed from simonfaltum/list-tui-overrides to simonfaltum/list-tui-paginatedMarch 19, 2026 06:43
@simonfaltum
simonfaltum changed the base branch from simonfaltum/list-tui-paginated to mainMarch 19, 2026 06:45
@github-actions

Copy link
Copy Markdown
Contributor

Suggested reviewers

Based on git history of the changed files, these people are best suited to review:

  • @pietern -- recent work in libs/cmdio/, cmd/workspace/repos/, cmd/root/

Confidence: high

Eligible reviewers

Based on CODEOWNERS, these people or teams could also review:

@andrewnester, @anton-107, @databricks/eng-apps-devex, @denik, @lennartkats-db, @shreyas-goenka

Suggestions based on git history of 37 changed files (11 scored). See CODEOWNERS for path-specific ownership rules.

@simonfaltum
simonfaltum changed the base branch from main to simonfaltum/list-tui-paginatedMarch 20, 2026 07:37
Several list override functions declared a named request parameter
(e.g. listReq) that was never used after flag binding. Replace these
with blank identifiers to satisfy go vet and make intent clearer.
The parameter is kept named in clusters, jobs, pipelines, and
workspace overrides where it is actively used for flag binding
or search closures.
Previously, RenderIterator and RunPaginated only returned the error from
tea.Program.Run(), ignoring any fetch error stored in the model. An API
error mid-stream would display an error screen in the TUI but the command
would still exit 0.
Now both functions inspect the final model via the new Err() accessor and
return the fetch error if set. Also documents the destructive MaxWidth
truncation behavior on ColumnDef and renderContent.
Pipeline event messages can contain embedded newlines, carriage returns, and
tabs that corrupt tab-delimited text output and TUI table rows. Add a
`sanitize` template function to cmdio's renderFuncMap and use it in the
text template. Also sanitize in the TUI Extract function.
Increase MaxWidth from 60 to 200 so diagnostic payloads are not truncated
destructively before the actionable part of the error.
Co-authored-by: Isaac
Remove the PaginatedModel type alias (FinalModel interface suffices).
Remove the duplicate TestPaginatedErrAccessor test that overlaps with
TestPaginatedModelErr. Reduce the 5-line MaxWidth truncation comment
to a single line.
Co-authored-by: Isaac
@simonfaltum
simonfaltumforce-pushed the simonfaltum/list-tui-overrides-2 branch from a725914 to 6388a6eCompareMarch 22, 2026 07:40
@simonfaltumsimonfaltum changed the title Add TUI table overrides for 5 high-traffic list commandsAdd TUI table overrides for high-traffic list commandsMar 22, 2026
@simonfaltum
simonfaltum merged commit 8d63e1a into simonfaltum/list-tui-paginatedMar 23, 2026
18 checks passed
@simonfaltum
simonfaltum deleted the simonfaltum/list-tui-overrides-2 branch March 23, 2026 20:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@simonfaltum@eng-dev-ecosystem-bot@shreyas-goenka