-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
What
The /products/[barcode]/edit route (and potentially /products/new) shows a blank page, then reloads, and finally displays an error message. The page never successfully renders.
The edit page's function in src/routes/products/[barcode]/edit/+page.ts]uses a single Promise.all() to simultaneously await the product API call and 6 large taxonomy JSON files:
const [productReq, categories, labels, brands, stores, origins, countries] = await Promise.all([
off.getProductV3(params.barcode, { ... }),
getTaxo<Category>('categories', fetch), // ~10+ MB
getTaxo<Label>('labels', fetch),
getTaxo<Brand>('brands', fetch),
getTaxo<Store>('stores', fetch),
getTaxo<Origin>('origins', fetch),
getTaxo<Country>('countries', fetch)
]);Combined with export const ssr = false, this causes:
Blank page -> SSR is disabled, so the server sends an empty HTML shell; Long wait; Error page
Steps to reproduce the behavior:
- Run the explorer locally (pnpm run dev)
- Navigate to /products/8436006833168/edit (or any valid barcode)
- Observe: blank page -> loading -> error
Expected behavior
The edit form should render immediately with product data
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog