arXiv:2610.17861cs.SEOct 2026

Manuscript Offprint

arXiv:2610.17861

State-Aware Generation of Deployable Websites from Visual Prototypes and Requirements

Ruwei Pan, Junlei Shen, Linhao Wu, Zixiong Yang, Qisheng Zhang, Yifan Li, Tianyu Ma, Yakun Zhang, Lu Zhang, Hongyu Zhang

RUWEI PAN*, Peking University, China

JUNLEI SHEN*, Chongqing University, China

LINHAO WU, Peking University, China

ZIXIONG YANG, Peking University, China

QISHENG ZHANG, Chongqing University, China

YIFAN LI, University of Science and Technology of China, China

TIANYU MA, Chongqing University, China

YAKUN ZHANG, Harbin Institute of Technology (Shenzhen), China

LU ZHANG, Peking University, China

HONGYU ZHANG †^{\dagger}, Chongqing University, China

Generating deployable websites from visual prototypes and textual requirements is increasingly feasible with multimodal models, but the generated project must stay consistent with the prototypes it is built from. In this setting, the prototypes specify page layouts and visual elements, while the requirements describe interaction workflows and deployment constraints. Existing UI-to-code methods and coding agents often handle layout reconstruction, interaction implementation, and project-file editing as separate stages. Because these stages are separate, visual prototype elements, project files, interaction workflows, dependency relations, and render evidence can lose their correspondence across generation, verification, and update, which we call prototype-to-project state drift. In this paper, we propose VisStateCoder, a state-aware framework that mitigates this drift by maintaining these correspondences in a Project State Graph. The graph records typed links among four types of state nodes and their dependency relations, and serves as the shared representation for prototype grounding, graph-guided project generation, and render-evidence-guided scoped update, which maps failed checks back to the affected project files and leaves files outside the update scope unchanged. We evaluate VisStateCoder on Vision2Web with five foundation models across Static Webpage, Interactive Frontend, and Full-Stack Website tasks. Averaged across the five models, VisStateCoder improves the benchmark's overall score over the strongest baseline under each model by 26.1 and 22.6 points on Interactive Frontend and Full-Stack Website tasks, respectively. To measure drift directly, we track how often checks that pass in one update round fail in a later round, and find that VisStateCoder reduces verified-state drift compared with alternative state representations. An annotation study on 50 tasks shows that the constructed graphs reach an edge-level F1 of 95.6%.

Additional Key Words and Phrases: Code Generation, Large Language Models

1 Introduction

Generating deployable websites from visual prototypes and textual requirements is an important step toward automated web development [8, 19, 21, 24, 25, 28]. In this setting, visual prototypes specify page layouts and prototype elements, while textual requirements describe the interaction workflows and deployment requirements that the generated project must implement. Multimodal

∗^{*}Both authors contributed equally to this work.

†^{\dagger}Corresponding author.

Authors' Contact Information: Ruwei Pan, panruwei666@gmail.com, Peking University, China; Junlei Shen, liuy92246@gmail.com, Chongqing University, China; Linhao Wu, wulinhao26@stu.pku.edu.cn, Peking University, China; Zixiong Yang, zixiongyang02@gmail.com, Peking University, China; Qisheng Zhang, 20241025@stu.cqu.edu.cn, Chongqing University, China; Yifan Li, liyifancqu@163.com, University of Science and Technology of China, China; Tianyu Ma, 20230574@stu.cqu.edu.cn, Chongqing University, China; Yakun Zhang, zhangyk@hit.edu.cn, Harbin Institute of Technology (Shenzhen), China; Lu Zhang, zhanglucs@pku.edu.cn, Peking University, China; Hongyu Zhang, hongyujohn@gmail.com, Chongqing University, China.

Pan et al.

large language models, UI-to-code methods, and coding agents have made this task increasingly feasible [1, 10, 24, 26, 30, 33, 36], but many of them handle layout reconstruction, interaction implementation, and project-file editing as separate stages. As a result, they may produce plausible pages, interactions, or file edits that do not form a consistent project state across generation, verification, and update.

