fix: construct issue AT-URI for timeline endpoint, make timeline non-fatal The timeline endpoint expects an issue AT-URI param, not separate did/repo/rkey. Timeline fetch failure no longer causes 404 on the issue detail page.

Author: Aaron Steven White
Commit d7c80c19fbb39a8ea0985decc53bf64c9627475f
Parent: 894d126c84
Structural diff unavailable

These commits were pushed via plain git push, so no pre-parsed schemas are available. Install git-remote-cospan and re-push via panproto:// to see scope-level changes, breaking change detection, and semantic diffs.

brew install panproto/tap/git-remote-cospan
2 files changed +12 -5
@@ -77,5 +77,10 @@ export function getIssueTimeline(params: {
7777 	limit?: number;
7878 	cursor?: string;
7979 }): Promise<IssueTimelineResponse> {
80-	return xrpcQuery<IssueTimelineResponse>('dev.cospan.repo.issue.getTimeline', params);
80+	const issueUri = `at://${params.did}/dev.cospan.repo.issue/${params.rkey}`;
81+	return xrpcQuery<IssueTimelineResponse>('dev.cospan.repo.issue.getTimeline', {
82+		issue: issueUri,
83+		limit: params.limit,
84+		cursor: params.cursor,
85+	});
8186 }
@@ -4,10 +4,12 @@ import { getIssue, getIssueTimeline } from '$lib/api/issue.js';
44 
55 export const load: PageServerLoad = async ({ params }) => {
66 	try {
7-		const [issue, timeline] = await Promise.all([
8-			getIssue({ did: params.did, repo: params.repo, rkey: params.rkey }),
9-			getIssueTimeline({ did: params.did, repo: params.repo, rkey: params.rkey, limit: 50 })
10-		]);
7+		const issue = await getIssue({ did: params.did, repo: params.repo, rkey: params.rkey });
8+
9+		let timeline = { events: [] as any[], cursor: null as string | null };
10+		try {
11+			timeline = await getIssueTimeline({ did: params.did, repo: params.repo, rkey: params.rkey, limit: 50 });
12+		} catch {}
1113 
1214 		return {
1315 			did: params.did,
cospan · schematic version control on atproto built on AT Protocol