Skip to content

Dropdown file picker — search/filter input #724

Description

@jeonghun-jj-lee

Important

Problem — The dropdown file picker in both Files Changed and Preview has no search capability. When a project has many files, researchers must scroll through the tree to find a specific file.
Approach — Add a text input at the top of the dropdown file picker popover. Typing narrows the tree by substring match on file path/name. The filter is transient — it clears when the dropdown closes.
Scope — in: filter input in dropdown, substring matching on the buildCollapsedTree output, transient state. out: the dropdown component itself (already exists), file tree data sources (slices 4, 1).

Acceptance Criteria

  • Both the Files Changed and Preview dropdown file pickers include a search/filter input at the top
  • The filter narrows the tree by substring match on file path/name
  • The filter is transient — clears when the dropdown closes
  • Empty filter shows the full tree (no change from current behavior)
  • Filter matching is case-insensitive

Testing Decisions

Unit test the filter function against buildCollapsedTree output with various query strings, empty queries, and case variations.

Key Decisions

The filter runs client-side against the already-loaded file list. buildCollapsedTree (currently a private function in review-panel-v2.tsx) is extracted to a shared module. Filter uses simple substring match, not fuzzy matching — simple, predictable, fast.

Constraints & Invariants

  • The filter never persists across dropdown open/close cycles
  • An empty filter always shows the complete tree

Prior Art

  • buildCollapsedTree in review-panel-v2.tsx (requires extraction to shared module)
  • applyFileListKeyDown pattern in session-file-list-v2.tsx (keyboard navigation within filtered results)
  • SessionReviewV2Sidebar filter input pattern (reference, not reused — that's the sidebar, not the dropdown)

Source

Part of #721

Activity

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

Metadata

Metadata

Labels

afkImplementable without human interactionarea:uienhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions