Conversation
There was a problem hiding this comment.
Pull request overview
Adds sorting and richer filtering controls for the workspace Projects list, wiring UI query params in the header to client-side filtering/sorting on the list page (Issue #79).
Changes:
- Add query-param driven filtering (access, lead, members, created-date, “my projects”, favorites) and sorting logic to the projects list.
- Replace placeholder header buttons with functional Sort and Filters dropdowns (including workspace member lookups for lead/member filters).
- Improve empty-state messaging when filters are active.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ui/src/pages/ProjectsListPage.tsx | Parses filter/sort params from the URL and applies filtering + sorting to the projects collection. |
| ui/src/components/layout/PageHeader.tsx | Implements “Sort projects” and “Filter projects” dropdowns that write filter/sort state into URL search params. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
consider copilot comments, and re-request review from me |
nazarli-shabnam
left a comment
There was a problem hiding this comment.
improve search query.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@nazarli-shabnam quick review |
|
ctrl+enter AND enter should work in project settings->add member |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .filter((p) => { | ||
| if (memberFilters.length === 0) return true; | ||
| const memberIds = membersByProject[p.id] ?? []; | ||
| return memberFilters.some( | ||
| (memberId) => memberIds.includes(memberId) || p.project_lead_id === memberId, | ||
| ); | ||
| }) |
There was a problem hiding this comment.
memberFilters depends on membersByProject, but while members are still loading membersByProject[p.id] is [], which makes this filter exclude every project (temporary empty list / misleading empty-state) whenever a member filter is active. Consider tracking a “membersByProjectLoaded” boolean (e.g., keys count === allProjects.length) and either (a) show a loading indicator while filters require member data, or (b) treat missing member data as “unknown” and keep projects until the member list has loaded.
| const memberIds = membersByProject[p.id] ?? []; | ||
| return memberFilters.some( | ||
| (memberId) => memberIds.includes(memberId) || p.project_lead_id === memberId, | ||
| ); | ||
| }) | ||
| .filter((p) => { | ||
| if (!myProjectsOnly || !authUser) return true; | ||
| const memberIds = membersByProject[p.id] ?? []; |
There was a problem hiding this comment.
myProjectsOnly has the same issue as the member filter: until membersByProject finishes loading, memberIds is [] so this condition filters out projects the user may belong to, causing a brief “no projects” state. Consider gating this filter on member-data readiness (or showing a loading state) to avoid flicker and incorrect empty messaging.
| const memberIds = membersByProject[p.id] ?? []; | |
| return memberFilters.some( | |
| (memberId) => memberIds.includes(memberId) || p.project_lead_id === memberId, | |
| ); | |
| }) | |
| .filter((p) => { | |
| if (!myProjectsOnly || !authUser) return true; | |
| const memberIds = membersByProject[p.id] ?? []; | |
| const hasMembersLoaded = Object.prototype.hasOwnProperty.call(membersByProject, p.id); | |
| if (!hasMembersLoaded) return true; | |
| const memberIds = membersByProject[p.id]; | |
| return memberFilters.some( | |
| (memberId) => memberIds.includes(memberId) || p.project_lead_id === memberId, | |
| ); | |
| }) | |
| .filter((p) => { | |
| if (!myProjectsOnly || !authUser) return true; | |
| const hasMembersLoaded = Object.prototype.hasOwnProperty.call(membersByProject, p.id); | |
| if (!hasMembersLoaded) return true; | |
| const memberIds = membersByProject[p.id]; |
| 999, | ||
| ).getTime() | ||
| : NaN; | ||
| if (!Number.isFinite(afterMs) || !Number.isFinite(beforeMs)) return true; | ||
| return createdAtMs >= afterMs && createdAtMs <= beforeMs; |
There was a problem hiding this comment.
For createdDateFilter === 'custom', the filter is effectively disabled unless both createdAfter and createdBefore parse to finite timestamps (if (!Number.isFinite(afterMs) || !Number.isFinite(beforeMs)) return true). This makes the UI state inconsistent if one bound is missing/invalid (e.g. URL edited manually): the filter appears active but doesn’t filter anything. Consider supporting open-ended ranges (only after / only before) and treating invalid bounds as non-matching (or clearing the custom filter).
This pull request significantly enhances the filtering, sorting, and user experience of the
ProjectsListPagecomponent. The changes introduce support for multiple URL-based filters (such as access, lead, member, date, and favorites), add sorting options, and improve the empty state messaging to better reflect the user's filter selections.Filtering and Sorting Improvements:
private/public), project lead, members, creation date, favorites, and "my projects only". These filters are now applied in sequence to the project list. [1] [2]User Experience Enhancements:
Authentication Context Usage:
useAuthcontext to enable filtering projects by the currently authenticated user (for "my projects only" filter). [1] [2] [3]closes Feat: projects order and filter buttons #79