Preserve leading '/' when opening tree filter and add initial_text parameter#4
Merged
koianaoki merged 1 commit intoMay 11, 2026
Conversation
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.
Motivation
/key preserves the leading slash in the input and enters regex mode so users can immediately type a regex prefix.Description
initial_text: str | None = Noneparameter toaction_tree_filterand updated theExplorerActionsProtocolsignature to match.initial_textis not provided, infer a leading slash if the filter was opened by the/key using_last_key_charor_last_key, and set_tree_filter_texttoinitial_textinstead of clearing it.action_tree_filter("/")when receiving/key events and adjusted printable character handling accordingly.tree_filter_input.set_filterfor empty queries so the leading slash remains visible./and preserving an empty regex prefix.Testing
test_tree_filter_opened_by_slash_keeps_slash_visiblewhich asserts the leading slash is preserved and the filter enters regex mode. This test passed.test_tree_filter_empty_regex_prefix_remains_visiblewhich asserts an empty regex prefix ("/") sets regex mode and updates the displayed filter; this test passed.Codex Task