From 558ddfba9c6a505c5534f5514791f00cf513500b Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Thu, 9 Apr 2026 13:32:25 +0200 Subject: [PATCH] refactor(web): switch to codegen useFragment, fix storybook + types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace Apollo's useSuspenseFragment with codegen's useFragment (zero-cost cast) for all fragment-consuming components. Apollo's useSuspenseFragment can be used selectively later for @defer support. - Set dataMasking: false — fragment colocation is enforced at the type level via codegen's $fragmentRefs branding (inlineFragmentTypes: "mask"). - Add apollo-client.d.ts with GraphQLCodegenDataMasking TypeOverrides. - Add withApollo + withCachedFragments storybook decorators for stories that use Apollo hooks (useAuth, useMutation). - Use makeFragmentData in stories for proper fragment type branding. - Mock useSuspenseFragment as passthrough in snapshot test setup. - Add timeline and title-editor stories + snapshot tests. - Fix useAuth query to spread ...IdentitySummary alongside direct fields. - Fix lint: route property order, storybook meta component/title. Co-Authored-By: Claude Opus 4.6 (1M context) --- webui2/.storybook/decorators.tsx | 75 +++ webui2/.storybook/vitest.setup.ts | 14 +- webui2/COMPONENTS.md | 89 +++ webui2/codegen.ts | 5 + webui2/src/__generated__/gql.ts | 18 +- webui2/src/__generated__/graphql.ts | 127 +++- webui2/src/apollo-client.d.ts | 6 + .../bugs/__snapshots__/timeline.test.tsx.snap | 637 ++++++++++++++++++ .../__snapshots__/title-editor.test.tsx.snap | 91 +++ .../components/bugs/label-editor.stories.tsx | 70 +- webui2/src/components/bugs/label-editor.tsx | 2 +- .../src/components/bugs/timeline.stories.tsx | 173 +++++ webui2/src/components/bugs/timeline.test.tsx | 13 + webui2/src/components/bugs/timeline.tsx | 119 ++-- .../components/bugs/title-editor.stories.tsx | 29 + .../src/components/bugs/title-editor.test.tsx | 13 + .../__snapshots__/file-viewer.test.tsx.snap | 108 ++- .../components/code/file-viewer.stories.tsx | 119 ++-- webui2/src/components/code/file-viewer.tsx | 8 +- .../components/code/ref-selector.stories.tsx | 48 +- webui2/src/components/code/ref-selector.tsx | 5 +- .../shared/comment-card.stories.tsx | 54 +- webui2/src/components/shared/comment-card.tsx | 5 +- .../shared/issue-filters.stories.tsx | 45 +- .../src/components/shared/issue-filters.tsx | 2 +- .../components/shared/issue-row.stories.tsx | 43 +- .../components/shared/label-badge.stories.tsx | 53 +- webui2/src/components/shared/label-badge.tsx | 9 +- webui2/src/components/ui/listbox.stories.tsx | 6 +- webui2/src/lib/apollo.ts | 7 +- webui2/src/lib/auth.tsx | 17 +- .../src/routes/$repo/_code/commits/$ref.tsx | 4 +- 32 files changed, 1727 insertions(+), 287 deletions(-) create mode 100644 webui2/COMPONENTS.md create mode 100644 webui2/src/apollo-client.d.ts create mode 100644 webui2/src/components/bugs/__snapshots__/timeline.test.tsx.snap create mode 100644 webui2/src/components/bugs/__snapshots__/title-editor.test.tsx.snap create mode 100644 webui2/src/components/bugs/timeline.stories.tsx create mode 100644 webui2/src/components/bugs/timeline.test.tsx create mode 100644 webui2/src/components/bugs/title-editor.stories.tsx create mode 100644 webui2/src/components/bugs/title-editor.test.tsx diff --git a/webui2/.storybook/decorators.tsx b/webui2/.storybook/decorators.tsx index 04a23bf435d2fad66f0bb0f7fa32792f78bb2ea4..4c811e6913ad705ddc61feaeba85d8222852ba28 100644 --- a/webui2/.storybook/decorators.tsx +++ b/webui2/.storybook/decorators.tsx @@ -1,3 +1,7 @@ +import { ApolloClient, ApolloLink, Observable } from "@apollo/client/core"; +import { ApolloProvider } from "@apollo/client/react"; +import { InMemoryCache } from "@apollo/client/cache"; +import type { TypedDocumentNode } from "@graphql-typed-document-node/core"; import { createMemoryHistory, createRootRoute, @@ -6,6 +10,7 @@ import { RouterProvider, } from "@tanstack/react-router"; import type { Decorator } from "@storybook/react-vite"; +import { Suspense } from "react"; // Catch-all route so any resolves without errors. const rootRoute = createRootRoute(); @@ -24,3 +29,73 @@ const router = createRouter({ export const withRouter: Decorator = (Story) => ( } /> ); + +// Mock Apollo client for stories. +// - useSuspenseFragment reads from this cache +// - useSuspenseQuery for useAuth() hits the mock link +const mockApolloClient = new ApolloClient({ + link: new ApolloLink( + (operation) => new Observable((observer) => { + const data: Record = {}; + // Provide mock data for the UserIdentity query used by useAuth() + if (operation.operationName === "UserIdentity") { + data.repository = { + __typename: "Repository", + userIdentity: { + __typename: "Identity", + id: "mock-user", + humanId: "mock1", + name: "Mock User", + displayName: "Mock User", + avatarUrl: null, + email: null, + login: null, + }, + }; + } + observer.next({ data }); + observer.complete(); + }), + ), + cache: new InMemoryCache({ + typePolicies: { + // Types without `id` need explicit keyFields so useSuspenseFragment + // can normalize and cache the mock data passed via `from`. + Label: { keyFields: ["name"] }, + GitBlob: { keyFields: ["hash"] }, + GitRefConnection: { keyFields: [] }, + BugTimelineItemConnection: { keyFields: [] }, + }, + }), + dataMasking: false, +}); + +// Wraps a story in an ApolloProvider. Components using useSuspenseFragment +// need their data pre-written to the cache via withCachedFragments(). +export const withApollo: Decorator = (Story) => ( + + Loading…}> + + + +); + +// Pre-writes fragment data into the Apollo cache so that useSuspenseFragment +// can read it without suspending. Call this in the story's decorators list +// AFTER withApollo. +// +// Usage: +// decorators: [withApollo, withCachedFragments( +// [MY_FRAGMENT, "MyFragment", myMockData], +// [MY_FRAGMENT, "MyFragment", anotherMockData], +// )] +export function withCachedFragments( + ...entries: Array<[fragment: TypedDocumentNode, fragmentName: string, data: Record]> +): Decorator { + return (Story) => { + for (const [fragment, fragmentName, data] of entries) { + mockApolloClient.cache.writeFragment({ fragment, fragmentName, data }); + } + return ; + }; +} diff --git a/webui2/.storybook/vitest.setup.ts b/webui2/.storybook/vitest.setup.ts index 253ffaec143ab40a97c2546685a7b65ed865443d..2f7b72f08c6a9e057e53210ca11af975403aa0b7 100644 --- a/webui2/.storybook/vitest.setup.ts +++ b/webui2/.storybook/vitest.setup.ts @@ -1,5 +1,5 @@ import { setProjectAnnotations } from "@storybook/react-vite"; -import { beforeAll } from "vitest"; +import { beforeAll, vi } from "vitest"; import * as previewAnnotations from "./preview"; @@ -8,3 +8,15 @@ import * as previewAnnotations from "./preview"; const annotations = setProjectAnnotations([previewAnnotations]); beforeAll(annotations.beforeAll); + +// Make useSuspenseFragment a passthrough in happy-dom snapshot tests. +// The real hook reads from the Apollo cache, which requires data to be +// written via a query first. In stories we pass mock objects directly, +// so we just return the `from` data as-is. +vi.mock("@apollo/client/react", async (importOriginal) => { + const mod = await importOriginal(); + return { + ...mod, + useSuspenseFragment: ({ from }: { from: unknown }) => ({ data: from }), + }; +}); diff --git a/webui2/COMPONENTS.md b/webui2/COMPONENTS.md new file mode 100644 index 0000000000000000000000000000000000000000..8a0b65c9ad7d1986992af0973c0eb33dc6e42639 --- /dev/null +++ b/webui2/COMPONENTS.md @@ -0,0 +1,89 @@ +# Component Status Tracker + +Status legend: done / partial / todo / n/a + +## Shared Components (`src/components/shared/`) + +| Component | Fragments | Split/Compound | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|-----------|----------------|---------|-------------------|---------------|-------| +| comment-card | done (`IdentitySummary`) | done (Root/AuthorAvatar/Card/CardHeader/CardBody) | done | n/a (display only) | done | Uses `withApollo` decorator | +| empty-state | n/a | n/a (simple wrapper) | done | n/a | done | | +| issue-filters | n/a (callbacks only) | todo (single export, complex) | done | todo (dropdowns, search, keyboard nav) | todo | Has complex floating-ui interactions, needs `withApollo` | +| issue-row | done (`BugSummary`, spreads `IdentitySummary`+`LabelFields`) | done (Root/StatusIcon/TitleArea/Meta/CommentCount) | done | n/a (display only) | done | Uses `withApollo` + `withRouter` | +| label-badge | done (`LabelFields`) | n/a | done | n/a | done | Uses `withApollo` decorator | +| pagination | n/a | done (Root/Info/Previous/Next) | done | n/a (links only) | done | | +| query-input | n/a | done (Root/Icon/Input/Completions) | done | partial (1 play function) | done | Complex autocomplete | +| section-heading | n/a | n/a | done | n/a | done | | +| status-badge | n/a | n/a | done | n/a | done | | +| status-tabs | n/a | done (Root/Tab/OpenIndicator/ClosedIndicator/Count) | done | n/a (links only) | done | | +| write-preview | n/a | done (Root/Tabs/WriteSlot/PreviewSlot) | done | partial (1 play function) | done | | + +## Bug Components (`src/components/bugs/`) + +| Component | Fragments | Split/Compound | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|-----------|----------------|---------|-------------------|---------------|-------| +| timeline | done (5 sub-fragments + connection) | done (internal sub-components use `useSuspenseFragment`) | done | todo (comment editing) | done | 4 stories: FullTimeline, CreateOnly, EmptyMessage, StatusReopen | +| comment-box | n/a (mutations only) | n/a | todo | todo (textarea, submit, status toggle) | todo | Uses `useAuth`, needs Apollo mock | +| title-editor | n/a (mutation only) | n/a | done | todo (inline edit, save/cancel, keyboard) | done | Uses `useAuth` | +| label-editor | partial (uses `LabelFields` via LabelBadge) | n/a | done | todo (dropdown, checkbox toggling) | todo | Demo story with local state | + +## Code Components (`src/components/code/`) + +| Component | Fragments | Split/Compound | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|-----------|----------------|---------|-------------------|---------------|-------| +| ref-selector | done (`RefSelectorRefs` on connection) | n/a | done | todo (dropdown, search, keyboard nav) | done | Uses `withApollo` decorator | +| file-viewer | done (`FileViewerBlob`) | n/a | done | todo (copy, line select, shift-click range) | done | Shiki WASM excluded from browser tests | +| file-tree | n/a (data from 2 queries, local interface) | n/a | done | n/a (links only) | done | | +| file-diff-view | todo (owns `DIFF_QUERY`, no fragment) | todo (Hunk is internal) | todo | todo (collapsible sections) | todo | | +| commit-list | todo (owns `COMMITS_QUERY`, no fragment) | todo (CommitRow is internal) | todo | todo (load more button) | todo | | +| code-breadcrumb | n/a | n/a | done | n/a (links only) | done | | + +## Content Components (`src/components/content/`) + +| Component | Fragments | Split/Compound | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|-----------|----------------|---------|-------------------|---------------|-------| +| markdown | n/a | n/a | done | n/a | done | | + +## Layout Components (`src/components/layout/`) + +| Component | Fragments | Split/Compound | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|-----------|----------------|---------|-------------------|---------------|-------| +| header | n/a | todo (RepoNav is internal) | todo | todo (theme toggle) | todo | Uses `useAuth` + router | +| shell | n/a | n/a | n/a (layout wrapper) | n/a | n/a | | + +## UI Primitives (`src/components/ui/`) + +All built on @base-ui/react. Fragment/split columns are n/a for these. + +| Component | Stories | Interaction Tests | Snapshot Tests | Notes | +|-----------|---------|-------------------|---------------|-------| +| avatar | done | n/a | done | Compound (Avatar/Image/Fallback/Badge/Group) | +| back-link | todo | n/a | todo | | +| badge | done | n/a | done | | +| button | done | n/a | done | | +| button-link | todo | n/a | todo | TanStack Router wrapper | +| input | done | n/a | done | | +| listbox | done | n/a | todo | Compound (Content/ScrollArea/Search/Group/Item/Empty) | +| popover | todo | n/a | todo | | +| separator | done | n/a | done | | +| skeleton | done | n/a | done | | +| textarea | done | n/a | done | | + +## Route Pages (no stories expected, but may need component extraction) + +| Route | Fragments | Extractable UI | Notes | +|-------|-----------|----------------|-------| +| `/$repo/_issues/issues/$id` | done (spreads BugSummary, IdentitySummary, TimelineItems) | todo: participants list | Accesses participant fields directly | +| `/$repo/_issues/issues/index` | done (spreads BugSummary) | todo: completion providers | Large file, complex query parsing | +| `/$repo/_issues/user/$id` | partial (spreads BugSummary, IdentitySummary) | todo: profile header | Accesses identity fields directly | +| `/$repo/_code/tree/$ref/$` | todo | n/a | Accesses tree/commit fields directly, data from 2 queries | +| `/$repo/commit/$hash` | todo | todo: commit header | Accesses all commit fields directly | +| `/$repo/_code` | done (uses RefSelectorRefs via preload) | n/a | Layout route | +| `/$repo/_issues` | done (preloads labels with LabelFields) | n/a | Layout route | +| `/$repo` | done (REFS_QUERY with RefSelectorRefs) | n/a | Layout route | + +## Infrastructure + +- **Apollo mock decorator** (`withApollo`): Provides mock `ApolloClient` with `dataMasking: false`, `keyFields` for Label/GitBlob/connections, and mock UserIdentity data for `useAuth()` +- **Router decorator** (`withRouter`): Provides catch-all TanStack Router for `` components +- **Snapshot setup** (`vitest.setup.ts`): Mocks `useSuspenseFragment` as passthrough for happy-dom diff --git a/webui2/codegen.ts b/webui2/codegen.ts index fbef3f70085fa9114cb654e5014305d7b705c076..0d0831539fe66650db0408704082b56249747b02 100644 --- a/webui2/codegen.ts +++ b/webui2/codegen.ts @@ -20,6 +20,11 @@ const config: CodegenConfig = { defaultScalarType: "unknown", nonOptionalTypename: true, skipTypeNameForRoot: true, + // Generate masked inline fragment types for Apollo's data masking + inlineFragmentTypes: "mask", + customDirectives: { + apolloUnmask: true, + }, scalars: { Time: "string", Hash: "string", diff --git a/webui2/src/__generated__/gql.ts b/webui2/src/__generated__/gql.ts index e86422b28394c00b80f6cf8f1d3de9f95cb824ce..bf801646c8b9c1226145de79c9b9638c9d0cec34 100644 --- a/webui2/src/__generated__/gql.ts +++ b/webui2/src/__generated__/gql.ts @@ -20,8 +20,8 @@ type Documents = { "\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": typeof types.BugStatusOpenDocument, "\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": typeof types.BugStatusCloseDocument, "\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n ...LabelFields\n }\n }\n }\n }\n": typeof types.BugChangeLabelsDocument, - "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugCreateCommentFieldsFragmentDoc, - "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugAddCommentFieldsFragmentDoc, + "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugCreateCommentFieldsFragmentDoc, + "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugAddCommentFieldsFragmentDoc, "\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n": typeof types.LabelChangeFieldsFragmentDoc, "\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n": typeof types.StatusChangeFieldsFragmentDoc, "\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n": typeof types.TitleChangeFieldsFragmentDoc, @@ -35,7 +35,7 @@ type Documents = { "\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n": typeof types.IdentitySummaryFragmentDoc, "\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n name\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n": typeof types.BugSummaryFragmentDoc, "\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n": typeof types.LabelFieldsFragmentDoc, - "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n": typeof types.UserIdentityDocument, + "\n query UserIdentity {\n repository {\n userIdentity {\n ...IdentitySummary\n id\n humanId\n displayName\n avatarUrl\n name\n email\n login\n }\n }\n }\n": typeof types.UserIdentityDocument, "\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n ...RefSelectorRefs\n }\n }\n }\n": typeof types.CodePageRefsDocument, "\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n ...FileViewerBlob\n }\n }\n }\n": typeof types.CodePageBlobDocument, "\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n": typeof types.CodePageTreeDocument, @@ -57,8 +57,8 @@ const documents: Documents = { "\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": types.BugStatusOpenDocument, "\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": types.BugStatusCloseDocument, "\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n ...LabelFields\n }\n }\n }\n }\n": types.BugChangeLabelsDocument, - "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugCreateCommentFieldsFragmentDoc, - "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugAddCommentFieldsFragmentDoc, + "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugCreateCommentFieldsFragmentDoc, + "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugAddCommentFieldsFragmentDoc, "\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n": types.LabelChangeFieldsFragmentDoc, "\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n": types.StatusChangeFieldsFragmentDoc, "\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n": types.TitleChangeFieldsFragmentDoc, @@ -72,7 +72,7 @@ const documents: Documents = { "\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n": types.IdentitySummaryFragmentDoc, "\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n name\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n": types.BugSummaryFragmentDoc, "\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n": types.LabelFieldsFragmentDoc, - "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n": types.UserIdentityDocument, + "\n query UserIdentity {\n repository {\n userIdentity {\n ...IdentitySummary\n id\n humanId\n displayName\n avatarUrl\n name\n email\n login\n }\n }\n }\n": types.UserIdentityDocument, "\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n ...RefSelectorRefs\n }\n }\n }\n": types.CodePageRefsDocument, "\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n ...FileViewerBlob\n }\n }\n }\n": types.CodePageBlobDocument, "\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n": types.CodePageTreeDocument, @@ -129,11 +129,11 @@ export function graphql(source: "\n mutation BugChangeLabels($input: BugChangeL /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; +export function graphql(source: "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; +export function graphql(source: "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n id\n author {\n id\n humanId\n displayName\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -189,7 +189,7 @@ export function graphql(source: "\n fragment LabelFields on Label {\n name\n /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n"): (typeof documents)["\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n"]; +export function graphql(source: "\n query UserIdentity {\n repository {\n userIdentity {\n ...IdentitySummary\n id\n humanId\n displayName\n avatarUrl\n name\n email\n login\n }\n }\n }\n"): (typeof documents)["\n query UserIdentity {\n repository {\n userIdentity {\n ...IdentitySummary\n id\n humanId\n displayName\n avatarUrl\n name\n email\n login\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/webui2/src/__generated__/graphql.ts b/webui2/src/__generated__/graphql.ts index 44b736f44adeb8b1949247dca059a774bd67b6b9..af1571754f967fcab0f002f9b1023df5dbcb19ae 100644 --- a/webui2/src/__generated__/graphql.ts +++ b/webui2/src/__generated__/graphql.ts @@ -1199,25 +1199,55 @@ export type BugChangeLabelsMutationVariables = Exact<{ }>; -export type BugChangeLabelsMutation = { bugChangeLabels: { __typename: 'BugChangeLabelPayload', bug: { __typename: 'Bug', id: string, labels: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }> } } }; +export type BugChangeLabelsMutation = { bugChangeLabels: { __typename: 'BugChangeLabelPayload', bug: { __typename: 'Bug', id: string, labels: Array<( + { __typename: 'Label', name: string } + & { ' $fragmentRefs'?: { 'LabelFieldsFragment': LabelFieldsFragment } } + )> } } }; -export type BugCreateCommentFieldsFragment = { __typename: 'BugCreateTimelineItem', message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } }; +export type BugCreateCommentFieldsFragment = { __typename: 'BugCreateTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: ( + { __typename: 'Identity', id: string, humanId: string, displayName: string } + & { ' $fragmentRefs'?: { 'IdentitySummaryFragment': IdentitySummaryFragment } } + ) } & { ' $fragmentName'?: 'BugCreateCommentFieldsFragment' }; -export type BugAddCommentFieldsFragment = { __typename: 'BugAddCommentTimelineItem', message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } }; +export type BugAddCommentFieldsFragment = { __typename: 'BugAddCommentTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: ( + { __typename: 'Identity', id: string, humanId: string, displayName: string } + & { ' $fragmentRefs'?: { 'IdentitySummaryFragment': IdentitySummaryFragment } } + ) } & { ' $fragmentName'?: 'BugAddCommentFieldsFragment' }; -export type LabelChangeFieldsFragment = { __typename: 'BugLabelChangeTimelineItem', date: string, author: { __typename: 'Identity', humanId: string, displayName: string }, added: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, removed: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }> }; +export type LabelChangeFieldsFragment = { __typename: 'BugLabelChangeTimelineItem', date: string, author: { __typename: 'Identity', humanId: string, displayName: string }, added: Array<( + { __typename: 'Label' } + & { ' $fragmentRefs'?: { 'LabelFieldsFragment': LabelFieldsFragment } } + )>, removed: Array<( + { __typename: 'Label' } + & { ' $fragmentRefs'?: { 'LabelFieldsFragment': LabelFieldsFragment } } + )> } & { ' $fragmentName'?: 'LabelChangeFieldsFragment' }; -export type StatusChangeFieldsFragment = { __typename: 'BugSetStatusTimelineItem', date: string, status: Status, author: { __typename: 'Identity', humanId: string, displayName: string } }; +export type StatusChangeFieldsFragment = { __typename: 'BugSetStatusTimelineItem', date: string, status: Status, author: { __typename: 'Identity', humanId: string, displayName: string } } & { ' $fragmentName'?: 'StatusChangeFieldsFragment' }; -export type TitleChangeFieldsFragment = { __typename: 'BugSetTitleTimelineItem', date: string, title: string, was: string, author: { __typename: 'Identity', humanId: string, displayName: string } }; +export type TitleChangeFieldsFragment = { __typename: 'BugSetTitleTimelineItem', date: string, title: string, was: string, author: { __typename: 'Identity', humanId: string, displayName: string } } & { ' $fragmentName'?: 'TitleChangeFieldsFragment' }; export type TimelineItemsFragment = { __typename: 'BugTimelineItemConnection', nodes: Array< - | { __typename: 'BugAddCommentTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } } - | { __typename: 'BugCreateTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } } - | { __typename: 'BugLabelChangeTimelineItem', id: string, date: string, author: { __typename: 'Identity', humanId: string, displayName: string }, added: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, removed: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }> } - | { __typename: 'BugSetStatusTimelineItem', id: string, date: string, status: Status, author: { __typename: 'Identity', humanId: string, displayName: string } } - | { __typename: 'BugSetTitleTimelineItem', id: string, date: string, title: string, was: string, author: { __typename: 'Identity', humanId: string, displayName: string } } - > }; + | ( + { __typename: 'BugAddCommentTimelineItem', id: string } + & { ' $fragmentRefs'?: { 'BugAddCommentFieldsFragment': BugAddCommentFieldsFragment } } + ) + | ( + { __typename: 'BugCreateTimelineItem', id: string } + & { ' $fragmentRefs'?: { 'BugCreateCommentFieldsFragment': BugCreateCommentFieldsFragment } } + ) + | ( + { __typename: 'BugLabelChangeTimelineItem', id: string } + & { ' $fragmentRefs'?: { 'LabelChangeFieldsFragment': LabelChangeFieldsFragment } } + ) + | ( + { __typename: 'BugSetStatusTimelineItem', id: string } + & { ' $fragmentRefs'?: { 'StatusChangeFieldsFragment': StatusChangeFieldsFragment } } + ) + | ( + { __typename: 'BugSetTitleTimelineItem', id: string } + & { ' $fragmentRefs'?: { 'TitleChangeFieldsFragment': TitleChangeFieldsFragment } } + ) + > } & { ' $fragmentName'?: 'TimelineItemsFragment' }; export type BugEditCommentMutationVariables = Exact<{ input: BugEditCommentInput; @@ -1253,27 +1283,39 @@ export type FileDiffQueryVariables = Exact<{ export type FileDiffQuery = { repository: { __typename: 'Repository', commit: { __typename: 'GitCommit', diff: { __typename: 'GitFileDiff', path: string, oldPath: string | null, isBinary: boolean, isNew: boolean, isDelete: boolean, hunks: Array<{ __typename: 'GitDiffHunk', oldStart: number, oldLines: number, newStart: number, newLines: number, lines: Array<{ __typename: 'GitDiffLine', type: GitDiffLineType, content: string, oldLine: number, newLine: number }> }> } | null } | null } | null }; -export type FileViewerBlobFragment = { __typename: 'GitBlob', path: string, hash: string, text: string | null, size: number, isBinary: boolean, isTruncated: boolean }; +export type FileViewerBlobFragment = { __typename: 'GitBlob', path: string, hash: string, text: string | null, size: number, isBinary: boolean, isTruncated: boolean } & { ' $fragmentName'?: 'FileViewerBlobFragment' }; -export type RefSelectorRefsFragment = { __typename: 'GitRefConnection', nodes: Array<{ __typename: 'GitRef', name: string, shortName: string, type: GitRefType }> }; +export type RefSelectorRefsFragment = { __typename: 'GitRefConnection', nodes: Array<{ __typename: 'GitRef', name: string, shortName: string, type: GitRefType }> } & { ' $fragmentName'?: 'RefSelectorRefsFragment' }; -export type IdentitySummaryFragment = { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }; +export type IdentitySummaryFragment = { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } & { ' $fragmentName'?: 'IdentitySummaryFragment' }; -export type BugSummaryFragment = { __typename: 'Bug', id: string, humanId: string, status: Status, title: string, createdAt: string, labels: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }, comments: { __typename: 'BugCommentConnection', totalCount: number } }; +export type BugSummaryFragment = { __typename: 'Bug', id: string, humanId: string, status: Status, title: string, createdAt: string, labels: Array<( + { __typename: 'Label', name: string } + & { ' $fragmentRefs'?: { 'LabelFieldsFragment': LabelFieldsFragment } } + )>, author: ( + { __typename: 'Identity' } + & { ' $fragmentRefs'?: { 'IdentitySummaryFragment': IdentitySummaryFragment } } + ), comments: { __typename: 'BugCommentConnection', totalCount: number } } & { ' $fragmentName'?: 'BugSummaryFragment' }; -export type LabelFieldsFragment = { __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }; +export type LabelFieldsFragment = { __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } } & { ' $fragmentName'?: 'LabelFieldsFragment' }; export type UserIdentityQueryVariables = Exact<{ [key: string]: never; }>; -export type UserIdentityQuery = { repository: { __typename: 'Repository', userIdentity: { __typename: 'Identity', id: string, humanId: string, name: string | null, displayName: string, avatarUrl: string | null, email: string | null, login: string | null } | null } | null }; +export type UserIdentityQuery = { repository: { __typename: 'Repository', userIdentity: ( + { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null, name: string | null, email: string | null, login: string | null } + & { ' $fragmentRefs'?: { 'IdentitySummaryFragment': IdentitySummaryFragment } } + ) | null } | null }; export type CodePageRefsQueryVariables = Exact<{ repo?: InputMaybe; }>; -export type CodePageRefsQuery = { repository: { __typename: 'Repository', name: string | null, head: { __typename: 'GitRef', shortName: string } | null, refs: { __typename: 'GitRefConnection', nodes: Array<{ __typename: 'GitRef', name: string, shortName: string, type: GitRefType }> } } | null }; +export type CodePageRefsQuery = { repository: { __typename: 'Repository', name: string | null, head: { __typename: 'GitRef', shortName: string } | null, refs: ( + { __typename: 'GitRefConnection' } + & { ' $fragmentRefs'?: { 'RefSelectorRefsFragment': RefSelectorRefsFragment } } + ) } | null }; export type CodePageBlobQueryVariables = Exact<{ repo?: InputMaybe; @@ -1282,7 +1324,10 @@ export type CodePageBlobQueryVariables = Exact<{ }>; -export type CodePageBlobQuery = { repository: { __typename: 'Repository', blob: { __typename: 'GitBlob', path: string, hash: string, text: string | null, size: number, isBinary: boolean, isTruncated: boolean } | null } | null }; +export type CodePageBlobQuery = { repository: { __typename: 'Repository', blob: ( + { __typename: 'GitBlob' } + & { ' $fragmentRefs'?: { 'FileViewerBlobFragment': FileViewerBlobFragment } } + ) | null } | null }; export type CodePageTreeQueryVariables = Exact<{ repo?: InputMaybe; @@ -1324,7 +1369,10 @@ export type ValidLabelsQueryVariables = Exact<{ }>; -export type ValidLabelsQuery = { repository: { __typename: 'Repository', validLabels: { __typename: 'LabelConnection', nodes: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }> } } | null }; +export type ValidLabelsQuery = { repository: { __typename: 'Repository', validLabels: { __typename: 'LabelConnection', nodes: Array<( + { __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } } + & { ' $fragmentRefs'?: { 'LabelFieldsFragment': LabelFieldsFragment } } + )> } } | null }; export type BugDetailQueryVariables = Exact<{ ref?: InputMaybe; @@ -1332,13 +1380,16 @@ export type BugDetailQueryVariables = Exact<{ }>; -export type BugDetailQuery = { repository: { __typename: 'Repository', bug: { __typename: 'Bug', lastEdit: string, id: string, humanId: string, status: Status, title: string, createdAt: string, participants: { __typename: 'IdentityConnection', nodes: Array<{ __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }> }, timeline: { __typename: 'BugTimelineItemConnection', nodes: Array< - | { __typename: 'BugAddCommentTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } } - | { __typename: 'BugCreateTimelineItem', id: string, message: string, createdAt: string, lastEdit: string, edited: boolean, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null } } - | { __typename: 'BugLabelChangeTimelineItem', id: string, date: string, author: { __typename: 'Identity', humanId: string, displayName: string }, added: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, removed: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }> } - | { __typename: 'BugSetStatusTimelineItem', id: string, date: string, status: Status, author: { __typename: 'Identity', humanId: string, displayName: string } } - | { __typename: 'BugSetTitleTimelineItem', id: string, date: string, title: string, was: string, author: { __typename: 'Identity', humanId: string, displayName: string } } - > }, labels: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }, comments: { __typename: 'BugCommentConnection', totalCount: number } } | null } | null }; +export type BugDetailQuery = { repository: { __typename: 'Repository', bug: ( + { __typename: 'Bug', lastEdit: string, participants: { __typename: 'IdentityConnection', nodes: Array<( + { __typename: 'Identity' } + & { ' $fragmentRefs'?: { 'IdentitySummaryFragment': IdentitySummaryFragment } } + )> }, timeline: ( + { __typename: 'BugTimelineItemConnection' } + & { ' $fragmentRefs'?: { 'TimelineItemsFragment': TimelineItemsFragment } } + ) } + & { ' $fragmentRefs'?: { 'BugSummaryFragment': BugSummaryFragment } } + ) | null } | null }; export type BugListQueryVariables = Exact<{ ref?: InputMaybe; @@ -1350,7 +1401,10 @@ export type BugListQueryVariables = Exact<{ }>; -export type BugListQuery = { repository: { __typename: 'Repository', openCount: { __typename: 'BugConnection', totalCount: number }, closedCount: { __typename: 'BugConnection', totalCount: number }, bugs: { __typename: 'BugConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, endCursor: string }, nodes: Array<{ __typename: 'Bug', id: string, humanId: string, status: Status, title: string, createdAt: string, labels: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }, comments: { __typename: 'BugCommentConnection', totalCount: number } }> } } | null }; +export type BugListQuery = { repository: { __typename: 'Repository', openCount: { __typename: 'BugConnection', totalCount: number }, closedCount: { __typename: 'BugConnection', totalCount: number }, bugs: { __typename: 'BugConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, endCursor: string }, nodes: Array<( + { __typename: 'Bug' } + & { ' $fragmentRefs'?: { 'BugSummaryFragment': BugSummaryFragment } } + )> } } | null }; export type BugCreateMutationVariables = Exact<{ input: BugCreateInput; @@ -1369,7 +1423,10 @@ export type UserProfileQueryVariables = Exact<{ }>; -export type UserProfileQuery = { repository: { __typename: 'Repository', identity: { __typename: 'Identity', id: string, humanId: string, name: string | null, email: string | null, login: string | null, displayName: string, avatarUrl: string | null, isProtected: boolean } | null, openCount: { __typename: 'BugConnection', totalCount: number }, closedCount: { __typename: 'BugConnection', totalCount: number }, bugs: { __typename: 'BugConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, endCursor: string }, nodes: Array<{ __typename: 'Bug', id: string, humanId: string, status: Status, title: string, createdAt: string, labels: Array<{ __typename: 'Label', name: string, color: { __typename: 'Color', R: number, G: number, B: number } }>, author: { __typename: 'Identity', id: string, humanId: string, displayName: string, avatarUrl: string | null }, comments: { __typename: 'BugCommentConnection', totalCount: number } }> } } | null }; +export type UserProfileQuery = { repository: { __typename: 'Repository', identity: { __typename: 'Identity', id: string, humanId: string, name: string | null, email: string | null, login: string | null, displayName: string, avatarUrl: string | null, isProtected: boolean } | null, openCount: { __typename: 'BugConnection', totalCount: number }, closedCount: { __typename: 'BugConnection', totalCount: number }, bugs: { __typename: 'BugConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, endCursor: string }, nodes: Array<( + { __typename: 'Bug' } + & { ' $fragmentRefs'?: { 'BugSummaryFragment': BugSummaryFragment } } + )> } } | null }; export type CommitPageDetailQueryVariables = Exact<{ repo?: InputMaybe; @@ -1385,13 +1442,13 @@ export type RepositoriesQueryVariables = Exact<{ [key: string]: never; }>; export type RepositoriesQuery = { repositories: { __typename: 'RepositoryConnection', totalCount: number, nodes: Array<{ __typename: 'Repository', name: string | null }> } }; export const IdentitySummaryFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; -export const BugCreateCommentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; -export const BugAddCommentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; +export const BugCreateCommentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; +export const BugAddCommentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; export const LabelFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}}]} as unknown as DocumentNode; export const LabelChangeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"added"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"removed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}}]} as unknown as DocumentNode; export const StatusChangeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StatusChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]} as unknown as DocumentNode; export const TitleChangeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TitleChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"was"}}]}}]} as unknown as DocumentNode; -export const TimelineItemsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TimelineItems"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugTimelineItemConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugCreateCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugAddCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StatusChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TitleChangeFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"added"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"removed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StatusChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TitleChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"was"}}]}}]} as unknown as DocumentNode; +export const TimelineItemsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TimelineItems"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugTimelineItemConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugCreateCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugAddCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StatusChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TitleChangeFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"added"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"removed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StatusChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TitleChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"was"}}]}}]} as unknown as DocumentNode; export const FileViewerBlobFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileViewerBlob"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GitBlob"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"hash"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"isBinary"}},{"kind":"Field","name":{"kind":"Name","value":"isTruncated"}}]}}]} as unknown as DocumentNode; export const RefSelectorRefsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RefSelectorRefs"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GitRefConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"shortName"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]} as unknown as DocumentNode; export const BugSummaryFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Bug"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"comments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; @@ -1405,7 +1462,7 @@ export const BugEditCommentDocument = {"kind":"Document","definitions":[{"kind": export const BugSetTitleDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BugSetTitle"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bugSetTitle"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bug"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]}}]} as unknown as DocumentNode; export const CommitListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CommitList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"path"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}},{"kind":"Argument","name":{"kind":"Name","value":"path"},"value":{"kind":"Variable","name":{"kind":"Name","value":"path"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hash"}},{"kind":"Field","name":{"kind":"Name","value":"shortHash"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"date"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const FileDiffDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FileDiff"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"hash"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"path"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commit"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"hash"},"value":{"kind":"Variable","name":{"kind":"Name","value":"hash"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"diff"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"path"},"value":{"kind":"Variable","name":{"kind":"Name","value":"path"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"oldPath"}},{"kind":"Field","name":{"kind":"Name","value":"isBinary"}},{"kind":"Field","name":{"kind":"Name","value":"isNew"}},{"kind":"Field","name":{"kind":"Name","value":"isDelete"}},{"kind":"Field","name":{"kind":"Name","value":"hunks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"oldStart"}},{"kind":"Field","name":{"kind":"Name","value":"oldLines"}},{"kind":"Field","name":{"kind":"Name","value":"newStart"}},{"kind":"Field","name":{"kind":"Name","value":"newLines"}},{"kind":"Field","name":{"kind":"Name","value":"lines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"oldLine"}},{"kind":"Field","name":{"kind":"Name","value":"newLine"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const UserIdentityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserIdentity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userIdentity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"login"}}]}}]}}]}}]} as unknown as DocumentNode; +export const UserIdentityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserIdentity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userIdentity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"login"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]} as unknown as DocumentNode; export const CodePageRefsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CodePageRefs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"head"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shortName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"refs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RefSelectorRefs"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RefSelectorRefs"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GitRefConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"shortName"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]}}]} as unknown as DocumentNode; export const CodePageBlobDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CodePageBlob"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"path"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blob"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}},{"kind":"Argument","name":{"kind":"Name","value":"path"},"value":{"kind":"Variable","name":{"kind":"Name","value":"path"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileViewerBlob"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileViewerBlob"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GitBlob"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"hash"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"isBinary"}},{"kind":"Field","name":{"kind":"Name","value":"isTruncated"}}]}}]} as unknown as DocumentNode; export const CodePageTreeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CodePageTree"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"path"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tree"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}},{"kind":"Argument","name":{"kind":"Name","value":"path"},"value":{"kind":"Variable","name":{"kind":"Name","value":"path"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"hash"}}]}}]}}]}}]} as unknown as DocumentNode; @@ -1413,7 +1470,7 @@ export const CodePageLastCommitsDocument = {"kind":"Document","definitions":[{"k export const CodePageReadmeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CodePageReadme"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"repo"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"path"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"repo"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blob"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}},{"kind":"Argument","name":{"kind":"Name","value":"path"},"value":{"kind":"Variable","name":{"kind":"Name","value":"path"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}}]}}]}}]} as unknown as DocumentNode; export const AllIdentitiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AllIdentities"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"allIdentities"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const ValidLabelsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ValidLabels"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"validLabels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}}]} as unknown as DocumentNode; -export const BugDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BugDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"prefix"},"value":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugSummary"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"20"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"timeline"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"250"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TimelineItems"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"added"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"removed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StatusChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TitleChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"was"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Bug"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"comments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TimelineItems"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugTimelineItemConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugCreateCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugAddCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StatusChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TitleChangeFields"}}]}}]}}]}}]} as unknown as DocumentNode; +export const BugDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BugDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"prefix"},"value":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugSummary"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"20"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"timeline"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"250"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TimelineItems"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugCreateCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugAddCommentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"lastEdit"}},{"kind":"Field","name":{"kind":"Name","value":"edited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"added"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"removed"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StatusChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TitleChangeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"was"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Bug"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"comments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TimelineItems"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugTimelineItemConnection"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugCreateCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugAddCommentTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugAddCommentFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugLabelChangeTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetStatusTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StatusChangeFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BugSetTitleTimelineItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TitleChangeFields"}}]}}]}}]}}]} as unknown as DocumentNode; export const BugListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BugList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"openQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"closedQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"listQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"openCount"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"openQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"closedCount"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"closedQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"bugs"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"listQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugSummary"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Bug"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"comments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; export const BugCreateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BugCreate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BugCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bugCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"bug"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}}]}}]}}]}}]} as unknown as DocumentNode; export const UserProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ref"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"openQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"closedQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"listQuery"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"repository"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ref"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ref"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"identity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"prefix"},"value":{"kind":"Variable","name":{"kind":"Name","value":"prefix"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isProtected"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"openCount"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"openQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"closedCount"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"closedQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"bugs"},"name":{"kind":"Name","value":"allBugs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"listQuery"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"25"}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BugSummary"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LabelFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Label"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"R"}},{"kind":"Field","name":{"kind":"Name","value":"G"}},{"kind":"Field","name":{"kind":"Name","value":"B"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"IdentitySummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Identity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BugSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Bug"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"humanId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LabelFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"IdentitySummary"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"comments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]} as unknown as DocumentNode; diff --git a/webui2/src/apollo-client.d.ts b/webui2/src/apollo-client.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..06ceeca075c1faee1a4e281e56a8973c69943798 --- /dev/null +++ b/webui2/src/apollo-client.d.ts @@ -0,0 +1,6 @@ +import "@apollo/client"; +import type { GraphQLCodegenDataMasking } from "@apollo/client/masking"; + +declare module "@apollo/client" { + interface TypeOverrides extends GraphQLCodegenDataMasking.TypeOverrides {} +} diff --git a/webui2/src/components/bugs/__snapshots__/timeline.test.tsx.snap b/webui2/src/components/bugs/__snapshots__/timeline.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..bf19d3bf6309529d3f2073a531cc3fd9e82cc90f --- /dev/null +++ b/webui2/src/components/bugs/__snapshots__/timeline.test.tsx.snap @@ -0,0 +1,637 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`Timeline/CreateOnly matches snapshot 1`] = ` +
+
+
+ + + JA + + +
+
+ + Jane Doe + + + 1 day ago + +
+
+
+

+ This is the + + initial bug report + + with some markdown. +

+ + +
    + + +
  • + Item 1 +
  • + + +
  • + Item 2 +
  • + + +
+
+
+
+
+
+
+`; + +exports[`Timeline/EmptyMessage matches snapshot 1`] = ` +
+
+
+ + + JA + + +
+
+ + Jane Doe + + + less than a minute ago + +
+
+

+ No description provided. +

+
+
+
+
+
+`; + +exports[`Timeline/FullTimeline matches snapshot 1`] = ` +
+
+
+ + + JA + + +
+
+ + Jane Doe + + + 1 day ago + +
+
+
+

+ This is the + + initial bug report + + with some markdown. +

+ + +
    + + +
  • + Item 1 +
  • + + +
  • + Item 2 +
  • + + +
+
+
+
+
+
+ + + + + + Bob Smith + + + added + + + bug + + + about 12 hours ago + +
+
+ + + BO + + +
+
+ + Bob Smith + + + about 6 hours ago + +
+
+
+

+ I can reproduce this. The issue is in the login handler. +

+
+
+
+
+
+ + + + + + Jane Doe + + + changed the title from + + Login page crash + + to + + + Login page crash on empty email input + + + about 2 hours ago + +
+
+ + + JA + + +
+
+ + Jane Doe + + + about 1 hour ago + + + edited + +
+
+
+

+ Fixed in commit abc123. The email validator was not handling empty strings. +

+
+
+
+
+
+ + + + + + Jane Doe + + + closed + this + + about 1 hour ago + +
+
+
+`; + +exports[`Timeline/StatusReopen matches snapshot 1`] = ` +
+
+
+ + + JA + + +
+
+ + Jane Doe + + + 1 day ago + +
+
+
+

+ This is the + + initial bug report + + with some markdown. +

+ + +
    + + +
  • + Item 1 +
  • + + +
  • + Item 2 +
  • + + +
+
+
+
+
+
+ + + + + + Bob Smith + + + closed + this + + about 2 hours ago + +
+
+ + + + + + Jane Doe + + + reopened + this + + about 1 hour ago + +
+
+
+`; diff --git a/webui2/src/components/bugs/__snapshots__/title-editor.test.tsx.snap b/webui2/src/components/bugs/__snapshots__/title-editor.test.tsx.snap new file mode 100644 index 0000000000000000000000000000000000000000..382d679574a0873f8f1cf1802eb7ed9c0d43bbe8 --- /dev/null +++ b/webui2/src/components/bugs/__snapshots__/title-editor.test.tsx.snap @@ -0,0 +1,91 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`TitleEditor/Default matches snapshot 1`] = ` +
+
+

+ Fix login page crash on empty email + + # + a1b2c3 + +

+ +
+
+`; + +exports[`TitleEditor/LongTitle matches snapshot 1`] = ` +
+
+

+ Very long issue title that spans multiple lines and tests how the component handles overflow in the layout + + # + d4e5f6 + +

+ +
+
+`; diff --git a/webui2/src/components/bugs/label-editor.stories.tsx b/webui2/src/components/bugs/label-editor.stories.tsx index 2b072ff48244adff0a5866a6234c6adbe13a2026..c44e6d3070d23b606480dbbbbff21576b09433d6 100644 --- a/webui2/src/components/bugs/label-editor.stories.tsx +++ b/webui2/src/components/bugs/label-editor.stories.tsx @@ -1,7 +1,9 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { useState } from "react"; -import { LabelBadge } from "@/components/shared/label-badge"; +import { makeFragmentData } from "@/__generated__/fragment-masking"; +import { withApollo, withCachedFragments } from "@/../.storybook/decorators"; +import { LabelBadge, LABEL_FIELDS_FRAGMENT } from "@/components/shared/label-badge"; import { SectionHeading } from "@/components/shared/section-heading"; import * as Listbox from "@/components/ui/listbox"; import { @@ -22,30 +24,38 @@ import { useRef } from "react"; // The real LabelEditor depends on GraphQL mutations. For stories, we build a // self-contained version with the same UI but local state instead of mutations. -const allLabels = [ - { name: "bug", color: { R: 252, G: 41, B: 41 } }, - { name: "enhancement", color: { R: 0, G: 150, B: 255 } }, - { name: "documentation", color: { R: 0, G: 180, B: 80 } }, - { name: "help wanted", color: { R: 255, G: 152, B: 0 } }, - { name: "good first issue", color: { R: 124, G: 58, B: 237 } }, +const allLabelsData = [ + { __typename: "Label" as const, name: "bug", color: { R: 252, G: 41, B: 41 } }, + { __typename: "Label" as const, name: "enhancement", color: { R: 0, G: 150, B: 255 } }, + { __typename: "Label" as const, name: "documentation", color: { R: 0, G: 180, B: 80 } }, + { __typename: "Label" as const, name: "help wanted", color: { R: 255, G: 152, B: 0 } }, + { __typename: "Label" as const, name: "good first issue", color: { R: 124, G: 58, B: 237 } }, ]; +const allLabels = allLabelsData.map( + (l) => ({ ...l, ...makeFragmentData(l, LABEL_FIELDS_FRAGMENT) }), +); + type LabelColor = { R: number; G: number; B: number }; +type BrandedLabel = (typeof allLabels)[number]; function LabelEditorDemo() { - const [current, setCurrent] = useState>([ - allLabels[0]!, - allLabels[2]!, - ]); - - const currentNames = new Set(current.map((l) => l.name)); + const [currentNames, setCurrentNames] = useState>( + new Set([allLabelsData[0]!.name, allLabelsData[2]!.name]), + ); - function toggleLabel(label: { name: string; color: LabelColor }) { - if (currentNames.has(label.name)) { - setCurrent((prev) => prev.filter((l) => l.name !== label.name)); - } else { - setCurrent((prev) => [...prev, label]); - } + const currentLabels = allLabels.filter((l) => currentNames.has(l.name)); + + function toggleLabel(label: { name: string }) { + setCurrentNames((prev) => { + const next = new Set(prev); + if (next.has(label.name)) { + next.delete(label.name); + } else { + next.add(label.name); + } + return next; + }); } const [open, setOpen] = useState(false); @@ -120,7 +130,7 @@ function LabelEditorDemo() { : {} } /> - + ); })} @@ -130,12 +140,12 @@ function LabelEditorDemo() { )} - {current.length === 0 ? ( + {currentLabels.length === 0 ? (

None yet

) : (
- {current.map((label) => ( - + {currentLabels.map((label) => ( + ))}
)} @@ -144,13 +154,17 @@ function LabelEditorDemo() { } const meta = { - title: "bugs/LabelEditor", + component: LabelEditorDemo, + decorators: [ + withApollo, + withCachedFragments( + ...allLabelsData.map((l) => [LABEL_FIELDS_FRAGMENT, "LabelFields", l] as const), + ), + ], parameters: { layout: "centered", a11y: { disable: true } }, -} satisfies Meta; +} satisfies Meta; export default meta; type Story = StoryObj; -export const Default: Story = { - render: () => , -}; +export const Default: Story = {}; diff --git a/webui2/src/components/bugs/label-editor.tsx b/webui2/src/components/bugs/label-editor.tsx index 8a4286183fce750e38142213ab3249289ca0b6a9..1b0d5997c9a2aafe721e1ae6ed9e93c063724d53 100644 --- a/webui2/src/components/bugs/label-editor.tsx +++ b/webui2/src/components/bugs/label-editor.tsx @@ -14,7 +14,7 @@ import { import { Settings2 } from "lucide-react"; import { useRef, useState } from "react"; -import type { FragmentType } from "@apollo/client/masking"; +import type { FragmentType } from "@/__generated__/fragment-masking"; import { BugDetailDocument } from "@/__generated__/graphql"; import { graphql } from "@/__generated__/gql"; import * as Listbox from "@/components/ui/listbox"; diff --git a/webui2/src/components/bugs/timeline.stories.tsx b/webui2/src/components/bugs/timeline.stories.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b76415cf8b2b9f34c11324cd2a3f07ba9fc48b9b --- /dev/null +++ b/webui2/src/components/bugs/timeline.stories.tsx @@ -0,0 +1,173 @@ +import type { Meta, StoryObj } from "@storybook/react-vite"; + +import { makeFragmentData } from "@/__generated__/fragment-masking"; +import { Status } from "@/__generated__/graphql"; +import { withApollo, withCachedFragments, withRouter } from "@/../.storybook/decorators"; + +import { Timeline, TIMELINE_ITEMS_FRAGMENT } from "./timeline"; + +const meta = { + component: Timeline, + decorators: [withRouter, withApollo], + parameters: { a11y: { disable: true } }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +const jane = { + __typename: "Identity" as const, + id: "u1", + humanId: "jane1", + displayName: "Jane Doe", + avatarUrl: null, +}; + +const bob = { + __typename: "Identity" as const, + id: "u2", + humanId: "bob1", + displayName: "Bob Smith", + avatarUrl: "https://github.com/shadcn.png", +}; + +const baseTimelineData = { + __typename: "BugTimelineItemConnection" as const, + nodes: [ + { + __typename: "BugCreateTimelineItem" as const, + id: "create-1", + author: jane, + message: "This is the **initial bug report** with some markdown.\n\n- Item 1\n- Item 2", + createdAt: new Date(Date.now() - 86400 * 1000).toISOString(), + lastEdit: new Date(Date.now() - 86400 * 1000).toISOString(), + edited: false, + }, + { + __typename: "BugLabelChangeTimelineItem" as const, + id: "label-1", + author: { humanId: "bob1", displayName: "Bob Smith" }, + date: new Date(Date.now() - 43200 * 1000).toISOString(), + added: [{ __typename: "Label" as const, name: "bug", color: { R: 252, G: 41, B: 41 } }], + removed: [], + }, + { + __typename: "BugAddCommentTimelineItem" as const, + id: "comment-1", + author: bob, + message: "I can reproduce this. The issue is in the login handler.", + createdAt: new Date(Date.now() - 21600 * 1000).toISOString(), + lastEdit: new Date(Date.now() - 21600 * 1000).toISOString(), + edited: false, + }, + { + __typename: "BugSetTitleTimelineItem" as const, + id: "title-1", + author: { humanId: "jane1", displayName: "Jane Doe" }, + date: new Date(Date.now() - 7200 * 1000).toISOString(), + title: "Login page crash on empty email input", + was: "Login page crash", + }, + { + __typename: "BugAddCommentTimelineItem" as const, + id: "comment-2", + author: jane, + message: "Fixed in commit abc123. The email validator was not handling empty strings.", + createdAt: new Date(Date.now() - 3600 * 1000).toISOString(), + lastEdit: new Date(Date.now() - 1800 * 1000).toISOString(), + edited: true, + }, + { + __typename: "BugSetStatusTimelineItem" as const, + id: "status-1", + author: { humanId: "jane1", displayName: "Jane Doe" }, + date: new Date(Date.now() - 3600 * 1000).toISOString(), + status: Status.Closed, + }, + ], +}; + +const baseTimeline = makeFragmentData(baseTimelineData, TIMELINE_ITEMS_FRAGMENT); + +export const FullTimeline: Story = { + decorators: [withCachedFragments([TIMELINE_ITEMS_FRAGMENT, "TimelineItems", baseTimelineData])], + args: { + repo: "_", + bugPrefix: "abc123", + timeline: baseTimeline, + }, +}; + +const createOnlyTimelineData = { + __typename: "BugTimelineItemConnection" as const, + nodes: [baseTimelineData.nodes[0]], +}; + +const createOnlyTimeline = makeFragmentData(createOnlyTimelineData, TIMELINE_ITEMS_FRAGMENT); + +export const CreateOnly: Story = { + decorators: [withCachedFragments([TIMELINE_ITEMS_FRAGMENT, "TimelineItems", createOnlyTimelineData])], + args: { + repo: "_", + bugPrefix: "abc123", + timeline: createOnlyTimeline, + }, +}; + +const emptyMessageTimelineData = { + __typename: "BugTimelineItemConnection" as const, + nodes: [ + { + __typename: "BugCreateTimelineItem" as const, + id: "create-empty", + author: jane, + message: "", + createdAt: new Date().toISOString(), + lastEdit: new Date().toISOString(), + edited: false, + }, + ], +}; + +const emptyMessageTimeline = makeFragmentData(emptyMessageTimelineData, TIMELINE_ITEMS_FRAGMENT); + +export const EmptyMessage: Story = { + decorators: [withCachedFragments([TIMELINE_ITEMS_FRAGMENT, "TimelineItems", emptyMessageTimelineData])], + args: { + repo: "_", + bugPrefix: "abc123", + timeline: emptyMessageTimeline, + }, +}; + +const statusReopenTimelineData = { + __typename: "BugTimelineItemConnection" as const, + nodes: [ + baseTimelineData.nodes[0], + { + __typename: "BugSetStatusTimelineItem" as const, + id: "status-close", + author: { humanId: "bob1", displayName: "Bob Smith" }, + date: new Date(Date.now() - 7200 * 1000).toISOString(), + status: Status.Closed, + }, + { + __typename: "BugSetStatusTimelineItem" as const, + id: "status-reopen", + author: { humanId: "jane1", displayName: "Jane Doe" }, + date: new Date(Date.now() - 3600 * 1000).toISOString(), + status: Status.Open, + }, + ], +}; + +const statusReopenTimeline = makeFragmentData(statusReopenTimelineData, TIMELINE_ITEMS_FRAGMENT); + +export const StatusReopen: Story = { + decorators: [withCachedFragments([TIMELINE_ITEMS_FRAGMENT, "TimelineItems", statusReopenTimelineData])], + args: { + repo: "_", + bugPrefix: "abc123", + timeline: statusReopenTimeline, + }, +}; diff --git a/webui2/src/components/bugs/timeline.test.tsx b/webui2/src/components/bugs/timeline.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a0c6baf39b159ea63adc18d7958a21594bed960b --- /dev/null +++ b/webui2/src/components/bugs/timeline.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./timeline.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`Timeline/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/bugs/timeline.tsx b/webui2/src/components/bugs/timeline.tsx index 6ae87c1daf1c2e5f6ed23ee446c96a0c3e9ee78f..113cad566e43c93897e985da79154730791b3626 100644 --- a/webui2/src/components/bugs/timeline.tsx +++ b/webui2/src/components/bugs/timeline.tsx @@ -1,5 +1,6 @@ -import { useMutation, useSuspenseFragment } from "@apollo/client/react"; -import type { FragmentType } from "@apollo/client/masking"; +import { useMutation } from "@apollo/client/react"; +import type { ResultOf } from "@graphql-typed-document-node/core"; +import { useFragment, type FragmentType } from "@/__generated__/fragment-masking"; import { Link } from "@tanstack/react-router"; import { formatDistanceToNow } from "date-fns"; import { Tag, GitPullRequestClosed, Pencil, CircleDot } from "lucide-react"; @@ -14,9 +15,15 @@ import { LabelBadge } from "@/components/shared/label-badge"; import { Textarea } from "@/components/ui/textarea"; import { useAuth } from "@/lib/auth"; -graphql(` +// ── Sub-fragments ──────────────────────────────────────────────────────────── + +const BUG_CREATE_COMMENT_FRAGMENT = graphql(` fragment BugCreateCommentFields on BugCreateTimelineItem { + id author { + id + humanId + displayName ...IdentitySummary } message @@ -26,9 +33,13 @@ graphql(` } `); -graphql(` +const BUG_ADD_COMMENT_FRAGMENT = graphql(` fragment BugAddCommentFields on BugAddCommentTimelineItem { + id author { + id + humanId + displayName ...IdentitySummary } message @@ -38,7 +49,7 @@ graphql(` } `); -graphql(` +const LABEL_CHANGE_FRAGMENT = graphql(` fragment LabelChangeFields on BugLabelChangeTimelineItem { author { humanId @@ -54,7 +65,7 @@ graphql(` } `); -graphql(` +const STATUS_CHANGE_FRAGMENT = graphql(` fragment StatusChangeFields on BugSetStatusTimelineItem { author { humanId @@ -65,7 +76,7 @@ graphql(` } `); -graphql(` +const TITLE_CHANGE_FRAGMENT = graphql(` fragment TitleChangeFields on BugSetTitleTimelineItem { author { humanId @@ -77,6 +88,8 @@ graphql(` } `); +// ── Connection-level fragment ──────────────────────────────────────────────── + export const TIMELINE_ITEMS_FRAGMENT = graphql(` fragment TimelineItems on BugTimelineItemConnection { nodes { @@ -101,6 +114,8 @@ export const TIMELINE_ITEMS_FRAGMENT = graphql(` } `); +// ── Mutation ───────────────────────────────────────────────────────────────── + const BUG_EDIT_COMMENT_MUTATION = graphql(` mutation BugEditComment($input: BugEditCommentInput!) { bugEditComment(input: $input) { @@ -111,11 +126,13 @@ const BUG_EDIT_COMMENT_MUTATION = graphql(` } `); -type TimelineData = ReturnType< - typeof useSuspenseFragment ->["data"]; +// ── Type helpers ───────────────────────────────────────────────────────────── + +type TimelineData = ResultOf; type TimelineNode = TimelineData["nodes"][number]; +// ── Timeline ───────────────────────────────────────────────────────────────── + interface TimelineProps { repo: string | null; bugPrefix: string; @@ -126,18 +143,16 @@ interface TimelineProps { // inline events (label changes, status changes, title edits). Comment items // support inline editing for the logged-in user. export function Timeline({ repo, bugPrefix, timeline }: TimelineProps) { - const { data } = useSuspenseFragment({ - fragment: TIMELINE_ITEMS_FRAGMENT, - from: timeline, - }); + const data = useFragment(TIMELINE_ITEMS_FRAGMENT, timeline); return (
{data.nodes.map((item) => { switch (item.__typename) { case "BugCreateTimelineItem": + return ; case "BugAddCommentTimelineItem": - return ; + return ; case "BugLabelChangeTimelineItem": return ; case "BugSetStatusTimelineItem": @@ -152,19 +167,28 @@ export function Timeline({ repo, bugPrefix, timeline }: TimelineProps) { ); } -// ── Comment (create or add-comment) ────────────────────────────────────────── +// ── Comment items ──────────────────────────────────────────────────────────── -type CommentItem = Extract< - TimelineNode, - { __typename: "BugCreateTimelineItem" | "BugAddCommentTimelineItem" } ->; +type CreateNode = Extract; +type AddCommentNode = Extract; +type CommentData = ResultOf; + +function CreateCommentItem({ item, bugPrefix, repo }: { item: CreateNode; bugPrefix: string; repo: string | null }) { + const data = useFragment(BUG_CREATE_COMMENT_FRAGMENT, item); + return ; +} + +function AddCommentItem({ item, bugPrefix, repo }: { item: AddCommentNode; bugPrefix: string; repo: string | null }) { + const data = useFragment(BUG_ADD_COMMENT_FRAGMENT, item); + return ; +} -function CommentItem({ - item, +function CommentBody({ + data: item, bugPrefix, repo, }: { - item: CommentItem; + data: CommentData; bugPrefix: string; repo: string | null; }) { @@ -258,11 +282,11 @@ function CommentItem({ ); } -// ── Inline events ───────────────────────────────────────────────────────────── +// ── Inline events ──────────────────────────────────────────────────────────── -type LabelChangeItem = Extract; -type StatusChangeItem = Extract; -type TitleChangeItem = Extract; +type LabelChangeNode = Extract; +type StatusChangeNode = Extract; +type TitleChangeNode = Extract; function EventRow({ icon, children }: { icon: React.ReactNode; children: React.ReactNode }) { return ( @@ -273,42 +297,44 @@ function EventRow({ icon, children }: { icon: React.ReactNode; children: React.R ); } -function LabelChangeItem({ item, repo }: { item: LabelChangeItem; repo: string | null }) { +function LabelChangeItem({ item, repo }: { item: LabelChangeNode; repo: string | null }) { + const data = useFragment(LABEL_CHANGE_FRAGMENT, item); return ( }> - {item.author.displayName} + {data.author.displayName} {" "} - {item.added.length > 0 && ( + {data.added.length > 0 && ( <> added{" "} - {item.added.map((l, i) => ( + {data.added.map((l, i) => ( ))}{" "} )} - {item.removed.length > 0 && ( + {data.removed.length > 0 && ( <> removed{" "} - {item.removed.map((l, i) => ( + {data.removed.map((l, i) => ( ))}{" "} )} - {formatDistanceToNow(new Date(item.date), { addSuffix: true })} + {formatDistanceToNow(new Date(data.date), { addSuffix: true })} ); } -function StatusChangeItem({ item, repo }: { item: StatusChangeItem; repo: string | null }) { - const isOpen = item.status === Status.Open; +function StatusChangeItem({ item, repo }: { item: StatusChangeNode; repo: string | null }) { + const data = useFragment(STATUS_CHANGE_FRAGMENT, item); + const isOpen = data.status === Status.Open; return ( - {item.author.displayName} + {data.author.displayName} {" "} {isOpen ? "reopened" : "closed"} this{" "} - {formatDistanceToNow(new Date(item.date), { addSuffix: true })} + {formatDistanceToNow(new Date(data.date), { addSuffix: true })} ); } -function TitleChangeItem({ item, repo }: { item: TitleChangeItem; repo: string | null }) { +function TitleChangeItem({ item, repo }: { item: TitleChangeNode; repo: string | null }) { + const data = useFragment(TITLE_CHANGE_FRAGMENT, item); return ( }> - {item.author.displayName} + {data.author.displayName} {" "} - changed the title from {item.was} to{" "} - {item.title}{" "} - {formatDistanceToNow(new Date(item.date), { addSuffix: true })} + changed the title from {data.was} to{" "} + {data.title}{" "} + {formatDistanceToNow(new Date(data.date), { addSuffix: true })} ); diff --git a/webui2/src/components/bugs/title-editor.stories.tsx b/webui2/src/components/bugs/title-editor.stories.tsx new file mode 100644 index 0000000000000000000000000000000000000000..6e399c10fb9e8442f9ba66df5674fcf4755ba901 --- /dev/null +++ b/webui2/src/components/bugs/title-editor.stories.tsx @@ -0,0 +1,29 @@ +import type { Meta, StoryObj } from "@storybook/react-vite"; + +import { withApollo } from "@/../.storybook/decorators"; + +import { TitleEditor } from "./title-editor"; + +const meta = { + component: TitleEditor, + decorators: [withApollo], +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + bugPrefix: "abc123", + title: "Fix login page crash on empty email", + humanId: "a1b2c3", + }, +}; + +export const LongTitle: Story = { + args: { + bugPrefix: "def456", + title: "Very long issue title that spans multiple lines and tests how the component handles overflow in the layout", + humanId: "d4e5f6", + }, +}; diff --git a/webui2/src/components/bugs/title-editor.test.tsx b/webui2/src/components/bugs/title-editor.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d1c70f3cf9d9e24c27ad5d36862dceb02069469a --- /dev/null +++ b/webui2/src/components/bugs/title-editor.test.tsx @@ -0,0 +1,13 @@ +import { composeStories } from "@storybook/react-vite"; +import { expect, test } from "vitest"; + +import * as stories from "./title-editor.stories"; + +const composed = composeStories(stories); + +for (const [name, Story] of Object.entries(composed)) { + test(`TitleEditor/${name} matches snapshot`, async () => { + await Story.run(); + expect(document.body.firstChild).toMatchSnapshot(); + }); +} diff --git a/webui2/src/components/code/__snapshots__/file-viewer.test.tsx.snap b/webui2/src/components/code/__snapshots__/file-viewer.test.tsx.snap index 54b61d3b1f5a263d014ee6bd852b8d10787723da..eab725ad02f3f07ed1267c37dbd08f7efd44581c 100644 --- a/webui2/src/components/code/__snapshots__/file-viewer.test.tsx.snap +++ b/webui2/src/components/code/__snapshots__/file-viewer.test.tsx.snap @@ -60,23 +60,117 @@ exports[`FileViewer/BinaryFile matches snapshot 1`] = ` exports[`FileViewer/Loading matches snapshot 1`] = `
+ class="flex flex-col items-end gap-1 px-3 py-3" + > +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webui2/src/components/code/file-viewer.stories.tsx b/webui2/src/components/code/file-viewer.stories.tsx index 648a3511e55bacf74a630f6a6fe44fe4fc0d7aa5..107a3c9757e6db075d6ff55077a6b6810e1a67c2 100644 --- a/webui2/src/components/code/file-viewer.stories.tsx +++ b/webui2/src/components/code/file-viewer.stories.tsx @@ -1,21 +1,14 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; -import { FileViewer } from "./file-viewer"; +import { makeFragmentData } from "@/__generated__/fragment-masking"; +import { withApollo, withCachedFragments } from "@/../.storybook/decorators"; +import { Skeleton } from "@/components/ui/skeleton"; -const meta = { - component: FileViewer, - // Skip browser tests — Shiki's WASM engine doesn't load in Vitest browser mode. - // Snapshot tests (happy-dom) still cover this component. - tags: ["!test"], -} satisfies Meta; +import { FileViewer, FILE_VIEWER_BLOB_FRAGMENT } from "./file-viewer"; -export default meta; -type Story = StoryObj; - -export const TypeScriptFile: Story = { - args: { - blob: { - text: `import { useState } from "react"; +const typescriptBlobData = { + __typename: "GitBlob" as const, + text: `import { useState } from "react"; interface CounterProps { initial?: number; @@ -33,43 +26,91 @@ export function Counter({ initial = 0 }: CounterProps) {
); }`, - hash: "abc123", - path: "src/Counter.tsx", - size: 312, - isBinary: false, - isTruncated: false, - }, + hash: "abc123", + path: "src/Counter.tsx", + size: 312, + isBinary: false, + isTruncated: false, +}; + +const binaryBlobData = { + __typename: "GitBlob" as const, + text: null, + hash: "def456", + path: "logo.png", + size: 24576, + isBinary: true, + isTruncated: false, +}; + +const truncatedBlobData = { + __typename: "GitBlob" as const, + text: "line 1\nline 2\nline 3\n... (truncated)", + hash: "ghi789", + path: "large-file.log", + size: 1048576, + isBinary: false, + isTruncated: true, +}; + +const meta = { + component: FileViewer, + decorators: [ + withApollo, + withCachedFragments( + [FILE_VIEWER_BLOB_FRAGMENT, "FileViewerBlob", typescriptBlobData], + [FILE_VIEWER_BLOB_FRAGMENT, "FileViewerBlob", binaryBlobData], + [FILE_VIEWER_BLOB_FRAGMENT, "FileViewerBlob", truncatedBlobData], + ), + ], + // Skip browser tests — Shiki's WASM engine doesn't load in Vitest browser mode. + // Snapshot tests (happy-dom) still cover this component. + tags: ["!test"], +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +const typescriptBlob = makeFragmentData(typescriptBlobData, FILE_VIEWER_BLOB_FRAGMENT); +const binaryBlob = makeFragmentData(binaryBlobData, FILE_VIEWER_BLOB_FRAGMENT); +const truncatedBlob = makeFragmentData(truncatedBlobData, FILE_VIEWER_BLOB_FRAGMENT); + +export const TypeScriptFile: Story = { + args: { + blob: typescriptBlob, }, }; export const BinaryFile: Story = { args: { - blob: { - text: null, - hash: "def456", - path: "logo.png", - size: 24576, - isBinary: true, - isTruncated: false, - }, + blob: binaryBlob, }, }; export const TruncatedFile: Story = { args: { - blob: { - text: "line 1\nline 2\nline 3\n... (truncated)", - hash: "ghi789", - path: "large-file.log", - size: 1048576, - isBinary: false, - isTruncated: true, - }, + blob: truncatedBlob, }, }; export const Loading: Story = { - args: { - blob: null, - }, + render: () => ( +
+
+ +
+
+
+ {Array.from({ length: 10 }).map((_, i) => ( + + ))} +
+
+ {Array.from({ length: 10 }).map((_, i) => ( + + ))} +
+
+
+ ), }; diff --git a/webui2/src/components/code/file-viewer.tsx b/webui2/src/components/code/file-viewer.tsx index 07bc28b2818a052ef4d039b35f2c66834cf8119b..8ed067b55af6f43cc638c7ed2840ff9dec705ba9 100644 --- a/webui2/src/components/code/file-viewer.tsx +++ b/webui2/src/components/code/file-viewer.tsx @@ -8,8 +8,7 @@ import { useState, useEffect, useCallback, Fragment, type ReactNode } from "reac import { jsx, jsxs } from "react/jsx-runtime"; import type { ShikiTransformer } from "shiki/core"; -import { useSuspenseFragment } from "@apollo/client/react"; -import type { FragmentType } from "@apollo/client/masking"; +import { useFragment, type FragmentType } from "@/__generated__/fragment-masking"; import { graphql } from "@/__generated__/gql"; import { Button } from "@/components/ui/button"; @@ -142,10 +141,7 @@ interface FileViewerProps { } export function FileViewer({ blob: blobProp }: FileViewerProps) { - const { data: blob } = useSuspenseFragment({ - fragment: FILE_VIEWER_BLOB_FRAGMENT, - from: blobProp, - }); + const blob = useFragment(FILE_VIEWER_BLOB_FRAGMENT, blobProp); const [highlighted, setHighlighted] = useState<{ node: ReactNode; lineCount: number } | null>( null, diff --git a/webui2/src/components/code/ref-selector.stories.tsx b/webui2/src/components/code/ref-selector.stories.tsx index 1bc37daf722828aa1caeace4af12335e86a9c5fa..8e94e38eb975d63f237559f5906887306b90e7c7 100644 --- a/webui2/src/components/code/ref-selector.stories.tsx +++ b/webui2/src/components/code/ref-selector.stories.tsx @@ -1,31 +1,51 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { fn } from "storybook/test"; +import { makeFragmentData } from "@/__generated__/fragment-masking"; import { GitRefType } from "@/__generated__/graphql"; +import { withApollo, withCachedFragments } from "@/../.storybook/decorators"; -import { RefSelector } from "./ref-selector"; +import { RefSelector, REF_SELECTOR_REFS_FRAGMENT } from "./ref-selector"; + +const sampleRefsData = { + __typename: "GitRefConnection" as const, + nodes: [ + { name: "refs/heads/main", shortName: "main", type: GitRefType.Branch }, + { name: "refs/heads/develop", shortName: "develop", type: GitRefType.Branch }, + { name: "refs/heads/feature/auth", shortName: "feature/auth", type: GitRefType.Branch }, + { name: "refs/heads/fix/login", shortName: "fix/login", type: GitRefType.Branch }, + { name: "refs/tags/v1.0.0", shortName: "v1.0.0", type: GitRefType.Tag }, + { name: "refs/tags/v1.1.0", shortName: "v1.1.0", type: GitRefType.Tag }, + { name: "refs/tags/v2.0.0-rc1", shortName: "v2.0.0-rc1", type: GitRefType.Tag }, + ], +}; + +const branchesOnlyData = { + __typename: "GitRefConnection" as const, + nodes: sampleRefsData.nodes.filter((r) => r.type === GitRefType.Branch), +}; + +const sampleRefs = makeFragmentData(sampleRefsData, REF_SELECTOR_REFS_FRAGMENT); +const branchesOnly = makeFragmentData(branchesOnlyData, REF_SELECTOR_REFS_FRAGMENT); const meta = { component: RefSelector, + decorators: [ + withApollo, + withCachedFragments( + [REF_SELECTOR_REFS_FRAGMENT, "RefSelectorRefs", sampleRefsData], + [REF_SELECTOR_REFS_FRAGMENT, "RefSelectorRefs", branchesOnlyData], + ), + ], parameters: { a11y: { disable: true } }, } satisfies Meta; export default meta; type Story = StoryObj; -const sampleRefs = [ - { name: "refs/heads/main", shortName: "main", type: GitRefType.Branch, hash: "abc1" }, - { name: "refs/heads/develop", shortName: "develop", type: GitRefType.Branch, hash: "abc2" }, - { name: "refs/heads/feature/auth", shortName: "feature/auth", type: GitRefType.Branch, hash: "abc3" }, - { name: "refs/heads/fix/login", shortName: "fix/login", type: GitRefType.Branch, hash: "abc4" }, - { name: "refs/tags/v1.0.0", shortName: "v1.0.0", type: GitRefType.Tag, hash: "abc5" }, - { name: "refs/tags/v1.1.0", shortName: "v1.1.0", type: GitRefType.Tag, hash: "abc6" }, - { name: "refs/tags/v2.0.0-rc1", shortName: "v2.0.0-rc1", type: GitRefType.Tag, hash: "abc7" }, -]; - export const Default: Story = { args: { - gitRefs: sampleRefs, + refs: sampleRefs, currentRef: "main", onSelect: fn(), }, @@ -33,7 +53,7 @@ export const Default: Story = { export const OnTag: Story = { args: { - gitRefs: sampleRefs, + refs: sampleRefs, currentRef: "v1.1.0", onSelect: fn(), }, @@ -41,7 +61,7 @@ export const OnTag: Story = { export const BranchesOnly: Story = { args: { - gitRefs: sampleRefs.filter((r) => r.type === GitRefType.Branch), + refs: branchesOnly, currentRef: "develop", onSelect: fn(), }, diff --git a/webui2/src/components/code/ref-selector.tsx b/webui2/src/components/code/ref-selector.tsx index 931fb7e55e8f4203b48050444191a48e98e036c2..dabf937bca7a5ca4a021e0501086c871eeb837dd 100644 --- a/webui2/src/components/code/ref-selector.tsx +++ b/webui2/src/components/code/ref-selector.tsx @@ -1,5 +1,4 @@ -import { useSuspenseFragment } from "@apollo/client/react"; -import type { FragmentType } from "@apollo/client/masking"; +import { useFragment, type FragmentType } from "@/__generated__/fragment-masking"; import { useFloating, useClick, @@ -40,7 +39,7 @@ interface RefSelectorProps { // Branch / tag selector dropdown for the code browser. Shown in two groups // (branches, tags) with an inline search filter. export function RefSelector({ refs: refsProp, currentRef, onSelect }: RefSelectorProps) { - const { data } = useSuspenseFragment({ fragment: REF_SELECTOR_REFS_FRAGMENT, from: refsProp }); + const data = useFragment(REF_SELECTOR_REFS_FRAGMENT, refsProp); const gitRefs = data.nodes; const [open, setOpen] = useState(false); diff --git a/webui2/src/components/shared/comment-card.stories.tsx b/webui2/src/components/shared/comment-card.stories.tsx index a6afa30e0db22e14e253bf6dd9dd14545321d4cb..f8e588f0c87ff2e3976c5e1a15a858a21f818fbc 100644 --- a/webui2/src/components/shared/comment-card.stories.tsx +++ b/webui2/src/components/shared/comment-card.stories.tsx @@ -1,47 +1,63 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; -import type { IdentitySummaryFragment } from "@/__generated__/graphql"; +import { makeFragmentData } from "@/__generated__/fragment-masking"; +import { withApollo, withCachedFragments } from "@/../.storybook/decorators"; import * as CommentCard from "./comment-card"; +import { IDENTITY_SUMMARY_FRAGMENT } from "./comment-card"; -const meta = { - component: CommentCard.Root, - parameters: { a11y: { disable: true } }, -} satisfies Meta; - -export default meta; -type Story = StoryObj; - -// Mock data shaped like IdentitySummaryFragment -const jane: IdentitySummaryFragment = { +const janeData = { + __typename: "Identity" as const, id: "1", humanId: "jane1", displayName: "Jane Doe", avatarUrl: null, }; -const bob: IdentitySummaryFragment = { +const bobData = { + __typename: "Identity" as const, id: "2", humanId: "bob1", displayName: "Bob Smith", avatarUrl: "https://github.com/shadcn.png", }; -const alice: IdentitySummaryFragment = { +const aliceData = { + __typename: "Identity" as const, id: "3", humanId: "alice1", displayName: "Alice Wu", avatarUrl: null, }; +const jane = makeFragmentData(janeData, IDENTITY_SUMMARY_FRAGMENT); +const bob = makeFragmentData(bobData, IDENTITY_SUMMARY_FRAGMENT); +const alice = makeFragmentData(aliceData, IDENTITY_SUMMARY_FRAGMENT); + +const meta = { + component: CommentCard.Root, + decorators: [ + withApollo, + withCachedFragments( + [IDENTITY_SUMMARY_FRAGMENT, "IdentitySummary", janeData], + [IDENTITY_SUMMARY_FRAGMENT, "IdentitySummary", bobData], + [IDENTITY_SUMMARY_FRAGMENT, "IdentitySummary", aliceData], + ), + ], + parameters: { a11y: { disable: true } }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + export const Default: Story = { args: { children: null }, render: () => ( - + - {jane.displayName} + {janeData.displayName} 2 hours ago @@ -56,10 +72,10 @@ export const WithEditButton: Story = { args: { children: null }, render: () => ( - + - {bob.displayName} + {bobData.displayName} 1 day ago edited