Skip to content

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

Open
simonfaltum wants to merge 15 commits intosimonfaltum/list-tui-paginatedfrom
simonfaltum/list-tui-overrides-2
Open

Add TUI table overrides for 5 high-traffic list commands#4732
simonfaltum wants to merge 15 commits intosimonfaltum/list-tui-paginatedfrom
simonfaltum/list-tui-overrides-2

Conversation

@simonfaltum
Copy link
Member

@simonfaltum simonfaltum commented Mar 13, 2026

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
Copy link
Collaborator

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

Commit: a725914

Run: 23333465819

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 9 268 797 8:23
🟨​ aws windows 7 1 9 270 795 7:10
🔄​ aws-ucws linux 4 7 9 362 712 8:21
🔄​ aws-ucws windows 2 7 9 366 710 6:01
💚​ azure linux 2 11 271 795 7:52
💚​ azure windows 2 11 273 793 6:49
🔄​ azure-ucws linux 2 1 11 369 708 9:50
🔄​ azure-ucws windows 2 1 11 371 706 8:59
💚​ gcp linux 2 11 267 798 7:45
💚​ gcp windows 2 11 269 796 6:42
20 interesting tests: 9 SKIP, 7 KNOWN, 3 flaky, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🔄​f 🔄​f 💚​R 💚​R 🔄​f 🔄​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 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​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 🔄​f 🙈​s 🙈​s 🔄​f 🔄​f 🙈​s 🙈​s
💚​ TestAccept/ssh/connection 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestFsCpFileToFile ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFsCpFileToFile/dbfs_to_dbfs ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
Top 31 slowest tests (at least 2 minutes):
duration env testname
4:30 azure-ucws windows TestSecretsPutSecretStringValue
4:16 azure linux TestSecretsPutSecretStringValue
3:51 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:23 gcp windows TestSecretsPutSecretStringValue
3:16 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:15 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:13 azure-ucws linux TestSecretsPutSecretStringValue
3:13 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:09 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:09 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:04 azure windows TestSecretsPutSecretStringValue
2:51 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 gcp windows TestAccept/ssh/connection
2:47 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:45 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:45 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:40 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:40 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:37 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:37 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:34 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:29 aws windows TestAccept/ssh/connection
2:29 gcp linux TestSecretsPutSecretStringValue
2:18 gcp linux TestAccept/ssh/connection
2:15 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:08 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:05 aws linux TestSecretsPutSecretStringValue
2:05 azure linux TestAccept/ssh/connection
2:03 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

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

@shreyas-goenka shreyas-goenka left a comment

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.

Treat pipeline search input literally when users type SQL LIKE wildcards, and add package-level override tests so nested SDK field access is exercised before runtime.
Previously, the TUI search callback overwrote req.Filter entirely with a
name LIKE expression, discarding any filter the user passed via --filter.
Now the name LIKE clause is combined with the existing filter using AND,
so both constraints apply together.
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.
@simonfaltum simonfaltum requested a review from a team as a code owner March 13, 2026 14:47
Wrap the user-provided filter in parentheses before appending the AND
clause. Without this, a filter like 'a OR b' combined with a name search
would parse as 'a OR (b AND name LIKE ...)' instead of the intended
'(a OR b) AND name LIKE ...'.

Add a test case with an OR filter to verify correct parenthesization.
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
Copy link
Contributor

@shreyas-goenka shreyas-goenka left a comment

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.


// sanitizeControlWhitespace replaces newlines and tabs with spaces to prevent
// corrupting tab-delimited text output.
func sanitizeControlWhitespace(s string) string {
Copy link
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-paginated March 19, 2026 06:43
@simonfaltum simonfaltum changed the base branch from simonfaltum/list-tui-paginated to main March 19, 2026 06:45
@github-actions
Copy link

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-paginated March 20, 2026 07:37
Sign up for free to 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