Rendering-in-the-Loop: An Execution-Driven Agent for Interactive Web Development

Yilong Guo, Hanqi Chen, Zixiao Ye, Guanzhong Wang, Chen Yu, Zeyu ChenarXiv 2026

TL;DR

RILA (Rendering-in-the-Loop Agent) bridges the gap between static webpage generation and functional interactivity by executing generated code in a real browser and iteratively fixing bugs based on runtime interaction feedback. By combining this execution-driven critique loop with a novel data synthesis pipeline, a compact 9B model refined by RILA can outperform massive 1T-parameter and proprietary models running in a single shot.

What Problem Does This Paper Address?

Multimodal Large Language Models (MLLMs) have gotten remarkably good at looking at a screenshot or design sketch and writing the HTML/CSS code to replicate it. However, a webpage that looks perfect can still be completely broken under the hood.

Current front-end generation methods primarily optimize for static visual metrics (like layout similarity and aesthetics) or rely strictly on text logs and compiler errors. This leaves them blind to critical runtime interaction failures—such as broken event bindings, incorrect state transitions, or unexpected layout shifts that only happen after a user clicks a button or scrolls down a page. To build truly autonomous web developers, AI agents need a way to test and refine interactive functionality dynamically.

Methods

Instead of relying on one-shot generation or rewriting code from scratch, RILA introduces an execution-driven, incremental editing loop consisting of four tightly coupled components:

  1. Action Interaction Verification (AIV): RILA spins up a live browser instance using Playwright, loads the generated webpage, and replays a sequence of reference user actions (clicks, typing, scrolling) to observe exactly how the page behaves.
  2. Execution-Aware Rendering Score (ERS): This novel metric evaluates both interaction correctness (did the buttons actually work?) and visual fidelity across the interaction trajectory. Crucially, RILA tracks the "best-so-far" code version using ERS to prevent subsequent edits from causing regressions.
  3. Execution-Aware Critique: A multimodal model analyzes the discrepancies between the browser's runtime behavior and the reference video, generating structured, actionable fix suggestions.
  4. Tool-Assisted Code Editing: Rather than rewriting the entire codebase—which often breaks already-functional elements—a software engineering agent uses localized tools (semantic code search, file editors) to apply precise patches.
Figure 2: Overview of RILA. RILA closes the loop between browser execution and code editing for interactive webpage generation. Starting from an initial implementation generated by a code model, the proposed Action Interaction Verification (AIV) module executes the webpage in a real browser and collects runtime observations. A critique model analyzes the execution results and visual discrepancies to generate fix suggestions, while the proposed Execution-Aware Rendering Score (ERS) maintains the best implementation across iterations to avoid performance degradation. Guided by runtime observations and structured critique, the code model iteratively refines the webpage implementation, progressively improving rendering quality and interaction correctness.

Additionally, the authors developed an Execution-Verified Data Synthesis pipeline. It samples from a massive taxonomy of web domains, styles, and interaction capabilities, generates complete pages, and uses browser execution as a strict quality filter to retain only functionally valid pages for model fine-tuning.

Datasets

  • IWR-Bench: The primary evaluation benchmark, consisting of 113 interactive webpage reconstruction tasks from 100 real-world websites, complete with text instructions, interaction videos, and asset files.
  • Interaction2Code: A separate benchmark featuring 375 single-step interaction tasks, used to evaluate RILA's cross-benchmark generalization.
  • Synthetic Dataset: A newly curated dataset generated via RILA's verification pipeline, spanning 32 content domains, 110 interaction capabilities, and 308 visual styles, used to fine-tune the base Qwen model.

Key Insights and Ideas

  • Execution is the Ultimate Truth: Static code analysis and screenshots cannot capture dynamic runtime failures. Putting a real browser in the loop provides the grounded feedback loop necessary for functional web development.
  • Incremental Edits > Full Rewrites: Regenerating an entire webpage to fix a single broken button often introduces new visual or functional bugs. Localized, tool-assisted editing preserves correct code while surgically targeting errors.
  • Compute-Over-Scale: Iterative refinement guided by a strong critique model can compensate for a massive gap in model scale. A specialized 9B model running an execution loop can beat a 1T model operating in one shot.

Key Results

RILA consistently boosted the performance of every foundation model tested on IWR-Bench:

  • Lifting Compact Models: The base Qwen3.5-9B model improved its final score from 40.40% to 50.34% using RILA alone. When pre-trained on RILA's synthetic data and refined at inference time ($\text{Qwen3.5-9B}^\dagger$), it achieved 57.52%.
  • Beating the Giants: As shown in Figure 1, the refined 9B model successfully outperformed much larger one-shot generators, including the proprietary GPT-5.5 (55.74%) and the 1T-parameter Kimi-K2.6 (55.61%).
  • State-of-the-Art Scaling: When RILA was applied to the powerful Kimi-K2.6 model, it achieved the highest overall score on the benchmark at 65.85% (a +10.24% absolute gain).
Final scores on IWR-Bench comparing one-shot generation against RILA refinement.

Ablation studies confirmed that the "best-so-far" selection mechanism is vital; without it, later editing rounds frequently degraded previously functional interactive elements.

Limitations and Future Work

While RILA marks a significant step forward, the authors note a few areas for improvement:

  • Critique Model Dependency: The refinement quality is inherently upper-bounded by the capability of the critique model. If the evaluator fails to notice a subtle visual mismatch or functional bug, the editing agent cannot fix it.
  • Scope of Applications: The current framework focuses heavily on front-end UI components and single-page applications. Extending RILA to handle complex, multi-page web applications with heavy back-end database dependencies remains an open challenge for future research.

Summary updated

BibTeX
@misc{guo2026rendering,
  author = {Yilong Guo and Hanqi Chen and Zixiao Ye and Guanzhong Wang and Chen Yu and Zeyu Chen},
  title = {{Rendering-in-the-Loop: An Execution-Driven Agent for Interactive Web Development}},
  year = {2026},
  eprint = {2609.02088},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.02088},
}
Figure