Fix admin pages that break on undefined names #201
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 266 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #201"
general
weight: 0.35
claude[bot]
Why
Same class of bug as last night's backend crash: a name used but never defined only fails when that code runs. A scan of every admin page, with its scripts in load order, found 11 on dev (all also on main).
Fixes
| Page | Before | After |
|---|---|---|
| Food management | "Delete Selected" button found by a browser shortcut | looked up by id |
| Card details | update request sent to
/card/update/[object HTMLInputElement]| uses the card number value || Update adhyayan / update utsav | on a server error the page threw silently, staff saw nothing | shows the server's message (falls back to the status text) |
| Utsav check-in and issue-plate scanners | Home and Logout did nothing; Logout didn't clear the session | load the shared role-check script, like the sibling scanner pages |
| Forms create | Access Type change threw every time | removed two handlers pointing at functions that never existed or were removed on purpose (an existing listener already handles Access Type) |
Cleanup (approved): removed a toggle-status loop that never runs, an unused header script, and jQuery plugins loaded without jQuery on create-utsav and utsav-registration (they threw 3 errors on load). Fixed wrong script paths on the role-delete page, removed a tag for a file that doesn't exist on the menu page, and loaded the table script on the admins list.
Proof
Known, not fixed here
No tooling added to this repo (the S3 deploy uploads everything publicly).
🤖 Generated with Claude Code