Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(prs): reviewer menu searches past the first page and keeps GitLab's requested reviewers #22489

MergedTonybynMp4(GitHub profile, opens in a new tab)merged 17 commits intomain fromrefs/pull/22489/headmerged by juliusmarminge View on GitHub

Showing 26 changed files with 55 additions and 18 deletions (loading 24).

x
0 of 26 viewed, 26 left
52 additions and 17 deletionsapps/mobile/src/features/pull-requests/PullRequestReviewersScreen.tsxModified
View file
@@ -6,6 +6,11 @@
import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";
+import {
+ hostReviewerQuery,
+ reviewerCandidateView,
+ type ReviewerTruncation,
+} from "@t3tools/client-runtime/pull-request-reviewers";
import type { PullRequestReviewerCandidate } from "@t3tools/contracts";
import { useRef, useState } from "react";
import { FlatList, Pressable, ScrollView, View } from "react-native";
@@ -17,10 +22,21 @@
import { SymbolView } from "../../components/ui/AppSymbol";
import { composerPullRequests } from "../../state/pull-requests";
import { useEnvironmentQuery } from "../../state/query";
+import { useDebouncedValue } from "../../state/queries";
import { useAtomCommand } from "../../state/use-atom-command";
import { PullRequestAvatar } from "./PullRequestPresentation";
import { pullRequestTarget, type PullRequestParams } from "./usePullRequestDiff";
​
+const TRUNCATED_LABELS: Record<ReviewerTruncation, (error: string | null) => string> = {
+ unsearchable: () =>
+ "The provider has more reviewers than it returned. Find additional reviewers on the provider.",
+ searchable: () => "The provider has more reviewers than are listed here. Search to find them.",
+ "search-failed": (error) =>
+ `Only listed reviewers are matched: the provider search failed. ${error ?? ""}`,
+ "search-truncated": () =>
+ "More reviewers match than the provider returned. Keep typing to narrow it down.",