mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 14:02:36 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The Coordinator workspace puts chat, tasks, and human decisions in one navigation. > - Its task menu exposed only two views and always opened All tasks. > - Its sidebar hid search under More and showed an empty Recents section. > - This pull request restores the four task views and saves each user's last selection. > - It also groups the main navigation and makes the task list use the page background. > - Users can return to their preferred task view and find search from the sidebar. ## Linked Issues or Issue Description **What existing behavior does this improve?** The Coordinator sidebar and task collection. **Subsystem affected** ui/ — React and Vite board UI. **Current behavior** Coordinator opens All tasks and offers only All tasks and Needs attention. Search lives under More. Empty Recents content takes sidebar space. The task list inherits a darker root background. **Proposed behavior** Tasks starts in Inbox for new users. The menu contains Inbox, Unread, Needs attention, and All tasks. The selected view persists per user in browser storage. The sidebar groups Chat, Tasks, and Needs you between New task and More. Search sits beside the organization menu. Recents appears only when entries exist. The list surface and edge fades match the local page background. **Reason and benefit** The page starts with personal work and restores the user's last choice. Navigation gives search a fixed location and removes empty content. **Breaking changes** Unread task-view links now stay on Coordinator Tasks. Retired merged-Inbox views keep their existing Inbox routes. Organization-filter links without an explicit view still open All tasks. Needs attention keeps the existing pending-decision feed. The initial Inbox rule applies to Coordinator. Task lists now default to newest updates, including task-detail subtask lists. Saved and URL sort choices stay intact. **Additional context** Related merged work: Refs #18703, Refs #17983, Refs #18323, Refs #18492. The GitHub search found no duplicate open PR for these changes. This is focused UI polish within the existing workspace and does not add a roadmap feature. ## What Changed - Default task lists to Last updated descending and show that active header. Keep descendants with their parents while nesting is on; use a flat newest-first order when nesting is off. Task-detail subtask lists use this default and retain checklist controls. Saved and URL sort choices keep precedence. - Add space after New task and before More. Add header search with the existing command palette action. - Use “Needs you” in desktop navigation, mobile navigation, and the decision page. - Hide Recents when no entries exist. - Restore the shared four-view task menu. Default Coordinator to Inbox and save the last view per user. - Read unread tasks through the server's viewer read filter. Preserve task hierarchy and existing filtered links. - Use the resolved local-board identity for Inbox. Keep Inbox and Unread selected when a status filter changes. Load accessible read ancestors as context for unread subtasks. - Resolve task-list and edge-fade surfaces against the Coordinator background token. - Update view, routing, navigation tests, and DESIGN.md. ## Verification - Passed for the sorting update: 344 tests across the task-list, classic and streamlined nesting, Coordinator task page, and task-detail suites. - Passed for the sorting update: 30 Storybook catalog and map checks, token gates, UI typecheck, and UI production build. - Browser check: a task-list URL without sort parameters shows Last updated descending as the active sort. - Passed: `pnpm -r typecheck` after rebase onto master. - Passed after review fixes: 91 tests across seven affected task-view, routing, identity, navigation, and decision-page suites. - Passed after review fixes: UI typecheck and UI production build. - Passed: `pnpm check:token-gates` and `git diff --check`. - Browser checks: Inbox opens on the first task visit. The menu shows all four views. Unread survives leaving Tasks and returning, and survives reload. Header search opens the command palette. Empty Recents is absent. - Browser style check: the page, task-list section, row groups, and edge-fade token resolve to the same local background. - Passed: `pnpm build` after rebase onto master. - Local full-suite run: all six chat integration shards passed (1,834 tests). Stopped the remaining local run after all latest-head CI test gates passed. The local full suite did not finish. - Greptile: 5/5 on current commit `5fc50d616c`, with all three earlier review findings fixed and all threads resolved. The sorting update added no new review findings. - Initial CI failed in [browser shard 1/8](https://github.com/paperclipai/paperclip/actions/runs/41702707260/job/126156263776). The cross-organization UUID task-link test reached its 5-second heading assertion timeout. The failure screenshot and page snapshot show the correct task heading. The precise cause of the timeout remains unknown. - Passed during CI diagnosis: six focused Chrome browser runs, then all 35 tests from the same shard on the unchanged branch. Task links resolved to the target organization and attachment uploads completed. - Passed on the single unchanged-head CI retry: [all 35 tests in browser shard 1/8](https://github.com/paperclipai/paperclip/actions/runs/41702707260/job/126184223560), including the original UUID task-link case. This establishes recovery; it does not establish the original timeout cause. - Passed: [all CI gates for commit `5fc50d616c`](https://github.com/paperclipai/paperclip/actions/runs/41702707260). The final aggregate gate passed. No check is pending or failing. Three checks are skipped as expected, and the optional Superagent scan is neutral. - Review: confirm the sidebar order, four task views, saved view after navigation, and matching list background. ## Risks - Task-list defaults change from Task ID order to newest updates. Task-detail subtask lists use the same default instead of workflow order. Existing saved and explicit sort choices remain available. - Low risk. New Coordinator users start in Inbox instead of All tasks. - The view preference stays in this browser and does not sync across devices. - The task collection keeps its existing paging behavior. - Unread URLs now select the native Coordinator task view. ## Model Used OpenAI Codex, GPT-6 family. The session did not expose a more specific runtime model ID or context-window size. Used code editing, terminal tools, and browser verification. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Scott Tong <scott@scottsmbpm5max.lan> Co-authored-by: Paperclip <noreply@paperclip.ing>
387 lines
16 KiB
TypeScript
387 lines
16 KiB
TypeScript
import { useShowAgentCreatedTasks } from "../hooks/useShowAgentCreatedTasks";
|
|
import { useCoordinatorWorkspaceEnabled } from "../hooks/useCoordinatorWorkspaceEnabled";
|
|
import { CoordinatorTasks } from "./CoordinatorTasks";
|
|
import { useDesignSandbox } from "../context/DesignSandboxContext";
|
|
import { DesignSandboxTasks } from "./DesignSandboxTasks";
|
|
import { useEffect, useMemo, useCallback, useRef, useState } from "react";
|
|
import type { ReactNode } from "react";
|
|
import { Navigate, useLocation, useNavigate, useSearchParams } from "@/lib/router";
|
|
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
|
import { issuesApi } from "../api/issues";
|
|
import { agentsApi } from "../api/agents";
|
|
import { projectsApi } from "../api/projects";
|
|
import { heartbeatsApi } from "../api/heartbeats";
|
|
import { useCompany } from "../context/CompanyContext";
|
|
import { useBreadcrumbs } from "../context/BreadcrumbContext";
|
|
import { collectLiveIssueIds } from "../lib/liveIssueIds";
|
|
import { usePublishSharedQueryData, useSharedPollingQuery } from "@/hooks/useSharedPolling";
|
|
import { queryKeys } from "../lib/queryKeys";
|
|
import { createIssueDetailLocationState } from "../lib/issueDetailBreadcrumb";
|
|
import { EmptyState } from "../components/EmptyState";
|
|
import { IssuesList } from "../components/IssuesList";
|
|
import { readIssueSortParams, type IssueSort } from "../lib/issue-sort";
|
|
import { TaskViewsMenu } from "../components/TaskViewsMenu";
|
|
import { Button } from "@/components/ui/button";
|
|
import { CircleDot, Plus } from "lucide-react";
|
|
import type { Issue } from "@paperclipai/shared";
|
|
import { useStreamlinedUiEnabled } from "../hooks/useStreamlinedUiEnabled";
|
|
import { useCombinedInboxTasksEnabled } from "../hooks/useCombinedInboxTasksEnabled";
|
|
import { useDialogActions } from "../context/DialogContext";
|
|
import { useInboxBadge } from "../hooks/useInboxBadge";
|
|
import { Inbox } from "./Inbox";
|
|
import {
|
|
ORGANIZATION_SCOPED_PARAMS,
|
|
TASK_VIEW_PARAM,
|
|
loadLastTaskView,
|
|
normalizeTaskViewKey,
|
|
resolveInitialTaskView,
|
|
saveLastTaskView,
|
|
taskView,
|
|
type TaskViewKey,
|
|
} from "../lib/task-views";
|
|
import { useUpdateIssueMutation } from "../hooks/useUpdateIssueMutation";
|
|
|
|
const WORKSPACE_FILTER_ISSUE_LIMIT = 1000;
|
|
const ISSUES_PAGE_SIZE = 100;
|
|
export const ISSUES_ROW_PRESENTATION = "task" as const;
|
|
export const ISSUES_TOOLBAR_PRESENTATION = "collection" as const;
|
|
|
|
export function resolveIssuesPresentation(streamlinedUiEnabled: boolean) {
|
|
return streamlinedUiEnabled
|
|
? { rowPresentation: ISSUES_ROW_PRESENTATION, toolbarPresentation: ISSUES_TOOLBAR_PRESENTATION }
|
|
: { rowPresentation: "legacy" as const, toolbarPresentation: "legacy" as const };
|
|
}
|
|
|
|
export function getNextIssuesPageOffset(
|
|
loadedPageSize: number,
|
|
currentOffset: number,
|
|
pageSize: number = ISSUES_PAGE_SIZE,
|
|
): number | undefined {
|
|
return loadedPageSize >= pageSize ? currentOffset + pageSize : undefined;
|
|
}
|
|
|
|
export function mergeIssuePagesStable<T extends { id: string }>(pages: T[][]): T[] {
|
|
const seenIssueIds = new Set<string>();
|
|
const merged: T[] = [];
|
|
|
|
for (const page of pages) {
|
|
for (const issue of page) {
|
|
if (seenIssueIds.has(issue.id)) continue;
|
|
seenIssueIds.add(issue.id);
|
|
merged.push(issue);
|
|
}
|
|
}
|
|
|
|
return merged;
|
|
}
|
|
|
|
export function buildIssuesSearchUrl(currentHref: string, search: string): string | null {
|
|
const url = new URL(currentHref);
|
|
const currentSearch = url.searchParams.get("q") ?? "";
|
|
if (currentSearch === search) return null;
|
|
|
|
if (search.length > 0) {
|
|
url.searchParams.set("q", search);
|
|
} else {
|
|
url.searchParams.delete("q");
|
|
}
|
|
|
|
return `${url.pathname}${url.search}${url.hash}`;
|
|
}
|
|
|
|
/**
|
|
* Tasks — the single task surface after PAP-670 merged Inbox into it.
|
|
*
|
|
* This component only resolves `?view=` to a view and hands off: My-work views
|
|
* render the inbox list, organization views render the task collection. Both
|
|
* get the same Views control in their toolbar, so the switch reads as one page.
|
|
*/
|
|
export function Issues() {
|
|
const designSandbox = useDesignSandbox();
|
|
const { enabled: streamlinedUiEnabled } = useStreamlinedUiEnabled();
|
|
const { enabled: combinedInboxTasksEnabled } = useCombinedInboxTasksEnabled();
|
|
const { enabled: coordinatorEnabled } = useCoordinatorWorkspaceEnabled();
|
|
const [params] = useSearchParams();
|
|
const location = useLocation();
|
|
const requestedView = normalizeTaskViewKey(params.get(TASK_VIEW_PARAM));
|
|
const organizationScoped = [...ORGANIZATION_SCOPED_PARAMS, "workspaceId"].some(param => params.getAll(param).some(Boolean));
|
|
if (!designSandbox && coordinatorEnabled && !organizationScoped && requestedView && requestedView !== "unread" && taskView(requestedView).surface === "inbox") {
|
|
const next = new URLSearchParams(params); next.delete(TASK_VIEW_PARAM);
|
|
const search = next.toString();
|
|
return <Navigate to={`/inbox/${taskView(requestedView).inboxTab}${search ? `?${search}` : ""}${location.hash}`} replace />;
|
|
}
|
|
// The merged surface is Combined Inbox + Task List only. With the flag off, and always in
|
|
// the legacy shell, Tasks is the plain task list and Inbox keeps its pages.
|
|
return designSandbox ? <DesignSandboxTasks /> : coordinatorEnabled ? <CoordinatorTasks /> : streamlinedUiEnabled && combinedInboxTasksEnabled ? <StreamlinedTasks /> : <OrganizationIssues />;
|
|
}
|
|
|
|
function StreamlinedTasks() {
|
|
const navigate = useNavigate();
|
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
const { selectedCompanyId } = useCompany();
|
|
const { openNewIssue } = useDialogActions();
|
|
const inboxBadge = useInboxBadge(selectedCompanyId);
|
|
|
|
const requestedView = searchParams.get(TASK_VIEW_PARAM);
|
|
const hasOrganizationScopedParam = ORGANIZATION_SCOPED_PARAMS.some(
|
|
(param) => (searchParams.get(param) ?? "").length > 0,
|
|
);
|
|
// Read the stored view once per mount so a later write can't yank the view
|
|
// out from under the user mid-session.
|
|
const [lastUsedView] = useState<TaskViewKey>(() => loadLastTaskView());
|
|
const view = resolveInitialTaskView(requestedView, hasOrganizationScopedParam, lastUsedView);
|
|
const definition = taskView(view);
|
|
|
|
// Make the resolved view addressable without dropping the params that
|
|
// brought the user here — and correct a requested view that was overridden
|
|
// (an inbox view carrying an organization filter opens All tasks).
|
|
useEffect(() => {
|
|
if (normalizeTaskViewKey(requestedView) === view) return;
|
|
setSearchParams((current) => {
|
|
const next = new URLSearchParams(current);
|
|
next.set(TASK_VIEW_PARAM, view);
|
|
return next;
|
|
}, { replace: true });
|
|
}, [requestedView, view, setSearchParams]);
|
|
|
|
const selectView = useCallback((next: TaskViewKey) => {
|
|
saveLastTaskView(next);
|
|
// A view switch starts clean: the previous view's search and filters are
|
|
// its own, not the new view's.
|
|
navigate(`/issues?${TASK_VIEW_PARAM}=${next}`);
|
|
}, [navigate]);
|
|
|
|
const viewsMenu = (
|
|
<TaskViewsMenu value={view} onChange={selectView} badgeCount={inboxBadge.inbox} />
|
|
);
|
|
|
|
if (definition.surface === "inbox") {
|
|
return (
|
|
<Inbox
|
|
tab={definition.inboxTab}
|
|
surfaceLabel="Tasks"
|
|
toolbarContext={(
|
|
<div className="flex min-w-0 items-center gap-2">
|
|
{viewsMenu}
|
|
<Button size="sm" variant="outline" aria-label="New Task" onClick={() => openNewIssue()}>
|
|
<Plus className="h-4 w-4 sm:mr-1" />
|
|
<span className="hidden sm:inline">New Task</span>
|
|
</Button>
|
|
</div>
|
|
)}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return <OrganizationIssues toolbarContext={viewsMenu} initialStatuses={definition.statuses} />;
|
|
}
|
|
|
|
function OrganizationIssues({
|
|
toolbarContext,
|
|
initialStatuses,
|
|
}: { toolbarContext?: ReactNode; initialStatuses?: string[] } = {}) {
|
|
const { enabled: streamlinedUiEnabled } = useStreamlinedUiEnabled();
|
|
const issuesPresentation = resolveIssuesPresentation(streamlinedUiEnabled);
|
|
const { selectedCompanyId } = useCompany();
|
|
const { setBreadcrumbs } = useBreadcrumbs();
|
|
const location = useLocation();
|
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
const fetchNextPageInFlightRef = useRef(false);
|
|
|
|
const urlSearch = searchParams.get("q") ?? "";
|
|
const [searchOverride, setSearchOverride] = useState<{ search: string; locationSearch: string } | null>(null);
|
|
const syncedSearch = useMemo(() => {
|
|
if (typeof window !== "undefined" && searchOverride?.locationSearch === window.location.search) {
|
|
return searchOverride.search;
|
|
}
|
|
return urlSearch;
|
|
}, [searchOverride, urlSearch, location.search]);
|
|
const showAgentCreatedTasks = useShowAgentCreatedTasks(selectedCompanyId, "paperclip:issues-view");
|
|
const sort = useMemo(() => readIssueSortParams(searchParams), [searchParams]);
|
|
const includeBlockedBy = sort?.sortField === "workflow";
|
|
const serverSortField = sort?.sortField === "created" ? "created" : "updated";
|
|
const serverSortDir = sort?.sortField === "created" || sort?.sortField === "updated" ? sort.sortDir : "desc";
|
|
const handleSortChange = useCallback((nextSort: IssueSort) => {
|
|
setSearchParams(current => {
|
|
const next = new URLSearchParams(current);
|
|
if (syncedSearch) next.set("q", syncedSearch);
|
|
else next.delete("q");
|
|
next.set("sortField", nextSort.sortField);
|
|
next.set("sortDir", nextSort.sortDir);
|
|
return next;
|
|
}, { replace: true });
|
|
}, [setSearchParams, syncedSearch]);
|
|
const routineTasksOnly = searchParams.get("originKind") === "routine_execution";
|
|
const includeAgentCreatedTasks = showAgentCreatedTasks || routineTasksOnly;
|
|
const originKind = routineTasksOnly ? "routine_execution" : undefined;
|
|
const handleRoutineTasksOnlyChange = useCallback((checked: boolean) => {
|
|
setSearchParams(current => {
|
|
const next = new URLSearchParams(current);
|
|
if (syncedSearch) next.set("q", syncedSearch);
|
|
else next.delete("q");
|
|
if (checked) next.set("originKind", "routine_execution");
|
|
else next.delete("originKind");
|
|
return next;
|
|
}, { replace: true });
|
|
}, [setSearchParams, syncedSearch]);
|
|
const participantAgentId = searchParams.get("participantAgentId") ?? undefined;
|
|
const initialWorkspaces = searchParams.getAll("workspace").filter((workspaceId) => workspaceId.length > 0);
|
|
const workspaceIdFilter = initialWorkspaces.length === 1 ? initialWorkspaces[0] : undefined;
|
|
const handleSearchChange = useCallback((search: string) => {
|
|
const nextUrl = buildIssuesSearchUrl(window.location.href, search);
|
|
if (!nextUrl) {
|
|
setSearchOverride(null);
|
|
return;
|
|
}
|
|
window.history.replaceState(window.history.state, "", nextUrl);
|
|
setSearchOverride({ search, locationSearch: window.location.search });
|
|
}, []);
|
|
|
|
const { data: agents } = useQuery({
|
|
queryKey: queryKeys.agents.list(selectedCompanyId!),
|
|
queryFn: () => agentsApi.list(selectedCompanyId!),
|
|
enabled: !!selectedCompanyId,
|
|
});
|
|
|
|
const { data: projects } = useQuery({
|
|
queryKey: queryKeys.projects.list(selectedCompanyId!, { includeArchived: true }),
|
|
queryFn: () => projectsApi.list(selectedCompanyId!, { includeArchived: true }),
|
|
enabled: !!selectedCompanyId,
|
|
});
|
|
|
|
const liveRunsQueryKey = queryKeys.liveRuns(selectedCompanyId!);
|
|
const sharedLiveRuns = useSharedPollingQuery({
|
|
companyId: selectedCompanyId,
|
|
resourceKey: "live-runs",
|
|
queryKey: liveRunsQueryKey,
|
|
enabled: !!selectedCompanyId,
|
|
// Event-sourced via LiveUpdatesProvider (GitHub issue 9627); no interval poll needed.
|
|
refetchInterval: false,
|
|
leaderOnly: true,
|
|
});
|
|
const { data: liveRuns, dataUpdatedAt: liveRunsUpdatedAt } = useQuery({
|
|
queryKey: liveRunsQueryKey,
|
|
queryFn: () => heartbeatsApi.liveRunsForCompany(selectedCompanyId!),
|
|
enabled: sharedLiveRuns.enabled,
|
|
refetchInterval: sharedLiveRuns.refetchInterval,
|
|
});
|
|
usePublishSharedQueryData(sharedLiveRuns, liveRuns, liveRunsUpdatedAt);
|
|
|
|
const issueLinkState = useMemo(
|
|
() =>
|
|
createIssueDetailLocationState(
|
|
"Tasks",
|
|
`${location.pathname}${location.search}${location.hash}`,
|
|
"issues",
|
|
),
|
|
[location.pathname, location.search, location.hash],
|
|
);
|
|
|
|
useEffect(() => {
|
|
setBreadcrumbs([{ label: "Tasks" }]);
|
|
}, [setBreadcrumbs]);
|
|
|
|
const issuePageSize = workspaceIdFilter ? WORKSPACE_FILTER_ISSUE_LIMIT : ISSUES_PAGE_SIZE;
|
|
|
|
const {
|
|
data: issuePages,
|
|
isLoading,
|
|
isFetchingNextPage,
|
|
error,
|
|
hasNextPage,
|
|
fetchNextPage,
|
|
} = useInfiniteQuery({
|
|
queryKey: [
|
|
...queryKeys.issues.list(selectedCompanyId!),
|
|
"participant-agent",
|
|
participantAgentId ?? "__all__",
|
|
"workspace",
|
|
workspaceIdFilter ?? "__all__",
|
|
streamlinedUiEnabled ? "index" : "compact",
|
|
"with-routine-executions",
|
|
includeAgentCreatedTasks,
|
|
originKind,
|
|
"infinite",
|
|
issuePageSize,
|
|
serverSortField,
|
|
serverSortDir,
|
|
includeBlockedBy,
|
|
],
|
|
queryFn: ({ pageParam, signal }) => issuesApi.listCompact(selectedCompanyId!, {
|
|
projection: streamlinedUiEnabled ? "index" : undefined,
|
|
participantAgentId,
|
|
workspaceId: workspaceIdFilter,
|
|
includeRoutineExecutions: true,
|
|
includeAgentCreatedTasks,
|
|
originKind,
|
|
limit: issuePageSize,
|
|
offset: pageParam,
|
|
sortField: serverSortField,
|
|
sortDir: serverSortDir,
|
|
includeBlockedBy: includeBlockedBy || undefined,
|
|
}, { signal }),
|
|
initialPageParam: 0,
|
|
getNextPageParam: (lastPage, _allPages, lastPageParam) =>
|
|
getNextIssuesPageOffset(lastPage.length, lastPageParam, issuePageSize),
|
|
enabled: !!selectedCompanyId,
|
|
placeholderData: (previousData) => previousData,
|
|
});
|
|
|
|
const issues = useMemo(() => mergeIssuePagesStable(issuePages?.pages ?? []) as Issue[], [issuePages]);
|
|
const liveIssueIds = useMemo(() => collectLiveIssueIds(liveRuns, issues), [issues, liveRuns]);
|
|
const hasMoreServerIssues = syncedSearch.trim().length === 0
|
|
&& hasNextPage === true;
|
|
const loadMoreServerIssues = useCallback(() => {
|
|
if (!hasNextPage || isFetchingNextPage || fetchNextPageInFlightRef.current) return;
|
|
fetchNextPageInFlightRef.current = true;
|
|
void fetchNextPage({ cancelRefetch: false }).finally(() => {
|
|
fetchNextPageInFlightRef.current = false;
|
|
});
|
|
}, [fetchNextPage, hasNextPage, isFetchingNextPage]);
|
|
|
|
// Optimistic, rolls back with a readable toast, and resends after an outage.
|
|
const updateIssue = useUpdateIssueMutation({ companyId: selectedCompanyId });
|
|
|
|
if (!selectedCompanyId) {
|
|
return (
|
|
<EmptyState
|
|
icon={CircleDot}
|
|
message={streamlinedUiEnabled
|
|
? "Select an organization to view tasks."
|
|
: "Select a company to view tasks."}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<IssuesList
|
|
issues={issues ?? []}
|
|
isLoading={isLoading}
|
|
isLoadingMoreIssues={isFetchingNextPage}
|
|
error={error as Error | null}
|
|
agents={agents}
|
|
projects={projects}
|
|
liveIssueIds={liveIssueIds}
|
|
viewStateKey="paperclip:issues-view"
|
|
rowPresentation={issuesPresentation.rowPresentation}
|
|
toolbarPresentation={issuesPresentation.toolbarPresentation}
|
|
issueLinkState={issueLinkState}
|
|
initialAssignees={searchParams.get("assignee") ? [searchParams.get("assignee")!] : undefined}
|
|
initialWorkspaces={initialWorkspaces.length > 0 ? initialWorkspaces : undefined}
|
|
initialStatuses={initialStatuses}
|
|
toolbarContext={toolbarContext}
|
|
initialSearch={syncedSearch}
|
|
onSearchChange={handleSearchChange}
|
|
enableAgentCreatedVisibilityFilter
|
|
routineTasksOnly={routineTasksOnly}
|
|
onRoutineTasksOnlyChange={handleRoutineTasksOnlyChange}
|
|
sort={sort}
|
|
onSortChange={handleSortChange}
|
|
hasMoreIssues={hasMoreServerIssues}
|
|
onLoadMoreIssues={loadMoreServerIssues}
|
|
onUpdateIssue={(id, data) => updateIssue.mutate({ id, data })}
|
|
searchFilters={participantAgentId || workspaceIdFilter || originKind || includeBlockedBy ? { participantAgentId, workspaceId: workspaceIdFilter, originKind, ...(includeBlockedBy ? { includeBlockedBy: true } : {}) } : undefined}
|
|
/>
|
|
);
|
|
}
|