Settings: Resolve scrape activity shipment names across active and archived records #45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Recent Scrape Activity table in Settings shows
#4,#16,#23etc. as shipment links when the shipment name hasn't been loaded or resolved viashipmentMap. TheshipmentMapis populated fromfetchShipments()but archived shipments are not included — so archived shipment scrape log entries always show as#N.Root cause
File:
frontend/src/pages/Settings.tsx— around line 355:fetchShipments()without args returns only active+delivered. Archived shipments are not in the map.Implementation
Option A — Fetch all shipments including archived
Option B — Include shipment title in scrape log API response
In
db.py, modify the scrape log query to JOIN with the shipments table and includetitle. This is cleaner long-term.In
main.py, the/api/scrape-logroute would returntitlealongsideshipment_id. Update theScrapeLogEntrytype infrontend/src/lib/api.tsto includetitle?: string.Then in the table:
ship?.title || entry.title || \#${entry.shipment_id}``Recommended: Option A (immediate fix), Option B (proper fix)
Acceptance criteria
#Nonly shows if the shipment genuinely doesn't existBrand identity alignment
Recent activity is an audit surface. Raw IDs are acceptable fallback data, but Trackbox should prefer human-readable shipment names and source context wherever possible.
Brand-compliant implementation notes
#Nshould be visually secondary and only appear when the shipment record is missing.Additional acceptance criteria
Migrated from GitHub issue #24: https://github.com/bullitt186/trackbox/issues/24
Original author: @bullitt186
Original created: 2026-06-27T13:25:55Z
Original labels: ux
Settings: Recent Scrape Activity table shows raw #IDs instead of shipment namesto Settings: Resolve scrape activity shipment names across active and archived recordsImplemented in commit
bd6b0e7. Settings now fetches both active/delivered shipments and archived shipments at load time, merging both intoshipmentMap. Shipment names now resolve correctly for all scrape activity rows including archived records. The numeric#Nfallback only appears when the shipment record genuinely doesn't exist.