Commit Graph

13 Commits

Author SHA1 Message Date
Torres
57fae0df49 app: no-build PWA frontend (fidelity port) + image mirror
- app/static/index.html: single-file app — DOM/CSS/stack engine ported
  verbatim from reference/mockup-001-fidelity.html (DEPTH/SC/TY/DIM, drag/
  fly/undo, one .topcard, no-lock commits, stamps, dossier sheet,
  pull-to-close, empty state); production deltas only (UI-SPEC §7): deck
  buffer + cursor refill (40/page), optimistic swipe persistence with
  2s/5s/10s/15s retry queue + toast, badge-once-per-session, real list
  filters + search (server-side), real Matches screen, /img/{id} everywhere
  with placeholder fallback, SW registration, safe areas, desktop centering
- manifest.json + sw.js (precache shell, network-first API, cache-first imgs)
- icons: 192/512/maskable/apple-touch-180, dark tile with the brand
  accent-gradient mark (Pillow)
- app/imgfetch.py: local mirror, hunt's Chrome-120 UA, ~1s pacing,
  skip-existing, .part writes atomic, per-item failure isolation,
  fetched/skipped/failed summary; verified: --limit 15 -> 15 fetched, full
  run 5 more, re-run 0 fetched 20 skipped (20/20 mirrored)
2026-11-10 21:21:27 -04:00
Torres
5df2a20bac app: FastAPI API + serve CLI (Phase 2)
- create_app(db_path, img_dir, state_dir) factory; every route + payload
  from app.state — selfcheck runs the real router on a temp DB copy
- /api/health (ok/db/counts), /api/stats (live/new/likes/maybes/nopes/
  last_import), /api/deck (undecided semantics, score/first_seen/id DESC,
  opaque '<score>|<first_seen>|<id>' cursor, strictly-after tuple page,
  remaining count), /api/swipe upsert + DELETE (idempotent), /api/list
  (decision/sort/q/limit/offset, total), /api/listing/{id}, /api/import
  (importer, HTTP 200 even when gates fail), /api/badge/seen, /img/{id}
  (cached file -> 302 img_url -> 404), static routes (/, manifest, sw.js,
  icons, apple-touch; no-cache on index + sw.js)
- frozen payload contract incl. img=/img/{id} when img_url or cached file
- serve.py: argparse (--db/--img-dir/--state-dir/--host/--port, defaults
  127.0.0.1:9453) -> uvicorn.run
- verified: 560-deep deck walks clean with zero page overlap, swipe ->
  list -> edit -> delete -> back on deck, badge roundtrip (new 560 -> 0);
  real uvicorn returns true 302 for the img fallback (TestClient in this
  fastapi/httpx pair mangles RedirectResponse into a 404 — framework
  artifact, not app behavior)
2026-11-10 21:17:57 -04:00
Torres
02a6b6df7e app: P2 migrations (year/seller_type/extras) + importer backfill, guards idempotent
- db.init_db gains guarded ALTER TABLE additions for listings.year /
  seller_type / extras (schema.sql v1 untouched; PRAGMA-checked idempotent)
- rubric: extras_from_text() returns matched EXTRAS labels (table order)
- importer: normalize computes year (existing helper), seller_type ONLY
  from a real state-item signal (dealer/private, else NULL), extras JSON;
  upsert rewrites the new columns on both paths
- verified on live DB: import idempotent, counts stay 640/560/80, year
  backfilled on 599 rows, extras on 45, seller_type 0 (no state signal)
2026-11-10 21:13:40 -04:00
AlexanderRozhenko
9bc6948861 docs: freeze Phase 2 contract — UI-SPEC v2 (approved mockup A, stack engine, deltas) + DATA-MODEL P2 addendum (migrations, cursor pagination, media mirror) + frozen mockup reference 2026-11-10 21:11:27 -04:00
AlexanderRozhenko
d8510c184a docs: record verified Phase 1 results (twin counts in SOURCES; phase status + Phase 2 backlog in PLAN) 2026-11-10 19:00:00 -04:00
AlexanderRozhenko
d890dcdb3e merge: Phase 1 data spine (verified): schema, importer, rubric, deck CLI, selfcheck 2026-11-10 18:59:03 -04:00
Torres
19e46cd11b app: add proof deck CLI, dependency-free selfcheck, gitignore 2026-11-10 18:57:17 -04:00
Torres
ca7835db9c app: add importer (gates, upsert, dedupe, gone-marking, scoring, import_runs) 2026-11-10 18:57:17 -04:00
Torres
d2d5ec22fa app: port hunt rubric scoring (family tiers, extras, veto, price fit) 2026-11-10 18:57:17 -04:00
Torres
5bf180c4c6 app: add SQLite schema and db helper (WAL, busy_timeout, four tables + indexes) 2026-11-10 18:57:17 -04:00
AlexanderRozhenko
670648b17a docs: housekeeping - branch policy, Tailscale sidecar deployment (no host coupling), dedicated import cron plan 2026-11-10 18:09:16 -04:00
AlexanderRozhenko
18bf31f361 docs: add SOURCES, DESIGN, DATA-MODEL; record v1 decisions (Kijiji source, rank-all deck, badge-only feed); vendor hunt reference modules 2026-11-10 17:48:32 -04:00
AlexanderRozhenko
fc3aad1e93 docs: initial set - README, PLAN, UI-SPEC, RANKING 2026-11-10 17:38:01 -04:00