~james/core

core/web/src/fixtures/timeline.ts -rw-r--r-- 3.1 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 17 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// 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
}));