~james/core

core/web/src/fixtures/profileWorstCase.ts -rw-r--r-- 3.2 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 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
103
104
105
106
107
108
109
110
111
import type { Did, Handle } from "@atcute/lexicons/syntax";
import type { ProfileRecord } from "#lib/api/records.ts";
import type { ProfileCounts, RepoCardData } from "#lib/components/profile/types.ts";

export const worstCaseIdentity = {
	did: "did:plc:ewvi7nxzyoun6zhxrhs64oiz",
	handle: "aleksandra-wisniewska-kowalczyk.northwind-industries-holdings.example.com"
} satisfies { did: Did; handle: Handle };

export const sparseIdentity = {
	did: "did:plc:jo",
	handle: "jo.example.com"
} satisfies { did: Did; handle: Handle };

export const worstCaseProfile = {
	$type: "org.tangled.actor.profile",
	description: [
		"Staff engineer 👩🏽‍💻 at Northwind. Maintainer of Benachrichtigungseinstellungen-Synchronisierung and a dozen other things nobody asked for.",
		"Docs: https://example.com/workspaces/northwind/projects/q3-launch/docs/9f8e7d6c5b4a?tab=comments&filter=unresolved",
		"<b>not bold</b> &amp; **not markdown**"
	].join("\n"),
	pronouns: "they/them or she/her",
	location: "Szczebrzeszyn, Lubelskie, Rzeczpospolita",
	links: [
		"https://example.com/workspaces/northwind/projects/q3-launch/docs/9f8e7d6c5b4a?tab=comments&filter=unresolved",
		"https://bartholomew-fitzgerald.northwind-industries-holdings.example.com",
		"at://did:plc:ewvi7nxzyoun6zhxrhs64oiz/org.tangled.repo.manifest/self",
		"https://a.co",
		"https://example.org/~aleksandra"
	]
} as ProfileRecord;

export const worstCaseOrganizationProfile = {
	...worstCaseProfile,
	isOrganization: true,
	pronouns: undefined
} as ProfileRecord;

export const sparseProfile = { $type: "org.tangled.actor.profile" } as ProfileRecord;

export const worstCaseCounts: ProfileCounts = {
	repos: 1284,
	stars: 1_000_000,
	strings: 0,
	followers: 1,
	following: 1284,
	vouches: 999_999
};

export const sparseCounts: ProfileCounts = {
	repos: 0,
	stars: 0,
	strings: 0,
	followers: 0,
	following: 0,
	vouches: 0
};

const repo = (fields: Partial<RepoCardData> & { name: string }, index: number): RepoCardData => ({
	repoDid: `did:plc:worstrepo${index}`,
	ownerHandle: worstCaseIdentity.handle,
	createdAt: "2026-08-01T00:00:00Z",
	...fields
});

export const worstCaseRepos: RepoCardData[] = [
	repo(
		{
			name: "northwind-industries-holdings-infrastructure-terraform-modules",
			description:
				"Terraform modules for every Northwind region, environment and account, including the ones we promised to delete in 2024 but still route payroll traffic through 🙃",
			language: "HCL",
			stars: 12_345,
			forks: 1_284,
			issues: 999,
			pulls: 1
		},
		0
	),
	repo({ name: "j", language: "Rust", stars: 1, forks: 0 }, 1),
	repo(
		{
			name: "Benachrichtigungseinstellungen",
			description: "王秀英的通知设置同步工具,支持所有地区和所有语言。",
			language: "TypeScript",
			stars: 0
		},
		2
	),
	repo(
		{
			name: "نور-الهدى",
			description: "أداة لمزامنة إعدادات الإشعارات عبر جميع الأجهزة",
			language: "Go",
			stars: 1_000_000
		},
		3
	),
	...Array.from({ length: 36 }, (_, index) =>
		repo(
			{
				name: `service-${index}`,
				description:
					"A representative repository description that exercises normal wrapping.",
				language: "Rust",
				stars: index
			},
			index + 4
		)
	)
];