fix(review): black screen on Capture→Review — speciesId/gradeId refs

The merge auto-kept the branch's canCreateTitle reactive (speciesId) which is
undeclared in the merged file (main's canonical var is speciesSel) → ReferenceError
on Review mount → black screen. Also dropped the branch's duplicate gradeId (main
uses gradeSel) and repointed hydrate/patch to gradeSel. Live UAT verified: Review
now mounts and renders 'Review to Ready' with photo strip + Create buttons.
This commit is contained in:
Ty
2026-09-21 12:17:24 -07:00
parent 8ee3da9dcf
commit 67aa3d6b0d
2 changed files with 23 additions and 4 deletions
+20
View File
@@ -77,3 +77,23 @@ Do not put a host name in the product spec.
- Not exercised live: the full browser Create-button click (verified via in-repo Playwright 6/6 - Not exercised live: the full browser Create-button click (verified via in-repo Playwright 6/6
m3-create + review-photo-strip; the endpoint + PUT path are proven live above). Woo publish path m3-create + review-photo-strip; the endpoint + PUT path are proven live above). Woo publish path
not exercised this round. not exercised this round.
### 2026-09-21 12:10 PDT — redeploy: `main` after merge `8ee3da9` (reconciled PR #97 + branch)
- Source: `main` @ `8ee3da9` (merge of `work/merge-89-90` into main, which itself reconciled
main's PR #97 client-side `thicknessBand.ts` + `syncSelects`/`box-sizing` against the branch's
server-side `thickness_band.py` + Create-string #89). `matches HEAD`: **yes**.
- Resolution outcome in the deployed bundle: band is **server-side** — `Review.svelte` no longer
imports `thicknessBand` and the read-only band display is gone; PR #97's `syncSelects()` (3× in
source) + `box-sizing` CSS preserved; `metadata_locked` still dropped; Create-string + photo
strip + wood primary live.
- Rebuilt both images from `main`; recreated the stack (`down --remove-orphans` + `up -d`, no `-v`).
LAN binds 10881/10882 intact.
- Bundle: `assets/index-BScrgd8o.js` (new; differs from pre-merge `YPAqx609`; contains
`create-title`, **zero** `thicknessBand` references). API `/api/health` `woo_reachable:true`.
- Sample data preserved: **yes** — 35 slabs (one added upstream since last deploy).
- Live verification (LAN URL, real DB): `POST /review` on slab `ec4088da…` →
`title:'Curl Black Walnut Slab'`, `ready:True`.
- Gates at merge time: backend 117/117, unit 88/88, tsc clean, e2e 6/6 (m3-create + photo-strip).
- Branches `work/merge-89-90` and `issue-89-metadata-lock` deleted (local + remote); remote has
only `main`.
+3 -4
View File
@@ -99,7 +99,6 @@
let gradeSel: string = ''; let gradeSel: string = '';
let woodCatIds: number[] = []; let woodCatIds: number[] = [];
let figureIds: number[] = []; let figureIds: number[] = [];
let gradeId: number | '' = '';
let moistureId: number | '' = ''; let moistureId: number | '' = '';
let figTagIds: number[] = []; let figTagIds: number[] = [];
let featTagIds: number[] = []; let featTagIds: number[] = [];
@@ -128,7 +127,7 @@
let createBusy = false; let createBusy = false;
let createError = ''; let createError = '';
$: canCreateTitle = $: canCreateTitle =
speciesId !== '' && woodCatIds.length > 0; speciesSel !== '' && woodCatIds.length > 0;
$: canCreateDesc = $: canCreateDesc =
canGenerateContent && title.trim() !== '' && shortDescription.trim() !== ''; canGenerateContent && title.trim() !== '' && shortDescription.trim() !== '';
// Monotonic token: each commit captures the current value and ignores its // Monotonic token: each commit captures the current value and ignores its
@@ -320,7 +319,7 @@
woodCatIds = [...(s.wood_category_ids ?? [])]; woodCatIds = [...(s.wood_category_ids ?? [])];
edgeSel = s.edge_type_term_id != null ? String(s.edge_type_term_id) : ''; edgeSel = s.edge_type_term_id != null ? String(s.edge_type_term_id) : '';
figureIds = [...(s.figure_term_ids ?? [])]; figureIds = [...(s.figure_term_ids ?? [])];
gradeId = s.grade_term_id ?? ''; gradeSel = s.grade_term_id != null ? String(s.grade_term_id) : '';
moistureId = s.moisture_term_id ?? ''; moistureId = s.moisture_term_id ?? '';
figTagIds = [...(s.fig_tag_ids ?? [])]; figTagIds = [...(s.fig_tag_ids ?? [])];
featTagIds = [...(s.feat_tag_ids ?? [])]; featTagIds = [...(s.feat_tag_ids ?? [])];
@@ -393,7 +392,7 @@
wood_category_ids: woodCatIds, wood_category_ids: woodCatIds,
edge_type_term_id: edgeSel === '' ? null : Number(edgeSel), edge_type_term_id: edgeSel === '' ? null : Number(edgeSel),
figure_term_ids: figureIds, figure_term_ids: figureIds,
grade_term_id: gradeId === '' ? null : Number(gradeId), grade_term_id: gradeSel === '' ? null : Number(gradeSel),
moisture_term_id: moistureId === '' ? null : Number(moistureId), moisture_term_id: moistureId === '' ? null : Number(moistureId),
fig_tag_ids: figTagIds, fig_tag_ids: figTagIds,
feat_tag_ids: featTagIds, feat_tag_ids: featTagIds,