Ticket: HEL-699
Date: 2026-04-09
Four things are broken or slow on production that need to be fixed in one pass:
HEL-685 fixed nginx routing: location ~ "^/Service%20Delivery/" now routes correctly to evidence-service.
But once nginx proxies the request, evidence-service's server.cjs receives the URL as /Service%20Delivery/contact_health (still percent-encoded). It then does:
let filePath = path.join(BUILD_DIR, pathname); // pathname = '/Service%20Delivery/...'
// → build_live/Service%20Delivery/... ← this path doesn't exist
// Disk has: build_live/Service Delivery/... (literal space)
File not found → 404. Fix: decodeURIComponent(pathname) before the path.join.
The ButtonGroup→Dropdown plan exists at .claude/plans/HEL-686-delete-v1-fix-ar-flash.md but the branch feat/HEL-686-delete-v1-fix-ar-flash has never been executed or merged.
fix/HEL-687-hubspot-varchar-types has the hubspot fix (commit 280c8b5) but is NOT on main. On main, sources/hubspot/hubspot_deals.js still does SELECT * returning all columns as VARCHAR. DuckDB WASM can't SUM(VARCHAR), causing Growth report aggregations to hang or error.
30 pages under pages/_V1/ still exist and compile in every build across containers, adding Vite bundle overhead.
decodeURIComponent in server.cjs (1 line)In docker/server.cjs, line 106, change:
// Before
let filePath = path.join(BUILD_DIR, pathname);
// After
let filePath = path.join(BUILD_DIR, decodeURIComponent(pathname));
This applies to ALL containers (all 6 evidence containers run the same server.cjs), so College Outcomes %20 routing is also fixed by this.
fix/HEL-687-hubspot-varchar-types is already coded. Create a PR and merge it to main. No additional changes needed.
Follow .claude/plans/HEL-686-delete-v1-fix-ar-flash.md exactly:
rm -rf pages/_V1/pages/Finance/accounts_receivable.md: replace <ButtonGroup> with <Dropdown order=month_start>; update all '${inputs.selected_month}' → '${inputs.selected_month.value}' in SQLFix 1 (server.cjs) and Fix 3 (AR + V1) are both new code changes. They can be a single commit on a new branch.
fix/HEL-687-hubspot-varchar-types (already coded, just needs PR)fix/HEL-699-server-recoverypages/_V1/accounts_receivable.md (ButtonGroup → Dropdown, .value accessor)npm run build → verify cleanPR #1 (HEL-687 branch, already done):
sources/hubspot/hubspot_deals.js — already fixed, just needs mergePR #2 (new):
docker/server.cjs:106 — add decodeURIComponent()pages/_V1/ — delete entire directory (30 files)pages/Finance/accounts_receivable.md — ButtonGroup→Dropdown; 4× .value accessornpm run build:strict passes clean/Service%20Delivery/contact_health returns 200 (not 404)/College%20Outcomes/ returns 200docker/server.cjs uses decodeURIComponent(pathname) before file lookuppages/_V1/ does not existsources/hubspot/hubspot_deals.js casts numeric fields (merged from HEL-687)npm run build:strict passes clean