Cleanup pass

This commit is contained in:
adilallo
2026-04-29 21:18:36 -06:00
parent 7fde82a94c
commit a31a36c926
9 changed files with 103 additions and 121 deletions
+2 -3
View File
@@ -14,9 +14,8 @@ export type GovernanceTemplateCatalogEntry = {
/** Path under public/ for getAssetPath() — Figma Asset / Template Mark */
iconPath: string;
/**
* When true, the templates grid shows the “RECOMMENDED” tag (facet-based
* scores will set this in `ruleTemplateToGridEntry` when wired; catalog
* entries omit unless intentionally static).
* When true, static catalog rows show the “RECOMMENDED” tag. Facet-ranked
* `/templates` sets this in `gridEntriesWithFacetScores` instead.
*/
recommended?: boolean;
};
-16
View File
@@ -114,22 +114,6 @@ export function gridEntriesWithFacetScores(
const bySlug = (templates: RuleTemplateDto[]) =>
new Map(templates.map((t) => [t.slug, t] as const));
/**
* Ordered subset for home: follow `slugOrder`; skip missing slugs.
*/
export function gridEntriesForSlugOrder(
templates: RuleTemplateDto[],
slugOrder: readonly string[],
): TemplateGridCardEntry[] {
const map = bySlug(templates);
const out: TemplateGridCardEntry[] = [];
for (const slug of slugOrder) {
const t = map.get(slug);
if (t) out.push(ruleTemplateToGridEntry(t));
}
return out;
}
/**
* Home row: prefer API row per slug; if missing, use static Figma catalog entry.
*/