// fixture feed and rail data for the timeline stories
import type { RepoCardData } from "#lib/components/profile/types.ts";
import type * as OrgTangledFeedGetTimeline from "#lib/api/lexicons/types/org/tangled/feed/getTimeline.ts";
const owner = { did: "did:plc:3p7ejjxnufohsygt5vbyxb2i", handle: "tangled.org" };
const alice = { did: "did:plc:oky5czdrnfjpqslsw2a5iclo", handle: "alice.tngl.sh" };
const repo = {
did: "did:plc:3p7ejjxnufohsygt5vbyxb2i",
slug: "core",
owner,
createdAt: "2025-06-01T10:30:00Z",
description: "The knot server, appview, and everything that makes tangled tick.",
starCount: 42,
primaryLanguage: "Go"
};
export const feed = [
{
event: {
$type: "org.tangled.feed.getTimeline#repoEvent",
cid: "bafyreib1",
uri: "at://did:plc:3p7ejjxnufohsygt5vbyxb2i/sh.tangled.repo/core",
repo
},
eventAt: "2025-06-04T09:00:00Z"
},
{
event: {
$type: "org.tangled.feed.getTimeline#starEvent",
cid: "bafyreib2",
uri: "at://did:plc:oky5czdrnfjpqslsw2a5iclo/org.tangled.feed.star/3l",
actor: alice,
repo
},
eventAt: "2025-06-03T18:20:00Z"
},
{
event: {
$type: "org.tangled.feed.getTimeline#followEvent",
cid: "bafyreib3",
uri: "at://did:plc:oky5czdrnfjpqslsw2a5iclo/org.tangled.graph.follow/3l",
actor: alice,
subject: {
did: "did:plc:3p7ejjxnufohsygt5vbyxb2i",
handle: "erin.tngl.sh",
description: "Rust, TUIs, and the occasional git plumbing yak-shave.",
followersCount: 128,
followsCount: 87
}
},
eventAt: "2025-06-02T12:00:00Z"
},
{
event: {
$type: "org.tangled.feed.getTimeline#repoEvent",
cid: "bafyreib4",
uri: "at://did:plc:3p7ejjxnufohsygt5vbyxb2i/sh.tangled.repo/core-fork",
repo: { ...repo, slug: "core-fork" },
source: repo
},
eventAt: "2025-06-01T08:00:00Z"
}
] as unknown as OrgTangledFeedGetTimeline.$output["feed"];
export const trending: RepoCardData[] = [
{
name: "core",
repoDid: "did:plc:3p7ejjxnufohsygt5vbyxb2i",
ownerHandle: "tangled.org",
description: "The knot server, appview, and everything that makes tangled tick.",
createdAt: "2025-06-01T10:30:00Z",
stars: 1234
},
{
name: "spindle",
repoDid: "did:plc:oky5czdrnfjpqslsw2a5iclo",
ownerHandle: "alice.tngl.sh",
description: "A tiny CI runner that speaks the pipeline lexicon.",
createdAt: "2025-05-20T08:00:00Z",
stars: 87
},
{
name: "dotfiles",
repoDid: "did:plc:6qtmvlpvcgwuemcxjbfvnpxg",
ownerHandle: "someone-with-a-rather-long-handle.example.com",
createdAt: "2025-05-18T08:00:00Z",
stars: 9
}
];
// the trending rail always shows a fixed 5 rows, so the skeleton fixture
// needs a full 5 items (with descriptions) to capture that exact height
export const trendingSkeleton: RepoCardData[] = Array.from({ length: 5 }, (_, i) => ({
name: trending[i % trending.length]!.name,
repoDid: `${trending[i % trending.length]!.repoDid}${i}`,
ownerHandle: trending[i % trending.length]!.ownerHandle,
description: trending[i % trending.length]!.description ?? "A tiny CI runner.",
createdAt: trending[i % trending.length]!.createdAt,
stars: trending[i % trending.length]!.stars
}));