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
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.