2026-02-17 12:24:48 -06:00
|
|
|
export const queryKeys = {
|
|
|
|
|
companies: {
|
|
|
|
|
all: ["companies"] as const,
|
|
|
|
|
detail: (id: string) => ["companies", id] as const,
|
2026-02-17 20:14:05 -06:00
|
|
|
stats: ["companies", "stats"] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
2026-03-14 10:55:04 -05:00
|
|
|
companySkills: {
|
|
|
|
|
list: (companyId: string) => ["company-skills", companyId] as const,
|
|
|
|
|
detail: (companyId: string, skillId: string) => ["company-skills", companyId, skillId] as const,
|
2026-03-14 13:52:20 -05:00
|
|
|
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,
|
2026-03-14 10:55:04 -05:00
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
agents: {
|
|
|
|
|
list: (companyId: string) => ["agents", companyId] as const,
|
|
|
|
|
detail: (id: string) => ["agents", "detail", id] as const,
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
runtimeState: (id: string) => ["agents", "runtime-state", id] as const,
|
2026-02-19 14:02:29 -06:00
|
|
|
taskSessions: (id: string) => ["agents", "task-sessions", id] as const,
|
2026-03-13 22:49:42 -05:00
|
|
|
skills: (id: string) => ["agents", "skills", id] as const,
|
2026-03-17 13:42:00 -05:00
|
|
|
instructionsBundle: (id: string) => ["agents", "instructions-bundle", id] as const,
|
|
|
|
|
instructionsFile: (id: string, relativePath: string) =>
|
|
|
|
|
["agents", "instructions-bundle", id, "file", relativePath] as const,
|
2026-02-17 20:46:12 -06:00
|
|
|
keys: (agentId: string) => ["agents", "keys", agentId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
configRevisions: (agentId: string) => ["agents", "config-revisions", agentId] as const,
|
2026-03-05 15:24:20 +01:00
|
|
|
adapterModels: (companyId: string, adapterType: string) =>
|
|
|
|
|
["agents", companyId, "adapter-models", adapterType] as const,
|
2026-03-28 01:34:48 +01:00
|
|
|
detectModel: (companyId: string, adapterType: string) =>
|
|
|
|
|
["agents", companyId, "detect-model", adapterType] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
issues: {
|
|
|
|
|
list: (companyId: string) => ["issues", companyId] as const,
|
2026-04-06 20:30:50 -05:00
|
|
|
search: (companyId: string, q: string, projectId?: string, limit?: number) =>
|
|
|
|
|
["issues", companyId, "search", q, projectId ?? "__all-projects__", limit ?? "__no-limit__"] as const,
|
2026-02-26 16:33:39 -06:00
|
|
|
listAssignedToMe: (companyId: string) => ["issues", companyId, "assigned-to-me"] as const,
|
2026-03-26 08:19:16 -05:00
|
|
|
listMineByMe: (companyId: string) => ["issues", companyId, "mine-by-me"] as const,
|
2026-03-06 08:21:03 -06:00
|
|
|
listTouchedByMe: (companyId: string) => ["issues", companyId, "touched-by-me"] as const,
|
|
|
|
|
listUnreadTouchedByMe: (companyId: string) => ["issues", companyId, "unread-touched-by-me"] as const,
|
2026-02-25 08:38:37 -06:00
|
|
|
labels: (companyId: string) => ["issues", companyId, "labels"] as const,
|
2026-02-23 14:41:21 -06:00
|
|
|
listByProject: (companyId: string, projectId: string) =>
|
|
|
|
|
["issues", companyId, "project", projectId] as const,
|
2026-04-08 16:56:59 -05:00
|
|
|
listByParent: (companyId: string, parentId: string) =>
|
|
|
|
|
["issues", companyId, "parent", parentId] as const,
|
2026-03-28 22:21:24 -05:00
|
|
|
listByExecutionWorkspace: (companyId: string, executionWorkspaceId: string) =>
|
|
|
|
|
["issues", companyId, "execution-workspace", executionWorkspaceId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
detail: (id: string) => ["issues", "detail", id] as const,
|
|
|
|
|
comments: (issueId: string) => ["issues", "comments", issueId] as const,
|
2026-04-02 09:11:49 -05:00
|
|
|
feedbackVotes: (issueId: string) => ["issues", "feedback-votes", issueId] as const,
|
2026-02-20 10:32:32 -06:00
|
|
|
attachments: (issueId: string) => ["issues", "attachments", issueId] as const,
|
2026-03-13 21:30:48 -05:00
|
|
|
documents: (issueId: string) => ["issues", "documents", issueId] as const,
|
|
|
|
|
documentRevisions: (issueId: string, key: string) => ["issues", "document-revisions", issueId, key] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
activity: (issueId: string) => ["issues", "activity", issueId] as const,
|
|
|
|
|
runs: (issueId: string) => ["issues", "runs", issueId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
approvals: (issueId: string) => ["issues", "approvals", issueId] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
liveRuns: (issueId: string) => ["issues", "live-runs", issueId] as const,
|
|
|
|
|
activeRun: (issueId: string) => ["issues", "active-run", issueId] as const,
|
2026-03-13 17:12:25 -05:00
|
|
|
workProducts: (issueId: string) => ["issues", "work-products", issueId] as const,
|
|
|
|
|
},
|
2026-03-19 08:39:24 -05:00
|
|
|
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,
|
|
|
|
|
},
|
2026-03-13 17:12:25 -05:00
|
|
|
executionWorkspaces: {
|
|
|
|
|
list: (companyId: string, filters?: Record<string, string | boolean | undefined>) =>
|
|
|
|
|
["execution-workspaces", companyId, filters ?? {}] as const,
|
[codex] improve issue and routine UI responsiveness (#3744)
## 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>
2026-04-15 15:54:05 -05:00
|
|
|
summaryList: (companyId: string, filters?: Record<string, string | boolean | undefined>) =>
|
|
|
|
|
["execution-workspaces", companyId, "summary", filters ?? {}] as const,
|
2026-03-13 17:12:25 -05:00
|
|
|
detail: (id: string) => ["execution-workspaces", "detail", id] as const,
|
2026-03-28 16:15:20 -05:00
|
|
|
closeReadiness: (id: string) => ["execution-workspaces", "close-readiness", id] as const,
|
2026-03-28 16:46:43 -05:00
|
|
|
workspaceOperations: (id: string) => ["execution-workspaces", "workspace-operations", id] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
},
|
2026-03-14 22:00:12 -05:00
|
|
|
budgets: {
|
|
|
|
|
overview: (companyId: string) => ["budgets", "overview", companyId] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
approvals: {
|
|
|
|
|
list: (companyId: string, status?: string) =>
|
|
|
|
|
["approvals", companyId, status] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
detail: (approvalId: string) => ["approvals", "detail", approvalId] as const,
|
|
|
|
|
comments: (approvalId: string) => ["approvals", "comments", approvalId] as const,
|
|
|
|
|
issues: (approvalId: string) => ["approvals", "issues", approvalId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
2026-02-23 14:41:21 -06:00
|
|
|
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,
|
|
|
|
|
},
|
[codex] Improve workspace runtime and navigation ergonomics (#3680)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - That operator experience depends not just on issue chat, but also on
how workspaces, inbox groups, and navigation state behave over
long-running sessions
> - The current branch included a separate cluster of workspace-runtime
controls, inbox grouping, sidebar ordering, and worktree lifecycle fixes
> - Those changes cross server, shared contracts, database state, and UI
navigation, but they still form one coherent operator workflow area
> - This pull request isolates the workspace/runtime and navigation
ergonomics work into one standalone branch
> - The benefit is better workspace recovery and navigation persistence
without forcing reviewers through the unrelated issue-detail/chat work
## What Changed
- Improved execution workspace and project workspace controls, request
wiring, layout, and JSON editor ergonomics
- Hardened linked worktree reuse/startup behavior and documented the
`worktree repair` flow for recovering linked worktrees safely
- Added inbox workspace grouping, mobile collapse, archive undo,
keyboard navigation, shared group-header styling, and persisted
collapsed-group behavior
- Added persistent sidebar order preferences with the supporting DB
migration, shared/server contracts, routes, services, hooks, and UI
integration
- Scoped issue-list preferences by context and added targeted UI/server
tests for workspace controls, inbox behavior, sidebar preferences, and
worktree validation
## Verification
- `pnpm vitest run
server/src/__tests__/sidebar-preferences-routes.test.ts
ui/src/pages/Inbox.test.tsx
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/api/workspace-runtime-control.test.ts`
- `server/src/__tests__/workspace-runtime.test.ts` was attempted, but
the embedded Postgres suite self-skipped/hung on this host after
reporting an init-script issue, so it is not counted as a local pass
here
## Risks
- Medium: this branch includes migration-backed preference storage plus
worktree/runtime behavior, so merge review should pay attention to state
persistence and worktree recovery semantics
- The sidebar preference migration is standalone, but it should still be
watched for conflicts if another migration lands first
## Model Used
- OpenAI Codex coding agent (GPT-5-class runtime in Codex CLI; exact
deployed model ID is not exposed in this environment), reasoning
enabled, tool use and local code execution enabled
## 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)
- [ ] 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>
2026-04-14 12:57:11 -05:00
|
|
|
sidebarPreferences: {
|
|
|
|
|
companyOrder: (userId: string) => ["sidebar-preferences", "company-order", userId] as const,
|
|
|
|
|
projectOrder: (companyId: string, userId: string) =>
|
|
|
|
|
["sidebar-preferences", "project-order", companyId, userId] as const,
|
|
|
|
|
},
|
2026-03-12 08:03:55 -05:00
|
|
|
instance: {
|
2026-03-20 08:00:39 -05:00
|
|
|
generalSettings: ["instance", "general-settings"] as const,
|
2026-03-12 08:03:55 -05:00
|
|
|
schedulerHeartbeats: ["instance", "scheduler-heartbeats"] as const,
|
2026-03-17 09:24:28 -05:00
|
|
|
experimentalSettings: ["instance", "experimental-settings"] as const,
|
2026-03-12 08:03:55 -05:00
|
|
|
},
|
2026-02-23 14:41:21 -06:00
|
|
|
health: ["health"] as const,
|
2026-02-19 15:44:05 -06:00
|
|
|
secrets: {
|
|
|
|
|
list: (companyId: string) => ["secrets", companyId] as const,
|
|
|
|
|
providers: (companyId: string) => ["secret-providers", companyId] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
dashboard: (companyId: string) => ["dashboard", companyId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
sidebarBadges: (companyId: string) => ["sidebar-badges", companyId] as const,
|
2026-04-07 18:26:34 -05:00
|
|
|
inboxDismissals: (companyId: string) => ["inbox-dismissals", companyId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
activity: (companyId: string) => ["activity", companyId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
costs: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["costs", companyId, from, to] as const,
|
feat(ui): add resource and usage dashboard (/usage route)
adds a new /usage page that lets board operators see how much each ai
provider is consuming across any date window, with per-model breakdowns,
rolling 5h/24h/7d burn windows, weekly budget bars, and a deficit notch
when projected spend is on track to exceed the monthly budget.
- new GET /companies/:id/costs/by-provider endpoint aggregates cost events
by provider + model with pro-rated billing type splits from heartbeat runs
- new GET /companies/:id/costs/window-spend endpoint returns rolling window
spend (5h, 24h, 7d) per provider with no schema changes
- QuotaBar: reusable boxed-border progress bar with green/yellow/red
threshold fill colors and optional deficit notch
- ProviderQuotaCard: per-provider card showing budget allocation bars,
rolling windows, subscription usage, and model breakdown with token/cost
share overlays
- Usage page: date preset toggles (mtd, 7d, 30d, ytd, all, custom),
provider tabs, 30s polling plus ws invalidation on cost_event
- custom date range blocks queries until both dates are selected and
treats boundaries as local-time (not utc midnight) so full days are
included regardless of timezone
- query key to timestamp is floored to the nearest minute to prevent
cache churn on every 30s refetch tick
2026-03-08 03:18:37 +05:30
|
|
|
usageByProvider: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["usage-by-provider", companyId, from, to] as const,
|
2026-03-14 22:00:12 -05:00
|
|
|
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,
|
feat(ui): add resource and usage dashboard (/usage route)
adds a new /usage page that lets board operators see how much each ai
provider is consuming across any date window, with per-model breakdowns,
rolling 5h/24h/7d burn windows, weekly budget bars, and a deficit notch
when projected spend is on track to exceed the monthly budget.
- new GET /companies/:id/costs/by-provider endpoint aggregates cost events
by provider + model with pro-rated billing type splits from heartbeat runs
- new GET /companies/:id/costs/window-spend endpoint returns rolling window
spend (5h, 24h, 7d) per provider with no schema changes
- QuotaBar: reusable boxed-border progress bar with green/yellow/red
threshold fill colors and optional deficit notch
- ProviderQuotaCard: per-provider card showing budget allocation bars,
rolling windows, subscription usage, and model breakdown with token/cost
share overlays
- Usage page: date preset toggles (mtd, 7d, 30d, ytd, all, custom),
provider tabs, 30s polling plus ws invalidation on cost_event
- custom date range blocks queries until both dates are selected and
treats boundaries as local-time (not utc midnight) so full days are
included regardless of timezone
- query key to timestamp is floored to the nearest minute to prevent
cache churn on every 30s refetch tick
2026-03-08 03:18:37 +05:30
|
|
|
usageWindowSpend: (companyId: string) =>
|
|
|
|
|
["usage-window-spend", companyId] as const,
|
2026-03-08 16:35:14 +05:30
|
|
|
usageQuotaWindows: (companyId: string) =>
|
|
|
|
|
["usage-quota-windows", companyId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
heartbeats: (companyId: string, agentId?: string) =>
|
|
|
|
|
["heartbeats", companyId, agentId] as const,
|
2026-03-10 21:16:33 -05:00
|
|
|
runDetail: (runId: string) => ["heartbeat-run", runId] as const,
|
2026-03-17 09:36:35 -05:00
|
|
|
runWorkspaceOperations: (runId: string) => ["heartbeat-run", runId, "workspace-operations"] as const,
|
2026-02-20 10:32:32 -06:00
|
|
|
liveRuns: (companyId: string) => ["live-runs", companyId] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
runIssues: (runId: string) => ["run-issues", runId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
org: (companyId: string) => ["org", companyId] as const,
|
2026-03-17 09:10:40 -05:00
|
|
|
skills: {
|
|
|
|
|
available: ["skills", "available"] as const,
|
|
|
|
|
},
|
2026-03-13 16:22:34 -05:00
|
|
|
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,
|
2026-03-13 16:58:29 -05:00
|
|
|
uiContributions: ["plugins", "ui-contributions"] as const,
|
2026-03-13 16:22:34 -05:00
|
|
|
config: (pluginId: string) => ["plugins", pluginId, "config"] as const,
|
|
|
|
|
dashboard: (pluginId: string) => ["plugins", pluginId, "dashboard"] as const,
|
|
|
|
|
logs: (pluginId: string) => ["plugins", pluginId, "logs"] as const,
|
|
|
|
|
},
|
2026-03-31 20:21:13 +01:00
|
|
|
adapters: {
|
|
|
|
|
all: ["adapters"] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
};
|