From d0bb955f517b7c2da1b044d06d7d2668c1f2c796 Mon Sep 17 00:00:00 2001 From: wSedlacek Date: Thu, 5 Nov 2026 06:07:49 -0800 Subject: [PATCH 1/2] fix(web): add a Me option to pull request author filters --- .../pullRequest/PullRequestListFilters.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/pullRequest/PullRequestListFilters.tsx b/apps/web/src/components/pullRequest/PullRequestListFilters.tsx index 912e4c6d7ac4d..2032bf76462d0 100644 --- a/apps/web/src/components/pullRequest/PullRequestListFilters.tsx +++ b/apps/web/src/components/pullRequest/PullRequestListFilters.tsx @@ -138,6 +138,7 @@ const ALL_PROJECTS_VALUE = "all"; const ALL_HOSTS_VALUE = ""; const ALL_SERVERS_VALUE = ""; const UNFILTERED_VALUE = "all"; +const VIEWER_AUTHOR_VALUE = "me"; /** Project ids are unique only within an environment. */ export const pullRequestProjectKey = (project: { readonly id: ProjectId; @@ -283,7 +284,10 @@ function PullRequestAuthorChoices({ const [query, setQuery] = useState(""); const hosted = useHostedFilterOptions(scope, "authors", query); const login = value?.toLowerCase() ?? ""; - const selected = selectedPullRequestAuthor(options, hosted.authors, value); + const selected = + value === VIEWER_AUTHOR_VALUE + ? undefined + : selectedPullRequestAuthor(options, hosted.authors, value); const visible = [ ...(selected ? [selected] : []), ...pullRequestAuthorChoices(options, hosted.authors, query).filter( @@ -308,6 +312,12 @@ function PullRequestAuthorChoices({ Anyone + + + + Me + + {visible.map((option) => ( @@ -348,7 +358,7 @@ function PullRequestAuthorFilter({ Author - {value ?? "Anyone"} + {value === VIEWER_AUTHOR_VALUE ? "Me" : (value ?? "Anyone")} From 47db58dfab5ccfa3f3a9ad4554fbee40f222c490 Mon Sep 17 00:00:00 2001 From: wSedlacek Date: Sun, 8 Nov 2026 09:54:23 -0800 Subject: [PATCH 2/2] fix(web): treat me/@me aliases as the Me author filter Match resolvePullRequestAuthorFilter so URL or shared author=ME/@me values select Me and label correctly. Co-authored-by: Cursor --- .../pullRequest/PullRequestListFilters.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/web/src/components/pullRequest/PullRequestListFilters.tsx b/apps/web/src/components/pullRequest/PullRequestListFilters.tsx index 2032bf76462d0..afa55f1e8fa8b 100644 --- a/apps/web/src/components/pullRequest/PullRequestListFilters.tsx +++ b/apps/web/src/components/pullRequest/PullRequestListFilters.tsx @@ -139,6 +139,8 @@ const ALL_HOSTS_VALUE = ""; const ALL_SERVERS_VALUE = ""; const UNFILTERED_VALUE = "all"; const VIEWER_AUTHOR_VALUE = "me"; +/** Same aliases `resolvePullRequestAuthorFilter` accepts for the signed-in viewer. */ +const isViewerAuthorFilter = (value: string | undefined) => /^@?me$/i.test(value?.trim() ?? ""); /** Project ids are unique only within an environment. */ export const pullRequestProjectKey = (project: { readonly id: ProjectId; @@ -283,11 +285,11 @@ function PullRequestAuthorChoices({ }) { const [query, setQuery] = useState(""); const hosted = useHostedFilterOptions(scope, "authors", query); + const isViewerAuthor = isViewerAuthorFilter(value); const login = value?.toLowerCase() ?? ""; - const selected = - value === VIEWER_AUTHOR_VALUE - ? undefined - : selectedPullRequestAuthor(options, hosted.authors, value); + const selected = isViewerAuthor + ? undefined + : selectedPullRequestAuthor(options, hosted.authors, value); const visible = [ ...(selected ? [selected] : []), ...pullRequestAuthorChoices(options, hosted.authors, query).filter( @@ -305,7 +307,10 @@ function PullRequestAuthorChoices({ placeholder="Search authors" aria-label="Search authors" /> - + @@ -358,7 +363,7 @@ function PullRequestAuthorFilter({ Author - {value === VIEWER_AUTHOR_VALUE ? "Me" : (value ?? "Anyone")} + {isViewerAuthorFilter(value) ? "Me" : (value ?? "Anyone")}