Skip to content
PigreenfieldWeb11 files · +1587 −82

Build AI model release timeline dashboard with FastAPI, Playwright and HTMX

Session from llm_timeline_deepseek_v4_flash-pi on Hugging Face by lucacorbucci · MIT · condensed by Coders Talk

11msession
0interventions
GOAL

Implement a spec (timeline.md) for an interactive dashboard that scrapes AI model release data and visualizes release frequency over time, with a scraper, analytics engine, API and frontend.

  1. Prompt · +0
    Read AGENTS.md then implement what's asked in timeline.md
  2. Agent did · +0m
    Explored the empty project, set up a venv, installed fastapi/playwright/pandas/plotly/jinja2/etc, and installed Playwright's chromium browser.
  3. Agent did · +1m
    Built the full project: sample HTML test data, async Playwright scraper (src/scraper.py), pandas analytics engine (src/analytics.py), FastAPI app (src/app.py), Jinja2+HTMX dashboard template, and test files for scraper and analytics.
  4. Agent did · +3m
    Fixed pyproject.toml build-backend, installed setuptools/pytest, corrected test expectations to match sample data counts (25 models), and got all 20 tests passing.
  5. Fail · +4m
    Server failed with a Jinja2 3.1.6 + Python 3.14 weakref-hashing bug in the template loader when hitting GET /, discovered while manually testing the running uvicorn server.
  6. Agent did · +5m
    Deep-dived into Jinja2 internals and weakref caching, initially tried disabling the template cache, then found the real cause: Starlette 1.3.1 changed TemplateResponse's signature to require request as the first positional arg.
  7. Fail · +7m
    After fixing the template bug, /api/data endpoint broke on serialization: pandas Period, Timestamp and numpy float64 values weren't JSON-serializable.
  8. Agent did · +7m
    Rewrote from_scrape_result to convert all pandas/numpy types to native Python types, reran the full test suite (20 passing) and verified the dashboard, /api/trend, /api/data and chart endpoints all worked end-to-end.
  9. Agent did · +11m
    Added a Makefile with install/run/test/clean targets after the developer asked how to run the project and requested a Makefile.
  10. Outcome · +11m
    Dashboard, scraper, analytics engine and API finished with 20 passing tests, a working FastAPI server serving 25 sample AI model releases, and a Makefile for install/run/test/clean.
VERDICT

I'd start by pinning the Python/Jinja2/Starlette versions up front, since most of the debugging time went into a Python 3.14 + Jinja2 3.1.6 weakref bug and a Starlette TemplateResponse signature change that had nothing to do with my actual spec. The fix that actually mattered was tracing the real error down to Starlette's changed argument order rather than papering over it with a cache workaround. Next time I'd also ask for JSON-serializable outputs (no raw pandas Period/Timestamp/numpy types) from the start to avoid the second round of serialization fixes.

I tried this · 0

Discussion · 0

How Builds work