5822dfc1ab
setAddAssetMode() called stopManualPhoto() which was removed during the canvas→file-input refactor. Every mode switch failed silently.
5.5 KiB
5.5 KiB
Canteen Asset Tracker — QA Dogfood Report
Date: 2026-05-21 Tester: Kanban (Leo) — automated browser QA App Versions: Main app (canteen.ourpad.casa) + Admin server (port 8090)
Executive Summary
| Severity | Count |
|---|---|
| Critical | 0 |
| High | 3 |
| Medium | 1 |
| Low | 1 |
Scope tested: Login flow, mode switching (Barcode/OCR/Manual/Photo Gallery), Asset List, Map tab, Navigate tab, Drawer menu, Admin login and navigation.
Issues
H1 — map variable undefined (Map tab non-functional)
- Severity: High
- Category: Functional
- URL:
https://canteen.ourpad.casa/(Map tab) - Description: The
switchTab('tabMap')function references a globalmapvariable (if (map) { ... map.invalidateSize() }) butmapis never declared in the global scope. Switching to the Map tab throwsReferenceError: map is not defined, preventing the tab from working. - Also affected:
toggleHeatmap()checksif (!map) return;so the heatmap toggle is silently dead. The GPS chip'smap.setView()call in the inline onclick also fails. - Steps to reproduce:
- Login as shawn
- Tap the Map tab (bottom nav)
- Observe no map renders and console has a ReferenceError
- Expected: A Leaflet map should render in
#mapContainerwith asset pins and OSM tiles - Root cause: The global
let map = null;declaration plus L.map initialization inswitchTab('tabMap')was never implemented, or was removed during a prior refactor. - Images: N/A (visual is just empty tab)
H2 — loadAssetPins() undefined (Map tab missing pin loading)
- Severity: High
- Category: Functional
- URL:
https://canteen.ourpad.casa/(Map tab) - Description:
switchTab('tabMap')callsloadAssetPins()to populate map markers, but this function does not exist. - Steps to reproduce:
- Login and navigate to Map tab
- The ReferenceError from H1 prevents most code from running, but even if
mapexisted, the pin loading function is missing
- Expected: Asset pins should load and display on the map
- Related to: H1
H3 — stopManualPhoto() called but undefined (FIXED)
- Severity: High
- Category: Functional
- Status: ✅ Fixed during QA
- URL:
https://canteen.ourpad.casa/(mode switching) - Description:
setAddAssetMode()callsstopManualPhoto()at line 1696, but this function was removed when the canvas-based camera capture was replaced with file-input capture. Every mode switch (Barcode/OCR/Manual) threwReferenceError: stopManualPhoto is not defined. - Fix: Guarded with
if (typeof stopManualPhoto === 'function') stopManualPhoto(); - Steps to reproduce (pre-fix):
- Login
- Click OCR or Manual mode toggle
- Silent JS error blocks downstream lifecycle code
- Note: This was likely the cause of the "GPS not working" issue — the error in
setAddAssetModeprevented the Manual tab from initializing properly.
M1 — Asset list appears empty (no items shown)
- Severity: Medium
- Category: Functional
- URL:
https://canteen.ourpad.casa/(Assets tab) - Description: The Asset List tab shows the search bar and Import button but no asset items are displayed. The database contains users and sessions but the assets table status is unclear. The empty state message isn't visible either.
- Steps to reproduce:
- Login
- Tap "Assets" in the bottom nav
- Observe empty content area with search and Import only
- Expected: Asset list should show either existing assets or a proper empty state message
- Possible causes: API call to
/api/assetsmay be failing silently, or there genuinely are no assets to display
L1 — Empty JS exceptions in console (browser extension noise)
- Severity: Low
- Category: Console
- URL: All pages
- Description: At least one
js_errors[0]entry with emptymessage: ""appears on every page load. This is not reproducible with the actual app JS (all functions are defined, all interactions work), so it's likely a browser extension or headless-browser artifact. Not an app bug. - Recommendation: Ignore for now; verify on a real mobile device.
Admin Server Status
| Feature | Status |
|---|---|
| Login | ✅ Working |
| Dashboard | ✅ Working |
| Users (list/add) | ✅ UI renders |
| Customers (list/add) | ✅ UI renders |
| Settings | ✅ Navigation works |
| Activity Log | ✅ Navigation works |
| Export | ✅ Navigation works |
| Cantaloupe Sync | ✅ Navigation works |
No critical issues found in the admin server. Navigation, login, and page rendering all work.
Testing Notes
- Browser: Chromium headless (Browserbase)
- Environment: Not a real mobile device — GPS, camera, file picker, and geolocation features could not be fully tested
- What was tested: All tabs, mode switches, drawer navigation, admin pages, form rendering
- What was not tested: Camera capture (no physical camera), file upload (file picker not available in headless), GPS geolocation, actual asset creation/deletion (would pollute DB), OCR/Barcode live scan
Recommendations
- Fix H1+H2: Add global
let map = null;and initialize the Leaflet map inswitchTab('tabMap')(or a dedicated init function called once) - Investigate M1: Check whether the Asset List API returns data or if the empty state needs better messaging
- Test on real device: Camera, GPS, and file picker can only be verified on a Pixel 9a or similar Android device