Skip to content

feat(chooser): reveal files with global search - #2802

Merged
l0gicgate merged 3 commits into
mainfrom
feat/2799-chooser-global-search
Nov 24, 2026
Merged

l0gicgate merged 3 commits into
mainfrom
feat/2799-chooser-global-search

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Ctrl+K now opens the main window’s global search palette in the file chooser. It finds files outside the starting folder, respects the request’s file-type filter, and stays disabled in device-confined choosers. Ctrl+F remains folder-scoped.

Local CodeScene check skipped with the owner’s approval.

Visual evidence

screenrecording-2026-11-24_14-40-22.mp4

How to test

  1. Open a Strata file chooser in a different folder from a known file under Home. Press Ctrl+K, type part of its name, then press Esc.
  2. Press Ctrl+K again, find the same file, and press Enter. Then click Open.

Expected result: Esc dismisses only the search. Enter reveals and highlights the file in its containing folder without launching it or submitting the request. Open returns the highlighted file.

Related issue

Closes #2799

Reuse the main window’s search palette and binding. Keep activation in the pending request, respect its file filters, and leave confined device destinations outside global search.

Refs #2799
Name the palette-toggle condition as a ChooserState predicate, read the confinement from the source inside chooser_reference, and extract the close-request handler from build_chooser_hosted.

Refs #2799
@l0gicgate

Copy link
Copy Markdown
Contributor

Review and cleanup

Merged main at 0d9678b28, no conflicts.

Review against the description and #2799. No merge blockers found.

  • Ctrl+K opens the shared palette through the SEARCH catalog binding in both maps, including from the name and location fields; pressing it again closes it. Confirmed in chooser/shortcuts and by the tenxer-rebound QA variant.
  • Enter navigates to a folder or reveals a file without launching or submitting; Open then returns the revealed file. Confirmed (chooser/search.rs, the new keyboard test and QA scenario).
  • Results respect the request's file-type and folder-only filters through the shared eligible_results, which keeps pulling lower-ranked candidates so a narrow filter does not starve the list.
  • Device-confined choosers neither open the palette nor list it in the 10xer reference.
  • The palette's only other action, "Open containing folder", also goes through the chooser's reveal callback, so nothing in it can launch a file.
  • No new user-facing strings, comments, or tooltips. No prior review comments or inline threads existed on the PR.

Fixes pushed

  • fcf8a8a23 refactor(chooser): keep chooser key handling and layout code health. The PR lowered CodeScene scores on two files: src/ui/chooser/shortcuts.rs 10.0 → 9.68 (complex conditional in modal_or_drag) and src/ui/chooser/layout.rs 9.11 → 9.09 (build_chooser_hosted grew). The toggle condition is now ChooserState::hide_global_search, chooser_reference reads confinement from the source, and the close-request handler is a named function. Now 10.0 and 9.13; no behaviour change.

Tests. All added or changed tests kept: the save-name keyboard test (name-field input route, folder entry, no submit), the confined-chooser assertion in choose_folder, the reference-row assertion, and the QA scenario (Escape, filter, reveal, Open; default and rebound 10xer key).

Validation

  • ./scripts/test-headless.py -- ui::search::tests global_search_enters_a_folder_without_submitting_the_save_name choose_folder_rejects_invalid_destinations_and_copies_into_a_confined_directory ui::shortcut_footer::tests ui::keys ui::chooser::tests tenxer_reference_follows_the_active_map sandbox_helper::media: 235 passed, 0 failed
  • ./scripts/qa.sh --test-threads 6 chooser-global-search-reveals-file global-search-finds-file-under-home chooser-filtered-file-click-previews: 7 runs passed (PR CI does not run QA scenarios)
  • ./scripts/quality.sh fmt, ./scripts/quality.sh clippy: clean
  • ./scripts/code-health.sh --changed: no touched file scores below main
  • Not run: full Rust and QA suites (bounded change to chooser key routing and the search palette; CI runs the full Rust suite)

Non-blocking notes

  • The palette's Enter hint still reads "open" in the chooser, where Enter reveals or navigates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(chooser): add the main window’s global file search

2 participants