Keep typed query when opening a search result - #21
Open
seungjuchoi wants to merge 2 commits into
Open
seungjuchoi wants to merge 2 commits into
seungjuchoi wants to merge 2 commits into
Conversation
added 2 commits
September 1, 2026 07:24
Accepting a search result with Enter committed a new search scoped to the picked task's display ref before opening its detail. Closing the detail then left a single-task search view instead of the result list the user was choosing from. Commit the typed query as the search view and select the picked task within it. When the picked result is missing from the committed results (the input changed after the preview ran), fall back to opening the task through the exact-task detail path. Regression coverage includes committing the typed query with the picked task selected and the exact-task fallback.
…s-query # Conflicts: # CHANGELOG.md
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.
Problem
Opening a search result with
Enter(SearchIntent::Navigate) committed a new search scoped to the picked task's display ref before opening its detail. Closing the detail then left a single-task search view (effectivelyAVEN-123as the query) instead of the result list the user was actually choosing from, so there was no natural way back to the other matches.Change
g [back-navigation to the pre-search view is unchanged.open_detail_task, the existing exact-task path used for linked tasks.Tests
navigate_search_result_commits_typed_querydrives the real flow (type query → settle preview → pick second result → Enter) and asserts the committed view isTaskProjectionOrigin::Search { query: "needle" }with both matches listed and the picked task selected.navigate_search_result_missing_from_results_opens_exact_taskcovers the fallback.cargo test --libpasses (1767 tests;RUST_MIN_STACKraised to get past the pre-existing debug-build stack overflow infocused_detail_child_removes_and_undo_restores_relationship, which also aborts on a cleanmaincheckout).cargo fmt --checkandcargo clippy --all-targetsare clean.