feat(canonical): şablon ENTRY-seviyesi — decode anında tam gezinilebilir yapı
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Kullanıcının orijinal tasarımı: aynı (kaynak, marka)da kategori yapısı birebir aynı — değişen yalnız parça kodları/şemalar. Önceki şablon sadece kova/alt-yaprak BAŞLIKLARINI overlay ediyordu → taze araçta "Aydınlatma — 0 kategori". Yeni: canonical_template_entries (migration 0031) — markanın paylaşılan kaynak-kategori ADLARI (≥2 araç); backfill'de rebuild. overlayTemplate eksik adları disabled placeholder olarak basar (unavailable=true, CategoryGrid zaten soluk+tıklanamaz render ediyor) → decode anında her kova tam adlarıyla dolu; drill tamamlanınca placeholder'lar gerçek satıra dönüşür. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1017,6 +1017,25 @@ export const categoryCanonicalMap = pgTable(
|
||||
// brand template so the user sees the FULL canonical structure instantly, before
|
||||
// this vehicle's own tree is deep-drilled by the prefetch backfill. Rebuilt at
|
||||
// the end of each global canonical-backfill run (derived, so full-refresh).
|
||||
// Entry-level companion of canonicalStructureTemplate: the browsable source-
|
||||
// category NAMES every vehicle of (source, brand) shares under a bucket/sub.
|
||||
// A freshly-decoded vehicle renders these immediately (placeholder until its
|
||||
// own row exists) — only parts/schemas are vehicle-specific.
|
||||
export const canonicalTemplateEntries = pgTable(
|
||||
"canonical_template_entries",
|
||||
{
|
||||
id: uuid("id").primaryKey().defaultRandom(),
|
||||
source: varchar("source", { length: 20 }).notNull(),
|
||||
brand: varchar("brand", { length: 120 }).notNull(),
|
||||
canonicalCategoryId: uuid("canonical_category_id").notNull(),
|
||||
canonicalSubcategoryId: uuid("canonical_subcategory_id"),
|
||||
name: varchar("name", { length: 500 }).notNull(),
|
||||
vehicleCount: integer("vehicle_count").default(0).notNull(),
|
||||
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow().notNull(),
|
||||
},
|
||||
(table) => [index("canonical_template_entries_sb_idx").on(table.source, table.brand)],
|
||||
);
|
||||
|
||||
export const canonicalStructureTemplate = pgTable(
|
||||
"canonical_structure_template",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user