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, 06:00 UTC
perf(linear): skip issue descriptions when loading list rows (#39180)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Adamulek123 committed
Nov 19, 2026 at 17:46 UTC
e37e45fd5bba464f689b9c1a9c0509c299698995
3 files changed
+15
-9
packages/issue-tracker-linear/src/server/LinearApi.graphql
+1
-1
@@ -60,7 +60,6 @@ fragment LinearIssue on Issue {
60
number
61
title
62
url
63
- description
63
createdAt
64
updatedAt
65
completedAt
@@ -122,6 +121,7 @@ query T3Issues($first: Int!, $after: String, $filter: IssueFilter!, $orderBy: Pa
121
query T3Issue($id: String!, $comments: Int!) {
122
issue(id: $id) {
123
...LinearIssue
124
+ description
125
team {
126
states(first: 100) {
127
nodes {
packages/issue-tracker-linear/src/server/LinearApi.graphql.ts
+5
-7
@@ -147,8 +147,6 @@ export const LinearIssue = Schema.Struct({
147
title: Schema.String,
148
/** Issue URL. */
149
url: Schema.String,
150
- /** The issue's description in markdown format. */
151
- description: Schema.NullOr(Schema.String),
150
/** The time at which the entity was created. */
151
createdAt: Shared.DateTime,
152
/**
@@ -253,7 +251,7 @@ export const T3Issues = GraphQL.query("T3Issues", {
251
{ name: "issues", body: ["(first:$", "first", " after:$", "after", " filter:$", "filter", " orderBy:$", "orderBy", "){nodes{...LinearIssue}pageInfo{...LinearPageInfo}}"] }
252
],
253
fragments: [
256
- { name: "LinearIssue", body: ["on Issue{id identifier number title url description createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}botActor{...LinearBot}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
254
+ { name: "LinearIssue", body: ["on Issue{id identifier number title url createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}botActor{...LinearBot}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
255
{ name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
256
{ name: "LinearWorkflowState", body: ["on WorkflowState{id name type position}"] },
257
{ name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] },
@@ -361,8 +359,6 @@ export const T3IssueIssueIssue = Schema.Struct({
359
title: Schema.String,
360
/** Issue URL. */
361
url: Schema.String,
364
- /** The issue's description in markdown format. */
365
- description: Schema.NullOr(Schema.String),
362
/** The time at which the entity was created. */
363
createdAt: Shared.DateTime,
364
/**
@@ -386,6 +382,8 @@ export const T3IssueIssueIssue = Schema.Struct({
382
assignee: Schema.NullOr(LinearUser),
383
/** Labels associated with this issue. */
384
labels: LinearIssueLabelsIssueLabelConnection,
385
+ /** The issue's description in markdown format. */
386
+ description: Schema.NullOr(Schema.String),
387
/** Comments associated with the issue, including inline comments on the issue's description. */
388
comments: CommentConnection,
389
/** Reactions associated with the issue. */
@@ -405,10 +403,10 @@ export const T3Issue = GraphQL.query("T3Issue", {
403
{ name: "comments", body: "Int!" }
404
],
405
selections: [
408
- { name: "issue", body: ["(id:$", "id", "){...LinearIssue team{states(first:100){nodes{...LinearWorkflowState}}}comments(first:$", "comments", " orderBy:createdAt){nodes{...LinearComment}pageInfo{...LinearPageInfo}}reactions{...LinearReaction}attachments(first:50){nodes{url title sourceType metadata}}history(first:100 orderBy:createdAt){nodes{id createdAt actor{...LinearUser}botActor{...LinearBot}fromState{...LinearWorkflowState}toState{...LinearWorkflowState}fromAssignee{...LinearUser}toAssignee{...LinearUser}addedLabels{...LinearLabel}removedLabels{...LinearLabel}fromTitle toTitle}}}"] }
406
+ { name: "issue", body: ["(id:$", "id", "){...LinearIssue description team{states(first:100){nodes{...LinearWorkflowState}}}comments(first:$", "comments", " orderBy:createdAt){nodes{...LinearComment}pageInfo{...LinearPageInfo}}reactions{...LinearReaction}attachments(first:50){nodes{url title sourceType metadata}}history(first:100 orderBy:createdAt){nodes{id createdAt actor{...LinearUser}botActor{...LinearBot}fromState{...LinearWorkflowState}toState{...LinearWorkflowState}fromAssignee{...LinearUser}toAssignee{...LinearUser}addedLabels{...LinearLabel}removedLabels{...LinearLabel}fromTitle toTitle}}}"] }
407
],
408
fragments: [
411
- { name: "LinearIssue", body: ["on Issue{id identifier number title url description createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}botActor{...LinearBot}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
409
+ { name: "LinearIssue", body: ["on Issue{id identifier number title url createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}botActor{...LinearBot}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
410
{ name: "LinearWorkflowState", body: ["on WorkflowState{id name type position}"] },
411
{ name: "LinearComment", body: ["on Comment{id body createdAt url user{...LinearUser}botActor{...LinearBot}reactions{...LinearReaction}}"] },
412
{ name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
packages/issue-tracker-linear/src/server/LinearIssueTracker.test.ts
+9
-1
@@ -78,6 +78,7 @@ function fakeLinear(
78
const requests: Array<{
79
readonly authorization: string | undefined;
80
readonly operation: string;
81
+ readonly query: string;
82
}> = [];
83
const http = Layer.succeed(
84
HttpClient.HttpClient,
@@ -88,7 +89,11 @@ function fakeLinear(
89
body._tag === "Uint8Array" ? new TextDecoder().decode(body.body) : String(body._tag);
90
const parsed = JSON.parse(text) as { query: string; variables: Record<string, unknown> };
91
const operation = /^(?:query|mutation) (\w+)/.exec(parsed.query)?.[1] ?? "?";
91
- requests.push({ authorization: request.headers.authorization, operation });
92
+ requests.push({
93
+ authorization: request.headers.authorization,
94
+ operation,
95
+ query: parsed.query,
96
+ });
97
const answer = answers[operation];
98
const answered = answer?.(parsed.variables);
99
const response =
@@ -224,6 +229,8 @@ describe("LinearIssueTracker", () => {
229
});
230
// The stored key goes in as-is, not as a bearer token.
231
expect(requests.map((request) => request.authorization)).toEqual(["lin_api_stored"]);
232
+ // Rows never show a body, so the listing leaves descriptions to the detail query.
233
+ expect(requests[0]?.query).not.toMatch(/\bdescription\b/);
234
235
// Linear's reset header is an absolute time in epoch milliseconds.
236
const resetAt = 4_102_444_800_000;
@@ -362,6 +369,7 @@ describe("LinearIssueTracker", () => {
369
const api = yield* tracker;
370
const detail = yield* api.getIssue({ ...target, key: "eng-7" });
371
expect(detail.viewer).toBe("julius");
372
+ expect(detail.body).toBe("body");
373
expect((yield* api.probeCredential("token")).workspace).toBe("acme");
374
// The team's own workflow, in Linear's order, with the category each state falls in.
375
expect(detail.states.map((entry) => [entry.name, entry.category])).toEqual([