From a104685daf3df99d4541f335ac42e98e4a02c67d Mon Sep 17 00:00:00 2001 From: kfj001 Date: Sun, 6 Sep 2026 12:31:49 -0700 Subject: [PATCH] fix(dashboard): point View link at the live leginfo bill page The /bill// path now 404s for every bill and hardcoded 'AB', so Senate bills were broken too. Build the link from the canonical bill_id via the working faces/billNavClient.xhtml?bill_id= endpoint, which returns 200 for both Assembly and Senate bills. Drop the now-dead billNum() helper it was the only caller of. --- scraper/dashboard/static/app.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scraper/dashboard/static/app.js b/scraper/dashboard/static/app.js index ee0117b..3dbec33 100644 --- a/scraper/dashboard/static/app.js +++ b/scraper/dashboard/static/app.js @@ -90,8 +90,10 @@ (state.showReason ? " show" : "") + '">' + "Floated: " + parts.join("; ") + ""; } - var url = "https://leginfo.legislature.ca.gov/bill/" + - (ev.session || "2025-2026") + "/AB" + billNum(ev); + var url = ev.bill_id + ? "https://leginfo.legislature.ca.gov/faces/billNavClient.xhtml?bill_id=" + + encodeURIComponent(ev.bill_id) + : ""; return '
' + '' + chip(ev.chamber_origin) + @@ -112,10 +114,6 @@ + "
"; } - function billNum(ev) { - var m = (ev.bill_number || "").match(/(\d+)/); - return m ? m[1] : ""; - } function esc(s) { return String(s == null ? "" : s) .replace(/&/g, "&").replace(/