ProjectBuild an Agentic Content Studio: the explanation · Module 11: Render, measure and repair in Chromium · part 13 of 22
Part 13 · Module 11: Render, measure and repair in Chromium

Module 11: Render, measure and repair in Chromium

24 min read·
About 50 minutes · Needs: Module 7 (the deck spec and the renderer), Module 8 (the LangGraph pipeline), Module 10 (the designer and JSON repair) · Code: backend/app/render/chromium.py, frontend/src/render/measure.ts, frontend/src/pages/RenderPage.tsx, backend/app/ai/pipeline.py (check_node, repair_node), backend/app/ai/agents/designer.py (shorten_slide, trim_slide)

Where this fits

WHERE THIS FITS Slidesmith Studio this module BROWSER React FRONT DOOR AND API nginx, FastAPI BACKGROUND AGENTS LangGraph MODELS Ollama RENDERING Playwright DATA Postgres 17 OPERATIONS evals, Docker, Cloud Run Studio app React pages /render page same renderer nginx proxy, headers Auth sessions, CSRF Brand kit onboarding, uploads Projects deck spec, edits Job runner progress over SSE Research search, facts Strategist outline Designer slide JSON Check fit, else repair LangGraph pipeline state graph, JSON repair Ideas post ideas from pillars qwen3.8:27b Ollama, local GPU Web search Ollama API Chromium render, measure Exports PDF, PNG, ZIP, HTML PostgreSQL users, decks, jobs Uploads disk or GCS Evaluation suites, gate Insights usage, timings Containers Docker Compose Deploy Cloud Run, CI/CD
The check (blue: this module) drives the server's headless Chromium, which loads the same /render page the studio uses; overflowing slides go back to the designer and the model (amber).

The designer writes text with length limits, but limits in characters cannot promise that a slide fits. Whether it fits depends on the font, the template, the format and where each line wraps. So after design, the pipeline draws every slide in a real browser on the server, measures how far anything sticks out, and sends the slides that do not fit back for repair. The same browser later makes the exports.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan