--- title: Interface Changes --- ```js import {API} from "./components/config.js"; ``` ```js const [published, draft, repos] = await Promise.all([ fetch(`${API}/interface-changes/?status=published`).then(r => r.ok ? r.json() : []), fetch(`${API}/interface-changes/?status=draft`).then(r => r.ok ? r.json() : []), fetch(`${API}/repos/`).then(r => r.ok ? r.json() : []), ]); ``` ```js const repoMap = Object.fromEntries(repos.map(r => [r.slug, r])); const CHANGE_TYPE_COLOR = { breaking: "#ef4444", removal: "#f97316", deprecation: "#f59e0b", additive: "#22c55e", }; function changeBadge(type) { const color = CHANGE_TYPE_COLOR[type] ?? "#6b7280"; return htl.html`${type}`; } function interfaceBadge(type) { return htl.html`${type}`; } ``` # Interface Changes Track breaking and additive mutations to published interfaces across repos. Publishing a change sends inbox notifications to all affected agents.
No changes with a planned date.
`); } else { display(htl.html`| Date | Change | Repo | Status |
|---|---|---|---|
| ${c.planned_for} | ${changeBadge(c.change_type)} ${c.title} | ${c.origin_repo_slug ?? c.repo_slug} | ${c.status} |
No published changes.
`); } else { display(htl.html`${c.description}
${p}`)}
No draft changes.
`); } else { display(htl.html`| Title | Repo | Type | Affected |
|---|---|---|---|
| ${c.title} | ${c.repo_slug} | ${changeBadge(c.change_type)} ${interfaceBadge(c.interface_type)} | ${(c.affected_repo_slugs ?? []).join(", ") || "—"} |