A scraped product with nil price_per_round_cents made Prices.create_snapshot
return {:error, changeset}, which blew up the {:ok, _} match in the runner,
crashed the whole perform, and after 3 retries discarded the job. Nothing
reseeds the chain once the job is discarded, so prod scrapes silently died
on Mar 17 and stayed dead until the app was restarted.
- Runner handles snapshot insert errors by logging and continuing instead
of raising.
- ScrapeJob wraps each Runner.run in try/rescue so one retailer crashing
doesn't take down the whole cycle.
- ScrapeJob moves schedule_next into an after block so the chain is always
reseeded, even if the scrape loop crashes.
When a product no longer appears in a successful scrape for its
retailer+caliber, mark it out of stock. After each scrape cycle, hard
delete any product whose last_seen_at is older than 30 days (snapshots
cascade via FK). A zero-result scrape leaves existing listings alone so
a parse failure or transient site glitch can't nuke the catalog.
- Show "No price history available for this range yet." overlay when
the caliber chart range contains no daily averages (previously the
chart rendered as an unlabeled empty grid).
- Subscribe HomeLive to the "prices:updated" PubSub topic so the
cheapest-per-caliber grid refreshes without a full page reload.
- Drop the unused textColor computation and unused max series from the
chart hook/data.
LiveView's morphdom was replacing the canvas element inside the chart
container whenever filters were toggled, destroying the Chart.js
rendering context. Add phx-update="ignore" to the chart container so
LiveView preserves JS-managed children after initial render.
Previously combined as a single "556-223" caliber. Now tracked separately
with dedicated scraper URLs per retailer. Also fixes broken URLs for
Lucky Gunner, True Shot Ammo, and Palmetto State Armory.
Add True Shot Ammo (Shopify JSON), Palmetto State Armory (Magento HTML),
Bulk Ammo (Magento HTML), and Natchez Shooters Supply (GraphQL API).
Extends scraper infrastructure with HttpClient.post_json/3 and an
optional fetch/2 callback on the Scraper behaviour for scrapers that
need custom HTTP flows (e.g. GraphQL POST requests).
- Add subsonic boolean field to products with composite filter indexes
- Add TextDetector utility for detecting subsonic/casing from product titles
- Wire TextDetector into SgAmmo (casing + subsonic) and LuckyGunner (subsonic + fallback casing)
- Extend latest_prices_for_caliber with casing, grain_weight, and subsonic filter options
- Add distinct_grain_weights_for_caliber and distinct_casings_for_caliber queries
- Add filter UI with toggleable casing, grain weight, and subsonic buttons
- Add grain weight column and subsonic badge to product table
- Refresh filter options on PubSub price updates for real-time UI
- Implement Target Sports USA scraper with 18 caliber mappings
- Display all prices in dollar format ($0.38 instead of 38¢)