snipe/web
pyr0ball d5912080fb feat(search): async endpoint + SSE streaming for initial results
Add GET /api/search/async that returns HTTP 202 immediately and streams
scrape results via SSE to avoid nginx 120s timeouts on slow eBay searches.

Backend:
- New GET /api/search/async endpoint submits scraping to ThreadPoolExecutor
  and returns {session_id, status: "queued"} before scrape begins
- Background worker runs same pipeline as synchronous search, pushing
  typed SSE events: "listings" (initial batch), "update" (enrichment),
  "market_price", and None sentinel
- Existing GET /api/updates/{session_id} passes new event types through
  as-is (already a generic pass-through); deadline extended to 150s
- Module-level _search_executor (max_workers=4) caps concurrent scrape sessions

Frontend (search.ts):
- search() now calls /api/search/async instead of /api/search
- loading stays true until first "listings" SSE event arrives
- _openUpdates() handles new typed events: "listings", "market_price",
  "update"; legacy untyped enrichment events still handled
- cancelSearch() now also closes any open SSE stream

Tests: tests/test_async_search.py (6 tests) covering 202 response,
session_id registration in _update_queues, empty query path, UUID format,
and no-Chromium guarantee. All 159 pre-existing tests still pass.

Closes #49. Also closes Forgejo issue #1 (SSE enrichment streaming, already
implemented; async search completes the picture).
2026-04-20 10:57:32 -07:00
..
public feat: snipe beta backlog batch (tickets #22/#28/#30/#34/#35/#36/#37/#38) 2026-04-13 19:32:50 -07:00
src feat(search): async endpoint + SSE streaming for initial results 2026-04-20 10:57:32 -07:00
index.html fix: body background follows theme tokens + Plausible analytics 2026-04-17 03:00:16 -07:00
package-lock.json feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
package.json feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
tsconfig.app.json feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
tsconfig.json feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
tsconfig.node.json feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
uno.config.ts feat(snipe): Vue 3 frontend scaffold + Docker web service 2026-03-25 15:11:35 -07:00
vite.config.ts feat(snipe): eBay trust scoring MVP — search, filters, enrichment, comps 2026-03-26 23:37:09 -07:00