-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary
The recently added "Sort by" section in the Issues and Pull Requests dropdowns takes up persistent vertical space in the dropdown header. Sort and filter controls should live behind a filter icon button — matching the compact, consistent pattern used by the worktree sidebar.
Problem Statement
PR #3330 added a "Sort by" radio group that is always visible inside the dropdown header for both the Issues and PR panels. This creates two problems:
- Wasted space — the sort section is permanently visible even when the user has no interest in changing it, shrinking the list area.
- Inconsistent pattern — the worktree sidebar uses a search input + filter icon button that opens a popover for all sort/filter options. The GitHub dropdowns should follow the same pattern rather than inlining controls.
The worktree filter button (WorktreeFilterPopover) is a well-established pattern in the app: a compact icon that shows a badge when filters are active and opens a popover with sort and filter options. The GitHub resource panels should adopt the same affordance.
Evidence:
src/components/GitHub/GitHubResourceList.tsx#L526-L568— inline "Sort by" section always visible in the dropdown headersrc/components/Worktree/WorktreeFilterPopover.tsx— the compact filter icon + popover pattern to followsrc/store/githubFilterStore.ts— sort order state already exists here
Desired Behavior
- The inline "Sort by" radio section is removed from the
GitHubResourceListdropdown header. - A small filter icon button appears next to the search input (mirroring the worktree sidebar layout).
- Clicking the filter icon opens a popover containing the sort order options (and any other per-list filters that may be added in future).
- When a non-default sort order is active, the filter icon shows an accent badge — consistent with how
WorktreeFilterPopoversignals active filters. - The dropdown header is more compact as a result: just search + filter icon, with state tabs (Open/Merged/Closed) below.
- Sort order state persists exactly as it does today (via
githubFilterStore).
Acceptance Criteria
- The "Sort by" radio section is no longer visible inline in the Issues or PR dropdown headers
- A filter icon button appears next to the search input in both dropdowns
- The filter popover contains sort order options (Newest / Recently updated) for the respective resource type
- The filter icon displays a visual indicator (badge or accent color) when a non-default sort order is active
- Sort order changes take effect immediately and re-fetch the list, same as today
- The dropdown header is visually more compact without the sort section
Edge Cases & Risks
- The state filter tabs (Open / Merged / Closed) should remain where they are — only the sort section moves.
- The filter popover should be dismissed by clicking outside or pressing Escape without losing the current sort selection.
- Non-default sort order badge should reset correctly when the user switches back to the default.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels