mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 03:30:39 +09:00
Add inbox issue search fallback
This commit is contained in:
parent
03a2cf5c8a
commit
fcab770518
3 changed files with 140 additions and 6 deletions
|
|
@ -7,6 +7,7 @@ import type {
|
|||
JoinRequest,
|
||||
} from "@paperclipai/shared";
|
||||
import {
|
||||
applyIssueFilters,
|
||||
defaultIssueFilterState,
|
||||
type IssueFilterState,
|
||||
} from "./issue-filters";
|
||||
|
|
@ -370,6 +371,30 @@ export function getArchivedInboxSearchIssues({
|
|||
.sort(sortIssuesByMostRecentActivity);
|
||||
}
|
||||
|
||||
export function getInboxSearchFallbackIssues({
|
||||
query,
|
||||
filteredWorkItems,
|
||||
archivedSearchIssues,
|
||||
remoteIssues,
|
||||
issueFilters,
|
||||
currentUserId,
|
||||
enableRoutineVisibilityFilter = false,
|
||||
}: {
|
||||
query: string;
|
||||
filteredWorkItems: InboxWorkItem[];
|
||||
archivedSearchIssues: Issue[];
|
||||
remoteIssues: Issue[];
|
||||
issueFilters: IssueFilterState;
|
||||
currentUserId?: string | null;
|
||||
enableRoutineVisibilityFilter?: boolean;
|
||||
}): Issue[] {
|
||||
const normalizedQuery = query.trim();
|
||||
if (!normalizedQuery) return [];
|
||||
if (filteredWorkItems.length > 0) return [];
|
||||
if (archivedSearchIssues.length > 0) return [];
|
||||
return applyIssueFilters(remoteIssues, issueFilters, currentUserId, enableRoutineVisibilityFilter);
|
||||
}
|
||||
|
||||
export function resolveIssueWorkspaceName(
|
||||
issue: Pick<Issue, "executionWorkspaceId" | "projectId" | "projectWorkspaceId">,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue