dev #41
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
parts-catalogs (pcat) catalogs are deep trees, but every pcat node was stored as an apparent leaf (pcat: linkPath, no children) until drilled. Opening an intermediate group called parts2, which returns HTTP 400 ("The list of parts is empty"); the drill-to-children fallback only fired on that exact error string, so any other failure (cold JWT capture, timeout, 5xx) left both parts and children empty → the UI rendered "0 parça / bulunamadı" on a node whose parts live 1-3 levels deeper. #1 Persist the groups2 hasSubgroups/hasParts flags on categories (new nullable columns, migration 0007) and use them to classify: - getCategoryWithParts routes a known parent (hasSubgroups, !hasParts) straight to getChildren, never calling parts2. - enrichWithSchemaImages treats flagged parents as expandable, flagged parts-leaves as leaves, and only falls back to the "any pcat: is a leaf" heuristic for pre-migration rows (flags null). #2 Make discovery resilient: drill to sub-groups whenever the parts fetch produces nothing (empty 200 OR a thrown error), not only on HTTP 400. Mark a node unavailable only on a definitive HTTP 400 with no sub-groups; transient failures are left for a later retry. Verified live on prod (VW Passat, "Süspansiyon Çarpanlar"): full path is Süspansiyon Çarpanlar → Süspansiyon → Süspansiyon 1…5 → 74 parts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>The parts-catalogs HTTP client only retried request timeouts and 401/403; undici network errors ("TypeError: fetch failed" — a dropped/reset DataImpulse proxy connection) were thrown on the first attempt. During the cold-JWT window (outside 09:00-19:00 Istanbul) the proxy drops frequently, so a single click would surface an empty/slow category that returns full parts on a manual retry — and could even mark a populated parent group unavailable when child discovery hit the blip. Retry transient transport errors (timeout + undici network failures) with a short backoff, re-acquiring a session each attempt. Definitive HTTP responses (re-thrown as `Error: HTTP <code> …`, e.g. 400 "list of parts is empty") are still thrown immediately — they are real answers, not blips. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>