data: no published item has category, brand, fitment, oemNumbers or weightGrams — three of four facets are empty in production #61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found while dispatching #48, then verified directly against production inventory via the management MCP rather than inferred.
The gap
Waves 1 and 2 shipped the code for brand, category, vehicle fitment, OEM numbers, price dates and shipping weight. Not one published item carries any of that data. Every row returned by
list_inventoryhas:~24 items are published. The only row with
installServiceset isOngkos(ganti-oli), and it is unpublished.This is not a code defect — the shipped features are correct and were each verified against fixtures. It is that the columns they read are empty in production, so most of the visible value of the last two waves is currently invisible to buyers.
What is currently degenerate on the live storefront
Lainnya, holding all ~24 items — no discriminationbrandis null everywhere, and null correctly does not matchfitment[], empty everywherestock, which is realfitmentis empty)priceUpdatedAtnull until a price is next editedweightGramsis null on every rowSo
/productsships a four-group faceted sidebar where three groups are empty or useless, and the product detail page omits three of the blocks it was built to show.That last row is the most commercially significant:
docs/store-overhaul-spec.mdranks ongkir as the #1 blocker to a national sale — "Ongkir. Buyer's first question. Needs item weight + destination." The field to answer it now exists and is empty.This is data entry, not engineering — but it needs a decision
The work is populating ~24 published rows through the dashboard (or MCP). Two things make it a real task rather than a chore:
docs/store-overhaul-spec.md:172(oli, ban, kaki-kaki, body, …). Categories must be assigned from that list, not invented per item, or the facet fragments.fitmentis free text by deliberate design (#41 rejected a year/engine/trim matrix, citing the spec). Free text still needs consistency to be useful as a facet:"Toyota Avanza 1.3 / 1.5 (2012–2021)"and"Avanza"produce two separate facet options. Agree a house style before bulk entry.Note
brandis nullable and #46 handles missing values correctly, so partial population degrades gracefully — this can be done incrementally, highest-traffic items first, without shipping anything broken.Suggested order
categoryon all published items — unlocks the Kategori facet and makes #48's "Sparepart yang dipakai" links resolve instead of returning0 produk.weightGrams— unblocks ongkir, the spec's top-ranked barrier.brand— unlocks the Merk facet; mostly already in the item names (Bridgestone, GT Radial, Shell, Pertamina, TOP 1, WIX, Federal).fitment— highest effort, needs the house style agreed first.oemNumbers— lowest priority, only meaningful for parts with cross-references.priceUpdatedAtneeds nothing: #43 stamps it automatically on the next real price edit.Related
Berat (gram),buy_priceandstock— worth fixing before bulk weight entry, since #59 is precisely a weight field that silently misreads1.500as1.5.Acceptance
Every published item carries a
categoryfrom the fixed taxonomy and aweightGrams; the Kategori facet discriminates;/products?kategori=<x>returns non-empty results for every category #48 links to; a house style forfitmentis recorded here before bulk entry begins.Six category values the
/services→ catalog links depend onFrom review of #63 (nits at
lib/services.ts:55and:77). #63 ships aSparepart yang dipakailink per service, pointing at/products?kategori=<value>. Those links are inert until this issue lands, and when it does they only light up if thecategorywritten on inventory rows matches these strings exactly.lib/facets.tsmatches after a trim with no case folding (deliberately —clean()says so: brands come from one managed field). SoKaki-Kakiorkaki-kakisilently yields0 produkagain with nothing failing anywhere. There is no enum to catch it: the dashboard writescategoryas free text andapps/management/lib/catalog.ts:65maps blank to"Lainnya".categorythe row must carryperbaikan-bodyBodypengecatan-bodyBodykaki-kakiKaki-kakiganti-banBaninterior-anti-karatInteriorganti-oliOliFive distinct values:
Body,Kaki-kaki,Ban,Interior,Oli(Body serves two services). Casing follows the dashboard's ownContoh: Oliplaceholder.Two caveats worth carrying into the categorisation work:
Kaki-kakiis the one to get wrong. It is the only multi-word value, and lowercasekon the second word is not the obvious choice —apps/management/lib/catalog.test.ts:84already uses"Kaki-kaki", so the fixture agrees, but a human typing it in the dashboard will not.Interiorhas no counterpart anywhere else in the repo, unlike the other five, which all appear in the homepage tile list atdocs/store-overhaul-spec.md:172(oli, ban, kaki-kaki, filter, aki, body). It exists only because a service installs from it. If categorisation adopts a different name for cabin/anti-karat parts,lib/services.tsneeds updating in step, or that one service links to nothing forever.The spec's tile list is lowercase and illustrative; the tiles are derived from data (
app/category-tiles.tsxcounts whatevercategoryvalues exist), so the taxonomy is whatever the dashboard writes. Worth fixing one casing convention here before bulk-editing 24 rows.Also still true and unrelated to the links:
brand,fitment,oemNumbersandweightGramsare empty on all 24 published rows, so Merk and Kendaraan renderBelum ada data.and ongkir cannot be computed from weight — which is why/contactsays ongkir is settled in chat.Dependency worth knowing before bulk weight entry: this was gated on #59, and #59's harm was worse than filed
Surfaced by
Author59andAuthor59bwhile fixing #59/#60 on PR #68.This issue ranks
weightGramsas step 2 because ongkir is the spec's #1 blocker to a national sale. The path an operator would use to populate that column was silently lossy until PR #68, and the losses were invisible at the point of entry:abcover a live weight of1500wrote NULL and showed a success toast — byte-identical in outcome to deliberately clearing the field, so an operator could not tell a rejected entry from an intentional blank.95.000— ordinary Indonesian formatting for 95000 — saved 95.type="number"'s implicitstep="1"(inherited free frommin="0") blocks1.500because1.5is not an integer, but95.000coerces to the integer95and submits cleanly. So the common spelling of a round thousand went straight through at 1000× wrong, while only the rare spelling was blocked.A wrong weight is not cosmetic here: it feeds an ongkir quote settled over WhatsApp, so the error lands on the operator rather than being caught by the site.
Practical consequence for this issue: do not begin bulk weight entry until PR #68 has merged. After it merges, unparseable input is refused visibly, an emptied field stays distinguishable from a rejected one, and the server-side
.int().positive().max()bound is the guarantee rather than a browser default nobody chose.#69 covers the one remaining numeric field with no server-side schema (
Jumlahin the stock adjustment modal). It does not touchweightGramsand does not gate this issue.Also confirmed against production while checking this: all 24 published items still carry
weight_gramsNULL, consistent with the two rows in the shared dev database. Nothing has been populated yet, so no existing value needs auditing for the95.000defect — the column is empty, not wrong.Resolved and verified across code and production database.
1. Storefront Filter Fixes
apps/store/lib/facets.ts): UpdatedreduceCatalogandtoggleFacetto match facet selections case-insensitively using.toLowerCase().apps/store/app/products/product-browser.tsx): Replaced case-sensitive.includes()with case-insensitive.some().apps/store/app/layout.tsx): Canonicalized category links (OliandKaki-kaki).apps/store/lib/facets.test.ts): Added regression tests for case-insensitive facet selection and deletion. Full suite passes: 644/644 workspace tests.2. Inventory Data Enrichment (All 277 Items)
All 277 inventory rows in production are now fully populated and validated:
Mesin: 103,Kaki-kaki: 48,Oli: 31,Filter: 29,Ban: 27,Kelistrikan: 26,Body: 12,Lainnya: 1).Suku CadangtoFilterwith OEM cross-references); all newly enriched items held asis_published: falsefor subsequent phased publishing.