Skip to content

Fix Select title hidden by Filtering(true) in apps init prompts#5114

Open
jamesbroadhead wants to merge 6 commits intomainfrom
improve-resource-prompt-description
Open

Fix Select title hidden by Filtering(true) in apps init prompts#5114
jamesbroadhead wants to merge 6 commits intomainfrom
improve-resource-prompt-description

Conversation

@jamesbroadhead
Copy link
Copy Markdown

Replaces #4603 — re-opened from an upstream branch (was previously from a fork, which blocked CI from running properly). Original PR was approved by @igrekun and @pkosiec.

Summary

  • huh.Select.Filtering(true) immediately activates filter mode, which replaces the Title with a blank filter text input in titleView() — so the user never saw what resource they were selecting (e.g., "Select SQL Warehouse")
  • Remove Filtering(true) so the Title renders on initial display. Users can still press / to activate filtering (bound by default in huh's keymap)
  • Update the description hint from "type to filter" to "press / to filter" to match the new behavior

Affects both promptFromListWithLabel (all resource pickers during apps init) and PromptForAppSelection.

Test plan

  • Run databricks apps init interactively, select a feature, and verify the resource picker title (e.g., "Select SQL Warehouse") is now visible
  • Verify pressing / activates filtering and typing filters the list
  • Verify pressing Esc exits filter mode and restores the title

jamesbroadhead and others added 5 commits February 25, 2026 22:01
huh's Select.Filtering(true) immediately activates filter mode, which
replaces the Title with a blank filter text input in titleView().
This meant the user never saw what resource they were being asked to
select (e.g., "Select SQL Warehouse").

Remove Filtering(true) so the Title renders. Users can still press /
to activate filtering (bound by default in huh's keymap). Update the
description hint from "type to filter" to "press / to filter".

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Test that:
- Title is visible in the initial render without Filtering(true)
- Filtering(true) replaces the Title with a blank filter input (the bug)
- Pressing '/' activates filtering and correctly filters options
- Help text includes the filter hint

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…pt-description

# Conflicts:
#	libs/apps/prompt/prompt.go
#	libs/apps/prompt/prompt_test.go
The prompt_test.go file imports charmbracelet/x/ansi directly,
so it should not be listed as indirect in go.mod.

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown

Approval status: pending

/libs/apps/ - needs approval

Files: libs/apps/prompt/prompt_test.go
Suggested: @MarioCadenas
Also eligible: @pkosiec, @arsenyinfo, @fjakobs, @Shridhad, @atilafassina, @keugenek, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

General files (require maintainer)

Files: go.mod
Based on git history:

  • @pietern -- recent work in ./, libs/apps/prompt/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

- Add initForm helper that runs Init's command and feeds a WindowSizeMsg
  in. The previous f.Update(f.Init()) silently swallowed the cmd because
  Init returns tea.Cmd (a function), not a tea.Msg, so the form never
  laid out properly.
- Share newWarehouseSelect between the title/visibility test and the
  filter activation test so the construction shape is asserted in one
  place.
- Drop TestSelectTitleHiddenByFilteringTrue: it asserted the upstream
  huh bug, which means an upstream fix would fail CI here without any
  CLI regression.

Co-authored-by: Isaac
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.

1 participant