Conversation
Replace the custom Bubble Tea listModel/itemDelegate implementation in pkg/console/list.go with huh.NewSelect[string], consistent with how confirm.go and input.go use huh forms. The public API (ShowInteractiveList, ListItem, NewListItem) is unchanged. - Remove listModel, itemDelegate, listHeightPadding (Bubble Tea specifics) - Remove ListItem.FilterValue() (only needed by charm.land/bubbles list.Item interface) - Use huh.NewForm + huh.NewSelect with WithTheme/WithAccessible for consistent styling across all interactive console components - Keep non-TTY fallback showTextList unchanged - Update tests to remove itemDelegate and FilterValue coverage Closes #23690 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closed
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
pkg/console/list.gofrom a custom Bubble TealistModel/itemDelegateimplementation tohuh.NewSelect[string], making it consistent with howconfirm.goandinput.goalready usehuhforms.Changes
pkg/console/list.golistModel,itemDelegate,listHeightPadding(all Bubble Tea-specific)huh.NewForm+huh.NewSelect[string]— same pattern asconfirm.gostyles.HuhTheme()andIsAccessibleMode()automatically (consistent with other console forms)"title – description"sincehuh.Optionhas a single label fieldshowTextListis unchangedshowTextListfallback (non-TTY path) is unchangedpkg/console/console_types.goFilterValue() stringmethod fromListItem— this was only required to satisfy thecharm.land/bubbles/v2/list.Iteminterface, which is no longer usedpkg/console/list_test.goitemDelegate(type no longer exists)FilterValueassertion (method removed)Public API
Unchanged:
ShowInteractiveList(title string, items []ListItem) (string, error)ListItem,NewListItem(title, description, value string) ListItemCallers in
pkg/cli/mcp_list.gorequire no changes.Motivation
From issue #23690 and discussion #23683:
list.gowas the only direct Bubble Tea model implementation outside ofhuh. Migrating it eliminates this inconsistency and removes thecharm.land/bubblesdependency footprint from the console package.