Skip to content

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

Open
simonfaltum wants to merge 20 commits intomainfrom
simonfaltum/list-tui-overrides-2
Open

Add TUI table overrides for 5 high-traffic list commands#4732
simonfaltum wants to merge 20 commits intomainfrom
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: 5158ea6

Run: 23283270134

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 9 268 797 6:28
🟨​ aws windows 7 1 9 270 795 6:05
🔄​ aws-ucws linux 2 7 9 364 712 8:05
🔄​ aws-ucws windows 2 7 9 366 710 6:18
💚​ azure linux 2 11 271 795 5:59
💚​ azure windows 2 11 273 793 4:35
🔄​ azure-ucws linux 2 1 11 369 708 7:46
🔄​ azure-ucws windows 2 1 11 371 706 5:46
💚​ gcp linux 2 11 267 798 5:59
💚​ gcp windows 2 11 269 796 4:54
18 interesting tests: 9 SKIP, 7 KNOWN, 2 flaky
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 💚​R 🔄​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 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 20 slowest tests (at least 2 minutes):
duration env testname
3:40 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:19 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:07 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:01 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:51 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:44 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:39 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:37 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:19 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:16 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:15 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:14 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:09 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:07 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:06 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:06 azure windows 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
Search input now triggers server-side filtering automatically after the
user stops typing for 200ms, instead of waiting for Enter. This prevents
redundant API calls on each keystroke while keeping the text input
responsive. Enter still executes search immediately, bypassing the
debounce.

Uses Bubble Tea's tick-based message pattern with a sequence counter to
discard stale debounce ticks when the user types additional characters
before the delay expires.
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.
Fix four issues in the paginated TUI:

1. Entering search mode now sets loading=true to prevent maybeFetch from
   starting new fetches against the shared iterator while in search mode.
   In-flight fetches are discarded via the generation check.

2. executeSearch sets loading=true (was false) to prevent overlapping fetch
   commands when a quick scroll triggers maybeFetch before the first search
   fetch returns.

3. Pressing esc to close search now restores savedRows, savedIter, and
   savedExhaust (same as clearing the query via enter with empty input).

4. RenderIterator now checks the final model for application-level errors
   via the new FinalModel interface, since tea.Program.Run() only returns
   framework errors.
…ui-overrides-2

# Conflicts:
#	libs/cmdio/render.go
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.

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