mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
refactor(renderer): group GitHub task read and refresh owners (#33127)
This commit is contained in:
@@ -64,7 +64,7 @@ const SUPPRESSED_REACT_DOCTOR_DIAGNOSTICS = new Map([
|
||||
[
|
||||
'react-doctor(no-adjust-state-on-prop-change)',
|
||||
new Set([
|
||||
'src/renderer/src/components/use-task-page-github-issue-draft.ts',
|
||||
'src/renderer/src/components/task-page/github/use-task-page-github-issue-draft.ts',
|
||||
'src/renderer/src/components/use-task-page-jira-creation-state.ts'
|
||||
])
|
||||
],
|
||||
|
||||
@@ -8721,13 +8721,13 @@
|
||||
"src/renderer/src/components/task-page-checks-pill.test.ts": 39,
|
||||
"src/renderer/src/components/task-page/task-page-default-repo-selection.test.ts": 54,
|
||||
"src/renderer/src/components/task-page-empty-state.test.ts": 62,
|
||||
"src/renderer/src/components/task-page-github-dialog-state-authority.test.ts": 67,
|
||||
"src/renderer/src/components/task-page-github-list-scroll-restore.test.ts": 163,
|
||||
"src/renderer/src/components/task-page-github-resume-cache.test.ts": 39,
|
||||
"src/renderer/src/components/task-page-github-reviewer-suggestions.test.ts": 78,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-dialog-state-authority.test.ts": 67,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-list-scroll-restore.test.ts": 163,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-resume-cache.test.ts": 39,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-reviewer-suggestions.test.ts": 78,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-status-actions.test.ts": 35,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-status-state.test.ts": 33,
|
||||
"src/renderer/src/components/task-page-github-task-kind.test.ts": 61,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-task-kind.test.ts": 61,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-work-item-filter-membership.test.ts": 31,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-work-item-mutation-patches.test.ts": 44,
|
||||
"src/renderer/src/components/task-page/github/task-page-github-work-item-mutation-regressions.test.ts": 96,
|
||||
|
||||
+1
-1
@@ -382,7 +382,7 @@
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"src/renderer/src/components/use-task-page-github-issue-draft.ts",
|
||||
"src/renderer/src/components/task-page/github/use-task-page-github-issue-draft.ts",
|
||||
"src/renderer/src/components/use-task-page-jira-creation-state.ts"
|
||||
],
|
||||
"rules": [
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
validateTaskPageGitHubDuplicateTarget,
|
||||
type TaskPageGitHubCloseAction
|
||||
} from '@/components/task-page/github/task-page-github-status-actions'
|
||||
import { assertTaskPageGitHubDialogStateAuthority } from '@/components/task-page-github-dialog-state-authority'
|
||||
import { assertTaskPageGitHubDialogStateAuthority } from '@/components/task-page/github/task-page-github-dialog-state-authority'
|
||||
import { runIssueUpdate } from '@/components/github/github-work-item-edit-mutations'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types'
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import type { GitHubPRMergeMethod } from '../../../../../shared/github/pull-requ
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { TaskSourceContext } from '../../../../../shared/task-source-context'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { assertTaskPageGitHubDialogStateAuthority } from '@/components/task-page-github-dialog-state-authority'
|
||||
import { assertTaskPageGitHubDialogStateAuthority } from '@/components/task-page/github/task-page-github-dialog-state-authority'
|
||||
import { resolvePullRequestRepo } from '@/components/github/github-work-item-identity'
|
||||
import { notifyWorkItemDetailsMutation } from '@/components/github/github-work-item-comment-mutations'
|
||||
import { runPullRequestStateUpdate } from '@/components/github/github-work-item-edit-mutations'
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export {
|
||||
getDefaultPresetForGitHubTaskKind,
|
||||
getGitHubTaskKind,
|
||||
isPRFocusedTaskView,
|
||||
normalizeGitHubTaskPreset,
|
||||
scopeGitHubTaskSearch
|
||||
} from '../../../shared/task-github-search'
|
||||
@@ -4,10 +4,10 @@ import { useTaskPageRepoSelection } from '../use-task-page-repo-selection'
|
||||
import { useTaskPageRuntimeHosts } from '../use-task-page-runtime-hosts'
|
||||
import { useTaskPageSourceAvailability } from '../use-task-page-source-availability'
|
||||
import { useTaskPageProviderState } from '../use-task-page-provider-state'
|
||||
import { useTaskPageGitHubListState } from '../use-task-page-github-list-state'
|
||||
import { useTaskPageGitHubDetail } from '../use-task-page-github-detail'
|
||||
import { useTaskPageGitHubCacheReconciliation } from '../use-task-page-github-cache-reconciliation'
|
||||
import { useTaskPageGitHubIssueDraft } from '../use-task-page-github-issue-draft'
|
||||
import { useTaskPageGitHubListState } from './github/use-task-page-github-list-state'
|
||||
import { useTaskPageGitHubDetail } from './github/use-task-page-github-detail'
|
||||
import { useTaskPageGitHubCacheReconciliation } from './github/use-task-page-github-cache-reconciliation'
|
||||
import { useTaskPageGitHubIssueDraft } from './github/use-task-page-github-issue-draft'
|
||||
import { useTaskPageDetailRouting } from '../use-task-page-detail-routing'
|
||||
import { useTaskPageLinearViewState } from './linear/use-task-page-linear-view-state'
|
||||
import { useTaskPageJiraListState } from '../use-task-page-jira-list-state'
|
||||
@@ -22,13 +22,13 @@ import { useTaskPageLinearCreationState } from './linear/use-task-page-linear-cr
|
||||
import { useTaskPageGitHubMutationState } from './github/use-task-page-github-mutation-state'
|
||||
import { useTaskPageJiraCreationState } from '../use-task-page-jira-creation-state'
|
||||
import { useTaskPageJiraCreationMetadata } from '../use-task-page-jira-creation-metadata'
|
||||
import { useTaskPageGitHubListProjection } from '../use-task-page-github-list-projection'
|
||||
import { useTaskPageGitHubSearchPagination } from '../use-task-page-github-search-pagination'
|
||||
import { useTaskPageGitHubLandingRefresh } from '../use-task-page-github-landing-refresh'
|
||||
import { useTaskPageGitHubQuietRefresh } from '../use-task-page-github-quiet-refresh'
|
||||
import { useTaskPageGitHubListProjection } from './github/use-task-page-github-list-projection'
|
||||
import { useTaskPageGitHubSearchPagination } from './github/use-task-page-github-search-pagination'
|
||||
import { useTaskPageGitHubLandingRefresh } from './github/use-task-page-github-landing-refresh'
|
||||
import { useTaskPageGitHubQuietRefresh } from './github/use-task-page-github-quiet-refresh'
|
||||
import { useTaskPageSearchActions } from '../use-task-page-search-actions'
|
||||
import { useTaskPageWorkspaceActions } from '../use-task-page-workspace-actions'
|
||||
import { useTaskPageGitHubIssueCreation } from '../use-task-page-github-issue-creation'
|
||||
import { useTaskPageGitHubIssueCreation } from './github/use-task-page-github-issue-creation'
|
||||
import { useTaskPageLinearProjectCreation } from './linear/use-task-page-linear-project-creation'
|
||||
import { useTaskPageLinearIssueCreation } from './linear/use-task-page-linear-issue-creation'
|
||||
import { useTaskPageJiraIssueCreation } from '../use-task-page-jira-issue-creation'
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Button } from '@/components/ui/button'
|
||||
import { LoaderCircle } from 'lucide-react'
|
||||
import { TaskPageGitHubRows } from './Rows'
|
||||
import { PaginationBar } from '../PaginationBar'
|
||||
import { supersedeGitHubListScrollRestore } from '../../task-page-github-list-scroll-restore'
|
||||
import { supersedeGitHubListScrollRestore } from './task-page-github-list-scroll-restore'
|
||||
export function TaskPageGitHubList({
|
||||
model
|
||||
}: {
|
||||
|
||||
@@ -25,7 +25,7 @@ import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip
|
||||
import { cn } from '@/lib/utils'
|
||||
import { LoaderCircle, GitMerge, ChevronDown, ExternalLink } from 'lucide-react'
|
||||
import type { TaskPageGitHubWorkItemMutationRunner } from '../linear/task-page-linear-jira-list-model'
|
||||
import { resolveTaskPullRequestRepo } from '../../task-page-github-review-model'
|
||||
import { resolveTaskPullRequestRepo } from './task-page-github-review-model'
|
||||
export function PRMergeCell({
|
||||
item,
|
||||
repo,
|
||||
|
||||
@@ -24,9 +24,9 @@ import type { TaskPageGitHubWorkItemMutationRunner } from '../linear/task-page-l
|
||||
import {
|
||||
mergeReviewerSuggestions,
|
||||
resolveTaskPullRequestRepo
|
||||
} from '../../task-page-github-review-model'
|
||||
} from './task-page-github-review-model'
|
||||
import { ReviewChipAvatar } from './Avatars'
|
||||
import { createTaskPageGitHubReviewerActions } from '../../task-page-github-reviewer-actions'
|
||||
import { createTaskPageGitHubReviewerActions } from './task-page-github-reviewer-actions'
|
||||
import { TaskPageGitHubReviewerPicker } from './ReviewerPicker'
|
||||
export function PRReviewCell({
|
||||
item,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import type { GitHubOwnerRepo } from '../../../shared/github/pull-request-types'
|
||||
import { githubRepoIdentityKey } from '../../../shared/github/repository-identity-key'
|
||||
import { taskPageGitHubLastConfirmedKey } from './task-page/github/task-page-github-work-item-mutation-keys'
|
||||
import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types'
|
||||
import { githubRepoIdentityKey } from '../../../../../shared/github/repository-identity-key'
|
||||
import { taskPageGitHubLastConfirmedKey } from './task-page-github-work-item-mutation-keys'
|
||||
|
||||
const lastConfirmedClientValues = new Map<
|
||||
string,
|
||||
+7
-7
@@ -1,27 +1,27 @@
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import { getTaskSourceCacheScope } from '../../../shared/task-source-context'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import { getTaskSourceCacheScope } from '../../../../../shared/task-source-context'
|
||||
import { assertTaskPageGitHubDialogStateAuthority } from './task-page-github-dialog-state-authority'
|
||||
import { adoptQuietSearchFieldsForItem } from './task-page/github/task-page-github-work-item-quiet-adopt'
|
||||
import { adoptQuietSearchFieldsForItem } from './task-page-github-work-item-quiet-adopt'
|
||||
import {
|
||||
applyPendingTaskPageGitHubMutationsToItems,
|
||||
materializeTaskPageItemList,
|
||||
reapplyPendingTaskPageGitHubMutationsToCache
|
||||
} from './task-page/github/task-page-github-work-item-mutation-pages'
|
||||
} from './task-page-github-work-item-mutation-pages'
|
||||
import {
|
||||
deleteLastConfirmedClientValue,
|
||||
getLastConfirmedClientValue
|
||||
} from './task-page-github-confirmed-client-values'
|
||||
import { getOrCreateQuietRevalidateState } from './task-page/github/task-page-github-work-item-quiet-state'
|
||||
import { getOrCreateQuietRevalidateState } from './task-page-github-work-item-quiet-state'
|
||||
import {
|
||||
resetTaskPageGitHubMutationRegistryForTests,
|
||||
setLastConfirmedClientValue,
|
||||
setTaskPageGitHubMutationQueryKey
|
||||
} from './task-page/github/task-page-github-work-item-mutation-registry'
|
||||
} from './task-page-github-work-item-mutation-registry'
|
||||
import {
|
||||
taskPageGitHubFamilyDirtyKey,
|
||||
taskPageGitHubItemKey
|
||||
} from './task-page/github/task-page-github-work-item-mutation-keys'
|
||||
} from './task-page-github-work-item-mutation-keys'
|
||||
|
||||
function item(overrides: Partial<GitHubWorkItem> = {}): GitHubWorkItem {
|
||||
return {
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubOwnerRepo } from '../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { GitHubOwnerRepo } from '../../../../../shared/github/pull-request-types'
|
||||
import {
|
||||
getTaskSourceCacheScope,
|
||||
type TaskSourceContext
|
||||
} from '../../../shared/task-source-context'
|
||||
} from '../../../../../shared/task-source-context'
|
||||
import {
|
||||
deleteLastConfirmedClientValue,
|
||||
getLastConfirmedClientValue
|
||||
@@ -12,9 +12,9 @@ import {
|
||||
getTaskPageGitHubMutationQueryKey,
|
||||
notifyTaskPageGitHubMutationRegistry,
|
||||
setLastConfirmedClientValue
|
||||
} from './task-page/github/task-page-github-work-item-mutation-registry'
|
||||
import { markTaskPageGitHubFamiliesDirty } from './task-page/github/task-page-github-work-item-quiet-state'
|
||||
import { taskPageGitHubItemKey } from './task-page/github/task-page-github-work-item-mutation-keys'
|
||||
} from './task-page-github-work-item-mutation-registry'
|
||||
import { markTaskPageGitHubFamiliesDirty } from './task-page-github-work-item-quiet-state'
|
||||
import { taskPageGitHubItemKey } from './task-page-github-work-item-mutation-keys'
|
||||
|
||||
function markStateFamilyDirty(repoId: string, itemId: string): void {
|
||||
const queryKey = getTaskPageGitHubMutationQueryKey()
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
import type { TaskPageGitHubSearchPaginationModel } from './use-task-page-github-search-pagination'
|
||||
import { stripRepoQualifiers } from '../../../shared/task-query'
|
||||
import { useAppStore } from '@/store'
|
||||
import { stripRepoQualifiers } from '../../../../../shared/task-query'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import {
|
||||
taskPageGitHubResumeCache,
|
||||
TASK_PAGE_GITHUB_RESUME_FRESH_MS
|
||||
} from '@/components/task-page-github-resume-cache'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import { getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import { sortWorkItemsByNumber, taskPageToGitHubApiPage } from '../../../shared/work-items'
|
||||
} from '@/components/task-page/github/task-page-github-resume-cache'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import { getTaskPageRepoSourceContext } from '../../task-page-source-context'
|
||||
import { sortWorkItemsByNumber, taskPageToGitHubApiPage } from '../../../../../shared/work-items'
|
||||
import {
|
||||
materializeTaskPageItemList,
|
||||
overlayPendingOnTaskPagePages,
|
||||
+5
-5
@@ -25,11 +25,11 @@ import {
|
||||
MAX_LAG_TRAILS,
|
||||
LAG_BACKOFF_MS
|
||||
} from '@/components/task-page/github/task-page-github-work-item-quiet-adopt'
|
||||
import { stripRepoQualifiers } from '../../../shared/task-query'
|
||||
import { getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import { taskPageToGitHubApiPage } from '../../../shared/work-items'
|
||||
import { useAppStore } from '@/store'
|
||||
import { stripRepoQualifiers } from '../../../../../shared/task-query'
|
||||
import { getTaskPageRepoSourceContext } from '../../task-page-source-context'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import { taskPageToGitHubApiPage } from '../../../../../shared/work-items'
|
||||
import { useAppStore } from '@/store/index'
|
||||
export function runTaskPageGitHubQuietRefresh(model: TaskPageGitHubQuietRefreshPreludeModel) {
|
||||
const {
|
||||
fetchWorkItemsAcrossRepos,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
|
||||
export const TASK_PAGE_GITHUB_RESUME_CACHE_LIMIT = 5
|
||||
export const TASK_PAGE_GITHUB_RESUME_CACHE_TTL_MS = 10 * 60_000
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
import type {
|
||||
GitHubOwnerRepo,
|
||||
GitHubAssignableUser
|
||||
} from '../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
} from '../../../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import { sameGitHubOwnerRepo } from '@/components/github/IssueSourceIndicator'
|
||||
import { parseGitHubIssueOrPRLink } from '@/lib/github-links'
|
||||
import { githubProjectHost } from '../../../shared/github/project-identity'
|
||||
import { parseGitHubIssueOrPRLink } from '../../../../../shared/github/links'
|
||||
import { githubProjectHost } from '../../../../../shared/github/project-identity'
|
||||
export function sameOptionalGitHubOwnerRepo(
|
||||
left: GitHubOwnerRepo | null | undefined,
|
||||
right: GitHubOwnerRepo | null | undefined
|
||||
+6
-6
@@ -2,7 +2,7 @@ import type { Dispatch, SetStateAction } from 'react'
|
||||
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { callRuntimeRpc } from '@/runtime/runtime-rpc-client'
|
||||
import type { RuntimeClientTarget } from '../../../shared/runtime-client-target'
|
||||
import type { RuntimeClientTarget } from '../../../../../shared/runtime-client-target'
|
||||
import type { TaskPageGitHubMutationIntent } from '@/components/task-page/github/task-page-github-work-item-mutation-patches'
|
||||
import {
|
||||
normalizeGitHubReviewerLogins,
|
||||
@@ -13,11 +13,11 @@ import { toast } from 'sonner'
|
||||
import type {
|
||||
GitHubAssignableUser,
|
||||
GitHubOwnerRepo
|
||||
} from '../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { Repo } from '../../../shared/repo-types'
|
||||
import type { TaskSourceContext } from '../../../shared/task-source-context'
|
||||
import type { TaskPageGitHubWorkItemMutationRunner } from './task-page/linear/task-page-linear-jira-list-model'
|
||||
} from '../../../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { Repo } from '../../../../../shared/repo-types'
|
||||
import type { TaskSourceContext } from '../../../../../shared/task-source-context'
|
||||
import type { TaskPageGitHubWorkItemMutationRunner } from '../linear/task-page-linear-jira-list-model'
|
||||
import { buildRequestedReviewUsers } from './task-page-github-review-model'
|
||||
|
||||
type ReviewerActionsInput = {
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
isPRFocusedTaskView,
|
||||
normalizeGitHubTaskPreset,
|
||||
scopeGitHubTaskSearch
|
||||
} from './task-page-github-task-kind'
|
||||
} from '../../../../../shared/task-github-search'
|
||||
|
||||
describe('isPRFocusedTaskView', () => {
|
||||
const presetCases = [
|
||||
+1
-1
@@ -15,7 +15,7 @@ import {
|
||||
import {
|
||||
deleteLastConfirmedClientValue,
|
||||
getLastConfirmedClientValue
|
||||
} from '../../task-page-github-confirmed-client-values'
|
||||
} from './task-page-github-confirmed-client-values'
|
||||
import { getQuietRevalidateState } from './task-page-github-work-item-quiet-state'
|
||||
import { MAX_LAG_TRAILS } from './task-page-github-work-item-quiet-adopt'
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
setStickyHideEntry,
|
||||
updateSoftHiddenItemKey
|
||||
} from './task-page-github-work-item-mutation-registry'
|
||||
import { getLastConfirmedClientValue } from '../../task-page-github-confirmed-client-values'
|
||||
import { getLastConfirmedClientValue } from './task-page-github-confirmed-client-values'
|
||||
import { taskPageGitHubItemKey } from './task-page-github-work-item-mutation-keys'
|
||||
import type {
|
||||
PendingListOp,
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
||||
deleteLastConfirmedClientValue,
|
||||
getLastConfirmedClientValue,
|
||||
setLastConfirmedClientValue as storeLastConfirmedClientValue
|
||||
} from '../../task-page-github-confirmed-client-values'
|
||||
} from './task-page-github-confirmed-client-values'
|
||||
import type {
|
||||
GitHubAssignableUser,
|
||||
GitHubOwnerRepo
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import {
|
||||
getTaskPageGitHubRevalidatableAuthorityItemKeys
|
||||
} from './task-page-github-work-item-authority-refresh'
|
||||
import { confirmTaskPageGitHubWorkItemMutation } from './task-page-github-work-item-mutation-lifecycle'
|
||||
import { getLastConfirmedClientValue } from '../../task-page-github-confirmed-client-values'
|
||||
import { getLastConfirmedClientValue } from './task-page-github-confirmed-client-values'
|
||||
import {
|
||||
getOrCreateQuietRevalidateState,
|
||||
beginTaskPageQuietRevalidateRun,
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
||||
getTaskPageGitHubSoftHiddenItemKeys,
|
||||
resetTaskPageGitHubMutationRegistryForTests
|
||||
} from './task-page-github-work-item-mutation-registry'
|
||||
import { getLastConfirmedClientValue } from '../../task-page-github-confirmed-client-values'
|
||||
import { getLastConfirmedClientValue } from './task-page-github-confirmed-client-values'
|
||||
import { getOrCreateQuietRevalidateState } from './task-page-github-work-item-quiet-state'
|
||||
import { taskPageGitHubItemKey } from './task-page-github-work-item-mutation-keys'
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import {
|
||||
import {
|
||||
getLastConfirmedClientValue,
|
||||
deleteLastConfirmedClientValue
|
||||
} from '../../task-page-github-confirmed-client-values'
|
||||
} from './task-page-github-confirmed-client-values'
|
||||
import { getOrCreateQuietRevalidateState } from './task-page-github-work-item-quiet-state'
|
||||
import {
|
||||
taskPageGitHubFamilyDirtyKey,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import type { TaskPageGitHubDetailModel } from './use-task-page-github-detail'
|
||||
import { useCallback, useMemo, useEffect, useRef, useState } from 'react'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubAssignableUser } from '../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { GitHubAssignableUser } from '../../../../../shared/github/pull-request-types'
|
||||
import {
|
||||
patchTaskPageGitHubWorkItemPages,
|
||||
overlayPendingOnTaskPagePages
|
||||
+9
-6
@@ -1,17 +1,20 @@
|
||||
import type { TaskPageGitHubListStateModel } from './use-task-page-github-list-state'
|
||||
import { useAppStore } from '@/store'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import { getWorkItemRepo } from '@/lib/work-item-repo-row'
|
||||
import { useState, useMemo, useLayoutEffect, useCallback, useEffect } from 'react'
|
||||
import type { ItemDialogTab } from '@/components/GitHubItemDialog'
|
||||
import { stripRepoQualifiers } from '../../../shared/task-query'
|
||||
import type { ItemDialogTab } from '@/components/github/github-work-item-identity'
|
||||
import { stripRepoQualifiers } from '../../../../../shared/task-query'
|
||||
import { useShallow } from 'zustand/react/shallow'
|
||||
import {
|
||||
selectTaskPageWorkItemsCacheEntries,
|
||||
findTaskPageDialogWorkItem
|
||||
} from '@/components/task-page-cache-selectors'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../shared/gitlab-types'
|
||||
import { getTaskPageRepoCacheInput, getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import type { GitLabWorkItem } from '../../../../../shared/gitlab-types'
|
||||
import {
|
||||
getTaskPageRepoCacheInput,
|
||||
getTaskPageRepoSourceContext
|
||||
} from '../../task-page-source-context'
|
||||
import { startGitHubListScrollRestore } from './task-page-github-list-scroll-restore'
|
||||
|
||||
function getTaskPageScrollTop(
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import type { TaskPageWorkspaceActionsModel } from './use-task-page-workspace-actions'
|
||||
import type { TaskPageWorkspaceActionsModel } from '../../use-task-page-workspace-actions'
|
||||
import { useCallback } from 'react'
|
||||
import { callRuntimeRpc } from '@/runtime/runtime-rpc-client'
|
||||
import { toast } from 'sonner'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
export function useTaskPageGitHubIssueCreation(model: TaskPageWorkspaceActionsModel) {
|
||||
const {
|
||||
setTaskRefreshNonce,
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
import type { TaskPageGitHubCacheReconciliationModel } from './use-task-page-github-cache-reconciliation'
|
||||
import { useState, useMemo, useEffect } from 'react'
|
||||
import type { GitHubAssignableUser } from '../../../shared/github/pull-request-types'
|
||||
import { useAppStore } from '@/store'
|
||||
import type { GitHubAssignableUser } from '../../../../../shared/github/pull-request-types'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import { getGitHubRepoRoutingTarget } from '@/lib/github-source-runtime-context'
|
||||
import { useRepoLabels, useRepoAssignees } from '@/hooks/useIssueMetadata'
|
||||
import { useRepoLabels, useRepoAssignees } from '@/hooks/useGitHubRepoMetadata'
|
||||
import {
|
||||
resolveVanishedNewIssueRepoReset,
|
||||
isNewIssueDraftContentful
|
||||
} from '@/components/task-page-new-issue-draft'
|
||||
import { getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import { getTaskPageRepoSourceContext } from '../../task-page-source-context'
|
||||
export function useTaskPageGitHubIssueDraft(model: TaskPageGitHubCacheReconciliationModel) {
|
||||
const { settings, repos, selectedRepos } = model
|
||||
const [newIssueOpen, setNewIssueOpen] = useState(false)
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import type { TaskPageJiraCreationMetadataModel } from './use-task-page-jira-creation-metadata'
|
||||
import type { TaskPageJiraCreationMetadataModel } from '../../use-task-page-jira-creation-metadata'
|
||||
import { getWorkItemRepo } from '@/lib/work-item-repo-row'
|
||||
import { useCallback, useMemo, useEffect } from 'react'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import { taskPageGitHubItemKey } from '@/components/task-page/github/task-page-github-work-item-mutation-keys'
|
||||
import { deriveTaskPagePRCheckSummary } from '@/components/task-page-pr-check-summary'
|
||||
import { deriveAdvertisedTotalPages } from '@/components/task-page-work-item-pagination'
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
GITHUB_TASK_GRID_CLASS,
|
||||
PR_CHECKS_EAGER_PREFETCH_LIMIT,
|
||||
getTaskPageRepoSourceContext
|
||||
} from './task-page-source-context'
|
||||
} from '../../task-page-source-context'
|
||||
import { sameOptionalGitHubOwnerRepo } from './task-page-github-review-model'
|
||||
export function useTaskPageGitHubListProjection(model: TaskPageJiraCreationMetadataModel) {
|
||||
const {
|
||||
+12
-8
@@ -1,16 +1,20 @@
|
||||
import type { TaskPageProviderStateModel } from './use-task-page-provider-state'
|
||||
import type { TaskPageProviderStateModel } from '../../use-task-page-provider-state'
|
||||
import { useState, useRef, useEffect, useLayoutEffect } from 'react'
|
||||
import type { TaskViewPresetId } from '../../../shared/ui-chrome-types'
|
||||
import type { GitHubWorkItem } from '../../../shared/github/work-item-types'
|
||||
import { PER_REPO_FETCH_LIMIT, CROSS_REPO_DISPLAY_LIMIT } from '@/lib/new-workspace'
|
||||
import type { TaskViewPresetId } from '../../../../../shared/ui-chrome-types'
|
||||
import type { GitHubWorkItem } from '../../../../../shared/github/work-item-types'
|
||||
import {
|
||||
PER_REPO_FETCH_LIMIT,
|
||||
CROSS_REPO_DISPLAY_LIMIT,
|
||||
getTaskPagePerRepoLimit,
|
||||
sortWorkItemsByNumber
|
||||
} from '../../../../../shared/work-items'
|
||||
import {
|
||||
buildTaskPageGitHubResumeContextKey,
|
||||
taskPageGitHubResumeCache
|
||||
} from '@/components/task-page-github-resume-cache'
|
||||
import { getTaskPagePerRepoLimit, sortWorkItemsByNumber } from '../../../shared/work-items'
|
||||
import { useAppStore } from '@/store'
|
||||
} from '@/components/task-page/github/task-page-github-resume-cache'
|
||||
import { useAppStore } from '@/store/index'
|
||||
import type { GitHubListRestoreWrite } from './task-page-github-list-scroll-restore'
|
||||
import { getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import { getTaskPageRepoSourceContext } from '../../task-page-source-context'
|
||||
export function useTaskPageGitHubListState(model: TaskPageProviderStateModel) {
|
||||
const {
|
||||
pageData,
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import type { TaskPageGitHubListProjectionModel } from './use-task-page-github-list-projection'
|
||||
import { useCallback, useEffect } from 'react'
|
||||
import { stripRepoQualifiers } from '../../../shared/task-query'
|
||||
import { taskPageToGitHubApiPage } from '../../../shared/work-items'
|
||||
import { stripRepoQualifiers } from '../../../../../shared/task-query'
|
||||
import { taskPageToGitHubApiPage } from '../../../../../shared/work-items'
|
||||
import {
|
||||
resolveEmptyPageOutcome,
|
||||
applyWindowPageLimit,
|
||||
@@ -10,9 +10,9 @@ import {
|
||||
import { toast } from 'sonner'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { overlayPendingOnTaskPagePages } from '@/components/task-page/github/task-page-github-work-item-mutation-pages'
|
||||
import { scopeGitHubTaskSearch } from '@/components/task-page-github-task-kind'
|
||||
import { scopeGitHubTaskSearch } from '../../../../../shared/task-github-search'
|
||||
import { useGitHubTaskSearchCommit } from '@/components/use-github-task-search-commit'
|
||||
import { getTaskPageRepoSourceContext } from './task-page-source-context'
|
||||
import { getTaskPageRepoSourceContext } from '../../task-page-source-context'
|
||||
export function useTaskPageGitHubSearchPagination(model: TaskPageGitHubListProjectionModel) {
|
||||
const {
|
||||
setTaskResumeState,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { TaskPageGitHubIssueCreationModel } from '../../use-task-page-github-issue-creation'
|
||||
import type { TaskPageGitHubIssueCreationModel } from '../github/use-task-page-github-issue-creation'
|
||||
import { useCallback } from 'react'
|
||||
import { linearCreateProject } from '@/runtime/runtime-linear-project-client'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TaskPageGitHubIssueDraftModel } from './use-task-page-github-issue-draft'
|
||||
import type { TaskPageGitHubIssueDraftModel } from './task-page/github/use-task-page-github-issue-draft'
|
||||
import { useState, useMemo, useCallback } from 'react'
|
||||
import type { LinearIssue } from '../../../shared/linear/issue-types'
|
||||
import type { JiraIssue } from '../../../shared/jira/jira-types'
|
||||
|
||||
@@ -12,10 +12,10 @@ import { useTaskPageRepoSelection } from './use-task-page-repo-selection'
|
||||
import { useTaskPageRuntimeHosts } from './use-task-page-runtime-hosts'
|
||||
import { useTaskPageSourceAvailability } from './use-task-page-source-availability'
|
||||
import { useTaskPageProviderState } from './use-task-page-provider-state'
|
||||
import { useTaskPageGitHubListState } from './use-task-page-github-list-state'
|
||||
import { useTaskPageGitHubDetail } from './use-task-page-github-detail'
|
||||
import { useTaskPageGitHubCacheReconciliation } from './use-task-page-github-cache-reconciliation'
|
||||
import { useTaskPageGitHubIssueDraft } from './use-task-page-github-issue-draft'
|
||||
import { useTaskPageGitHubListState } from './task-page/github/use-task-page-github-list-state'
|
||||
import { useTaskPageGitHubDetail } from './task-page/github/use-task-page-github-detail'
|
||||
import { useTaskPageGitHubCacheReconciliation } from './task-page/github/use-task-page-github-cache-reconciliation'
|
||||
import { useTaskPageGitHubIssueDraft } from './task-page/github/use-task-page-github-issue-draft'
|
||||
import { useTaskPageDetailRouting } from './use-task-page-detail-routing'
|
||||
import { useTaskPageLinearViewState } from './task-page/linear/use-task-page-linear-view-state'
|
||||
const { readSavedFilters, mutateSavedFilters, readQuickFilters, writeQuickFilters } = vi.hoisted(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TaskPageJiraListStateModel } from './use-task-page-jira-list-state'
|
||||
import { useEffect } from 'react'
|
||||
import { resolveVisibleTaskProvider } from '../../../shared/task-providers'
|
||||
import { normalizeGitHubTaskPreset } from '@/components/task-page-github-task-kind'
|
||||
import { normalizeGitHubTaskPreset } from '../../../shared/task-github-search'
|
||||
import { getTaskPresetQuery } from '../../../shared/task-preset-query'
|
||||
import { loadLinearIssueView } from './linear-issue-view-storage'
|
||||
export function useTaskPageResumeRestoration(model: TaskPageJiraListStateModel) {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import type { TaskPageRepoSelectionModel } from './use-task-page-repo-selection'
|
||||
import { normalizeGitHubTaskPreset } from '@/components/task-page-github-task-kind'
|
||||
import { normalizeGitHubTaskPreset } from '../../../shared/task-github-search'
|
||||
import { getTaskPresetQuery } from '../../../shared/task-preset-query'
|
||||
import { useState, useRef, useEffect, useMemo } from 'react'
|
||||
import type { TaskProvider } from '../../../shared/task-providers'
|
||||
import { resolveVisibleTaskProvider } from '../../../shared/task-providers'
|
||||
import { type TaskProvider, resolveVisibleTaskProvider } from '../../../shared/task-providers'
|
||||
import type { TaskSourceContext } from '../../../shared/task-source-context'
|
||||
import type { RuntimeProviderPreflightStatus } from '@/components/task-source-provider-availability'
|
||||
import { buildExecutionHostRegistry } from '../../../shared/execution-host-registry'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { TaskPageGitHubQuietRefreshModel } from './use-task-page-github-quiet-refresh'
|
||||
import type { TaskPageGitHubQuietRefreshModel } from './task-page/github/use-task-page-github-quiet-refresh'
|
||||
import React, { useCallback, useEffect } from 'react'
|
||||
import type { PRFilterChange } from '@/components/github/PRFilterDropdowns'
|
||||
import {
|
||||
scopeGitHubTaskSearch,
|
||||
getDefaultPresetForGitHubTaskKind
|
||||
} from '@/components/task-page-github-task-kind'
|
||||
} from '../../../shared/task-github-search'
|
||||
import { withQualifier } from '../../../shared/task-query'
|
||||
import type { TaskViewPresetId } from '../../../shared/ui-chrome-types'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
Reference in New Issue
Block a user