@devries-cameron20 / t3code Mirror · read-only / commits / 554c89320f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 14:45 UTC

fix(mobile): long pull request searches on iOS no longer fail the list (#29850)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Alex Southwell committed Nov 15, 2026 at 02:59 UTC 554c89320f4944cc92472099fe4569e97953882d
2 files changed +6 -2
packages/client-runtime/src/pullRequestQuery.test.ts
+4 -1
@@ -75,10 +75,13 @@ describe("reading qualifiers out of a typed query", () => {
75 it("cuts a typed query back to what the contract carries", () => {
76 const many = Array.from({ length: 14 }, (_, index) => `l${index}`).join(",");
77 const long = "x".repeat(240);
78 - const parsed = parsePullRequestQuery(`label:${many} label:${long} author:${long}`);
78 + const parsed = parsePullRequestQuery(
79 + `label:${many} label:${long} author:${long} ${"fix ".repeat(80)}`,
80 + );
81 expect(parsed.filters.labels?.[0]).toHaveLength(10);
82 expect(parsed.filters.labels?.[1]).toEqual(["x".repeat(200)]);
83 expect(parsed.filters.author).toBe("x".repeat(200));
84 + expect(parsed.text).toBe("fix ".repeat(50).trim());
85 });
86 });
87
packages/client-runtime/src/pullRequestQuery.ts
+2 -1
@@ -18,6 +18,7 @@ const CHECKS_VALUES: Record<string, PullRequestListFilters["checks"]> = {
18 const QUERY_TOKEN = /(?:[^\s"]|"[^"]*")+/g;
19 const MAX_QUALIFIER_VALUES = 10;
20 const MAX_QUALIFIER_LENGTH = 200;
21 +const MAX_TEXT_LENGTH = 200;
22
23 function qualifierValue(raw: string): string {
24 return raw.replaceAll('"', "").trim();
@@ -120,7 +121,7 @@ export function parsePullRequestQuery(raw: string): {
121 text.push(token);
122 }
123 return {
123 - text: text.join(" "),
124 + text: text.join(" ").slice(0, MAX_TEXT_LENGTH).trim(),
125 filters: {
126 ...(labels.length === 0 ? {} : { labels: labels.slice(0, MAX_QUALIFIER_VALUES) }),
127 ...(excludedLabels.length === 0