The central challenge is prototype-to-project state drift. For example, a prototype element may be implemented through multiple project files, styles, and assets. An interaction workflow may involve a visual trigger, an event handler, a route, and a target page. A render or interaction failure may expose the symptom, but the cause may lie in an incorrect link between the prototype element, the implementing file, the workflow, or the dependency relation [5, 20]. When such links are not maintained, drift surfaces in two observable ways. First, correspondences break: the prototype element that should start a workflow is rendered and operable, but the workflow fails. Second, verified states regress: a check that passes in one update round fails in a later round. Section 2 turns both symptoms into metrics, which we use to evaluate whether the Project State Graph reduces drift rather than only improving final scores.

Existing approaches often do not explicitly maintain persistent prototype-to-project correspondences throughout generation, verification, and update. ① Static UI-to-code methods can reconstruct page layouts and components from visual prototypes, but they usually do not link these visual outputs to interactions, project files, and render evidence [4, 8, 12]. ② Interactive UI generation methods go beyond static layout reconstruction by implementing user interactions and workflows, but they usually do not preserve the correspondence among these interactions, prototype elements, project files, and render evidence during iterative updates [32]. ③ General coding agents can edit project files and incorporate tool feedback, but they are not designed to align these edits with prototype elements or to map render evidence back to the affected project files and interaction workflows [26, 33]. ④ Specification-to-repository frameworks, such as ARC [13], trace requirement documents to code and verify them with synthesized tests, so a mismatch between the rendered pages and the visual prototypes is not traced back to the prototype element and project files it concerns; Section 8 compares the two settings directly. Because none of these methods keeps prototype-to-project correspondences as explicit project state, they remain exposed to prototype-to-project state drift.

In this paper, we propose VisStateCoder, a state-aware framework that mitigates prototype-to-project state drift by maintaining prototype-to-project correspondences in a Project State Graph. The Project State Graph records typed links among visual prototype elements, project files, interaction workflows, and render evidence, including their dependency relations, so that each generation or update step can query the affected visual, code, workflow, and evidence states together. This shared state representation guides three operations. First, prototype grounding aligns visual prototypes with textual requirements and initializes prototype-to-project correspondences. Second, graph-guided project generation uses the graph to generate project files under visual, interaction, and dependency constraints. Third, render-evidence-guided scoped update maps render evidence back to affected project states and revises only the project files in the affected scope. This design builds on two established software engineering techniques: the links of the graph act as trace links in requirements traceability [6], and the update scope is a reachability-based impact set over dependency relations, as in change impact analysis [15] and dependency-graph-based repository editing [3]. VisStateCoder adapts these techniques to deployable website generation in three respects: (i) trace links are fixed by the implementation plan before project files are produced, rather than recovered afterward, and they connect visual prototype elements and requirement-derived workflows to code; (ii) render evidence enters the graph as nodes, so impact analysis starts from an observed structural or visual failure on the rendered pages rather than from a code change;

(iii) the update is write-protected outside the impact set, so files not implicated by a failed check remain unchanged.

We evaluate VisStateCoder on the Vision2Web benchmark [10] with five foundation models across Static Webpage, Interactive Frontend, and Full-Stack Website tasks. Averaged across the five models, VisStateCoder improves the benchmark's overall score over the strongest baseline under each model by 26.1 points on Interactive Frontend tasks and 22.6 points on Full-Stack Website tasks, where a project spans multiple pages, workflows, and files. The improvement coincides with less drift: compared with the strongest alternative, VisStateCoder lowers the correspondence break rate from 44.2% to 33.3% and the verified-state drift rate from 3.0% to 1.1%. An annotation study on 50 tasks shows that the constructed graphs achieve an edge-level F1 of 95.6%.

In summary, this paper makes the following contributions:

  • We identify prototype-to-project state drift as a key challenge in deployable website generation and make it measurable through two observable symptoms, broken correspondences and regressions of verified states, quantified by the correspondence break rate and the verified-state drift rate.

  • We propose VisStateCoder, which maintains prototype-to-project correspondences in a Project State Graph. The graph adapts trace links and reachability-based impact analysis to deployable website generation: it fixes cross-modal links before code is written, starts impact analysis from render evidence, and write-protects files outside the update scope.

  • We evaluate VisStateCoder on Vision2Web with five foundation models and three task levels, including direct drift measurement, an annotation study of graph correctness, and a cost analysis. We additionally evaluate VisStateCoder on WebGen-Bench [17], where no visual prototypes are available. We release the implementation, prompts, generated projects, evaluation logs, and annotation data.

References (27)