From e9554fa051fd52f73429ff2d4fd794e0d09bae29 Mon Sep 17 00:00:00 2001 From: Svrnty Date: Sun, 24 May 2026 14:19:09 -0400 Subject: [PATCH] fix(bte panel): store BTE-relative thumbUrl so renderer's PROXY_BASE wrap doesn't double-encode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Browser console: 'Failed to load resource: ...%252Fb6078c89...%252Fimage:0'. _refreshGrid normalized thumbUrl as a full proxy URL, then _renderGrid + _renderDetail wrap it again with PROXY_BASE+encodeURIComponent → %2F → %252F. Fix: store raw BTE path; let the existing renderer wrap it once. Karpathy 4 rules: surface root cause (double-wrap, not the encoder), smallest fix (one expression), surgical (no other shape change). --- static/bte.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/bte.js b/static/bte.js index e8a553a..33b0c2a 100644 --- a/static/bte.js +++ b/static/bte.js @@ -369,7 +369,7 @@ .filter((a) => a.brandId === state.brand || !state.brand || state.brand === "planb") .map((a) => ({ id: a.id, - thumbUrl: a.hasImageData ? (PROXY_BASE + encodeURIComponent("/api/assets/" + a.id + "/image")) : null, + thumbUrl: a.hasImageData ? ("/api/assets/" + a.id + "/image") : null, lifecycle: a.status, ratingCount: 0, meanScore: a.visualPolishScore || a.brandFitScore || null,