mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
## Thinking Path > - Paperclip orchestrates AI agents for zero-human companies > - Operators rely on issue, inbox, and routine views to understand what the company is doing in real time > - Those views need to stay fast and readable even when issue lists, markdown comments, and run metadata get large > - The current branch had a coherent set of UI and live-update improvements spread across issue search, issue detail rendering, routine affordances, and workspace lookups > - This pull request groups those board-facing changes into one standalone branch that can merge independently of the heartbeat/runtime work > - The benefit is a faster, clearer issue and routine workflow without changing the underlying task model ## What Changed - Show routine execution issues by default and rename the filter to `Hide routine runs` so the default state no longer looks like an active filter. - Show the routine name in the run dialog and tighten the issue properties pane with a workspace link, copy-on-click behavior, and an inline parent arrow. - Reduce issue detail rerenders, keep queued issue chat mounted, improve issues page search responsiveness, and speed up issues first paint. - Add inbox "other search results", refresh visible issue runs after status updates, and optimize workspace lookups through summary-mode execution workspace queries. - Improve markdown wrapping and scrolling behavior for long strings and self-comment code blocks. - Relax the markdown sanitizer assertion so the test still validates safety after the new wrap-friendly inline styles. ## Verification - `pnpm vitest run ui/src/components/IssuesList.test.tsx ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx ui/src/context/BreadcrumbContext.test.tsx ui/src/context/LiveUpdatesProvider.test.ts ui/src/components/MarkdownBody.test.tsx ui/src/api/execution-workspaces.test.ts server/src/__tests__/execution-workspaces-routes.test.ts` ## Risks - This touches several issue-facing UI surfaces at once, so regressions would most likely show up as stale rendering, search result mismatches, or small markdown presentation differences. - The workspace lookup optimization depends on the summary-mode route shape staying aligned between server and UI. ## Model Used - OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment. Exact backend model deployment ID was not exposed in-session. Tool-assisted editing and shell execution were used. ## 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 run tests locally and they pass - [x] I have added or updated tests where applicable - [ ] If this change affects the UI, I have included before/after screenshots - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
160 lines
8.7 KiB
TypeScript
160 lines
8.7 KiB
TypeScript
export const queryKeys = {
|
|
companies: {
|
|
all: ["companies"] as const,
|
|
detail: (id: string) => ["companies", id] as const,
|
|
stats: ["companies", "stats"] as const,
|
|
},
|
|
companySkills: {
|
|
list: (companyId: string) => ["company-skills", companyId] as const,
|
|
detail: (companyId: string, skillId: string) => ["company-skills", companyId, skillId] as const,
|
|
updateStatus: (companyId: string, skillId: string) =>
|
|
["company-skills", companyId, skillId, "update-status"] as const,
|
|
file: (companyId: string, skillId: string, relativePath: string) =>
|
|
["company-skills", companyId, skillId, "file", relativePath] as const,
|
|
},
|
|
agents: {
|
|
list: (companyId: string) => ["agents", companyId] as const,
|
|
detail: (id: string) => ["agents", "detail", id] as const,
|
|
runtimeState: (id: string) => ["agents", "runtime-state", id] as const,
|
|
taskSessions: (id: string) => ["agents", "task-sessions", id] as const,
|
|
skills: (id: string) => ["agents", "skills", id] as const,
|
|
instructionsBundle: (id: string) => ["agents", "instructions-bundle", id] as const,
|
|
instructionsFile: (id: string, relativePath: string) =>
|
|
["agents", "instructions-bundle", id, "file", relativePath] as const,
|
|
keys: (agentId: string) => ["agents", "keys", agentId] as const,
|
|
configRevisions: (agentId: string) => ["agents", "config-revisions", agentId] as const,
|
|
adapterModels: (companyId: string, adapterType: string) =>
|
|
["agents", companyId, "adapter-models", adapterType] as const,
|
|
detectModel: (companyId: string, adapterType: string) =>
|
|
["agents", companyId, "detect-model", adapterType] as const,
|
|
},
|
|
issues: {
|
|
list: (companyId: string) => ["issues", companyId] as const,
|
|
search: (companyId: string, q: string, projectId?: string, limit?: number) =>
|
|
["issues", companyId, "search", q, projectId ?? "__all-projects__", limit ?? "__no-limit__"] as const,
|
|
listAssignedToMe: (companyId: string) => ["issues", companyId, "assigned-to-me"] as const,
|
|
listMineByMe: (companyId: string) => ["issues", companyId, "mine-by-me"] as const,
|
|
listTouchedByMe: (companyId: string) => ["issues", companyId, "touched-by-me"] as const,
|
|
listUnreadTouchedByMe: (companyId: string) => ["issues", companyId, "unread-touched-by-me"] as const,
|
|
labels: (companyId: string) => ["issues", companyId, "labels"] as const,
|
|
listByProject: (companyId: string, projectId: string) =>
|
|
["issues", companyId, "project", projectId] as const,
|
|
listByParent: (companyId: string, parentId: string) =>
|
|
["issues", companyId, "parent", parentId] as const,
|
|
listByExecutionWorkspace: (companyId: string, executionWorkspaceId: string) =>
|
|
["issues", companyId, "execution-workspace", executionWorkspaceId] as const,
|
|
detail: (id: string) => ["issues", "detail", id] as const,
|
|
comments: (issueId: string) => ["issues", "comments", issueId] as const,
|
|
feedbackVotes: (issueId: string) => ["issues", "feedback-votes", issueId] as const,
|
|
attachments: (issueId: string) => ["issues", "attachments", issueId] as const,
|
|
documents: (issueId: string) => ["issues", "documents", issueId] as const,
|
|
documentRevisions: (issueId: string, key: string) => ["issues", "document-revisions", issueId, key] as const,
|
|
activity: (issueId: string) => ["issues", "activity", issueId] as const,
|
|
runs: (issueId: string) => ["issues", "runs", issueId] as const,
|
|
approvals: (issueId: string) => ["issues", "approvals", issueId] as const,
|
|
liveRuns: (issueId: string) => ["issues", "live-runs", issueId] as const,
|
|
activeRun: (issueId: string) => ["issues", "active-run", issueId] as const,
|
|
workProducts: (issueId: string) => ["issues", "work-products", issueId] as const,
|
|
},
|
|
routines: {
|
|
list: (companyId: string) => ["routines", companyId] as const,
|
|
detail: (id: string) => ["routines", "detail", id] as const,
|
|
runs: (id: string) => ["routines", "runs", id] as const,
|
|
activity: (companyId: string, id: string) => ["routines", "activity", companyId, id] as const,
|
|
},
|
|
executionWorkspaces: {
|
|
list: (companyId: string, filters?: Record<string, string | boolean | undefined>) =>
|
|
["execution-workspaces", companyId, filters ?? {}] as const,
|
|
summaryList: (companyId: string, filters?: Record<string, string | boolean | undefined>) =>
|
|
["execution-workspaces", companyId, "summary", filters ?? {}] as const,
|
|
detail: (id: string) => ["execution-workspaces", "detail", id] as const,
|
|
closeReadiness: (id: string) => ["execution-workspaces", "close-readiness", id] as const,
|
|
workspaceOperations: (id: string) => ["execution-workspaces", "workspace-operations", id] as const,
|
|
},
|
|
projects: {
|
|
list: (companyId: string) => ["projects", companyId] as const,
|
|
detail: (id: string) => ["projects", "detail", id] as const,
|
|
},
|
|
goals: {
|
|
list: (companyId: string) => ["goals", companyId] as const,
|
|
detail: (id: string) => ["goals", "detail", id] as const,
|
|
},
|
|
budgets: {
|
|
overview: (companyId: string) => ["budgets", "overview", companyId] as const,
|
|
},
|
|
approvals: {
|
|
list: (companyId: string, status?: string) =>
|
|
["approvals", companyId, status] as const,
|
|
detail: (approvalId: string) => ["approvals", "detail", approvalId] as const,
|
|
comments: (approvalId: string) => ["approvals", "comments", approvalId] as const,
|
|
issues: (approvalId: string) => ["approvals", "issues", approvalId] as const,
|
|
},
|
|
access: {
|
|
joinRequests: (companyId: string, status: string = "pending_approval") =>
|
|
["access", "join-requests", companyId, status] as const,
|
|
invite: (token: string) => ["access", "invite", token] as const,
|
|
},
|
|
auth: {
|
|
session: ["auth", "session"] as const,
|
|
},
|
|
sidebarPreferences: {
|
|
companyOrder: (userId: string) => ["sidebar-preferences", "company-order", userId] as const,
|
|
projectOrder: (companyId: string, userId: string) =>
|
|
["sidebar-preferences", "project-order", companyId, userId] as const,
|
|
},
|
|
instance: {
|
|
generalSettings: ["instance", "general-settings"] as const,
|
|
schedulerHeartbeats: ["instance", "scheduler-heartbeats"] as const,
|
|
experimentalSettings: ["instance", "experimental-settings"] as const,
|
|
},
|
|
health: ["health"] as const,
|
|
secrets: {
|
|
list: (companyId: string) => ["secrets", companyId] as const,
|
|
providers: (companyId: string) => ["secret-providers", companyId] as const,
|
|
},
|
|
dashboard: (companyId: string) => ["dashboard", companyId] as const,
|
|
sidebarBadges: (companyId: string) => ["sidebar-badges", companyId] as const,
|
|
inboxDismissals: (companyId: string) => ["inbox-dismissals", companyId] as const,
|
|
activity: (companyId: string) => ["activity", companyId] as const,
|
|
costs: (companyId: string, from?: string, to?: string) =>
|
|
["costs", companyId, from, to] as const,
|
|
usageByProvider: (companyId: string, from?: string, to?: string) =>
|
|
["usage-by-provider", companyId, from, to] as const,
|
|
usageByBiller: (companyId: string, from?: string, to?: string) =>
|
|
["usage-by-biller", companyId, from, to] as const,
|
|
financeSummary: (companyId: string, from?: string, to?: string) =>
|
|
["finance-summary", companyId, from, to] as const,
|
|
financeByBiller: (companyId: string, from?: string, to?: string) =>
|
|
["finance-by-biller", companyId, from, to] as const,
|
|
financeByKind: (companyId: string, from?: string, to?: string) =>
|
|
["finance-by-kind", companyId, from, to] as const,
|
|
financeEvents: (companyId: string, from?: string, to?: string, limit: number = 100) =>
|
|
["finance-events", companyId, from, to, limit] as const,
|
|
usageWindowSpend: (companyId: string) =>
|
|
["usage-window-spend", companyId] as const,
|
|
usageQuotaWindows: (companyId: string) =>
|
|
["usage-quota-windows", companyId] as const,
|
|
heartbeats: (companyId: string, agentId?: string) =>
|
|
["heartbeats", companyId, agentId] as const,
|
|
runDetail: (runId: string) => ["heartbeat-run", runId] as const,
|
|
runWorkspaceOperations: (runId: string) => ["heartbeat-run", runId, "workspace-operations"] as const,
|
|
liveRuns: (companyId: string) => ["live-runs", companyId] as const,
|
|
runIssues: (runId: string) => ["run-issues", runId] as const,
|
|
org: (companyId: string) => ["org", companyId] as const,
|
|
skills: {
|
|
available: ["skills", "available"] as const,
|
|
},
|
|
plugins: {
|
|
all: ["plugins"] as const,
|
|
examples: ["plugins", "examples"] as const,
|
|
detail: (pluginId: string) => ["plugins", pluginId] as const,
|
|
health: (pluginId: string) => ["plugins", pluginId, "health"] as const,
|
|
uiContributions: ["plugins", "ui-contributions"] as const,
|
|
config: (pluginId: string) => ["plugins", pluginId, "config"] as const,
|
|
dashboard: (pluginId: string) => ["plugins", pluginId, "dashboard"] as const,
|
|
logs: (pluginId: string) => ["plugins", pluginId, "logs"] as const,
|
|
},
|
|
adapters: {
|
|
all: ["adapters"] as const,
|
|
},
|
|
};
|