Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

Commit

Explore shows each repository's project's description, read from projects as the page renders: flagon-io/demo's card said "No description." while its project says "Countdown website to Cloudflare Connect SF 2026". Explore read search's own copy, kept from project.updated, which a new repository's description could miss. The workspace's Repositories, a repository's forks and starred lists already read projects.descriptions; Explore now does too, by the repository id search now gives each card (ExploreRepo.id). Until search is deployed with ids, the card keeps search's copy. Checked: apps/web tsc -b; search cargo check (wasm32).

G1t-Session:
ses_01m5010wznemvbmvdx55ejy8pf
syntaqxcommitted Parent992effdBrowse files
4 files+19−50/4 viewed
+12−5
3232 const explore = await search
3333 .explore(getViewer(context), { sort, language, topic, page: pageNumber })
3434 .catch(() => null);
35− // Each one's homepage or production, from its project; the page shows without them.
36− const links = explore
37− ? await projects.publicLinks(explore.repos.map((repo) => ({ namespace: repo.namespace, name: repo.name }))).catch(() => ({}))
38− : {};
39− return { sort, language, topic, explore, links: links as Record<string, string> };
35+ // Each one's homepage or production, and its description, from its project;
36+ // the page shows without them.
37+ const [links, about] = explore
38+ ? await Promise.all([
39+ projects.publicLinks(explore.repos.map((repo) => ({ namespace: repo.namespace, name: repo.name }))).catch(() => ({})),
40+ projects.descriptions(explore.repos.map((repo) => repo.id).filter(Boolean)).catch(() => ({})),
41+ ])
42+ : [{}, {}];
43+ const described = (about as Record<string, string>) ?? {};
44+ // A search from before ids keeps its own copy until it is deployed too.
45+ const repos = (explore?.repos ?? []).map((repo) => ({ ...repo, description: repo.id ? (described[repo.id] ?? null) : repo.description }));
46+ return { sort, language, topic, explore: explore && { ...explore, repos }, links: links as Record<string, string> };
4047 }
4148
4249 /** The address of Explore with some of its filters changed. */
+4−0
286286 #[derive(Clone, Debug, Serialize, Deserialize)]
287287 #[serde(rename_all = "camelCase")]
288288 pub struct ExploreRepo {
289+ /// The repository's id, for what other services keep about it, such as
290+ /// its project's description.
291+ #[serde(default)]
292+ pub id: String,
289293 pub namespace: String,
290294 pub name: String,
291295 pub description: Option<String>,
+2−0
7777 };
7878
7979 export type ExploreRepo = {
80+ /** The repository's id: its description is its project's, read by it. */
81+ id: string;
8082 namespace: string;
8183 name: string;
8284 description: string | null;
+1−0
450450 .filter(|row| keep.contains(&row.repo_id))
451451 .map(|row| ExploreRepo {
452452 archived: archived.contains(&row.repo_id),
453+ id: row.repo_id,
453454 namespace: row.namespace,
454455 name: row.name,
455456 description: row.description,

Comments

Sign in to comment.