mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
Backend: - Add router.param middleware in issues, activity, and agents routes to resolve identifiers (e.g. PAP-39) to UUIDs before handlers run - Simplify GET /issues/:id now that param middleware handles resolution - Include identifier in getAncestors response and issuesForRun query - Add identifier field to IssueAncestor shared type Frontend: - Update all issue navigation links across 15+ files to use issue.identifier ?? issue.id instead of bare UUIDs - Add URL redirect in IssueDetail: navigating via UUID automatically replaces the URL with the human-readable identifier - Fix childIssues filter to use issue.id (UUID) instead of URL param so it works correctly with identifier-based URLs - Add issueUrl() utility in lib/utils.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
908 B
TypeScript
29 lines
908 B
TypeScript
import type { ActivityEvent } from "@paperclip/shared";
|
|
import { api } from "./client";
|
|
|
|
export interface RunForIssue {
|
|
runId: string;
|
|
status: string;
|
|
agentId: string;
|
|
startedAt: string | null;
|
|
finishedAt: string | null;
|
|
createdAt: string;
|
|
invocationSource: string;
|
|
usageJson: Record<string, unknown> | null;
|
|
resultJson: Record<string, unknown> | null;
|
|
}
|
|
|
|
export interface IssueForRun {
|
|
issueId: string;
|
|
identifier: string | null;
|
|
title: string;
|
|
status: string;
|
|
priority: string;
|
|
}
|
|
|
|
export const activityApi = {
|
|
list: (companyId: string) => api.get<ActivityEvent[]>(`/companies/${companyId}/activity`),
|
|
forIssue: (issueId: string) => api.get<ActivityEvent[]>(`/issues/${issueId}/activity`),
|
|
runsForIssue: (issueId: string) => api.get<RunForIssue[]>(`/issues/${issueId}/runs`),
|
|
issuesForRun: (runId: string) => api.get<IssueForRun[]>(`/heartbeat-runs/${runId}/issues`),
|
|
};
|