potentialpaper

Toward Executable Multi-framework Front-end Code Generation with Self-Correction

Linxiao Li, Haoran Ma, Chenyue Wang, Jiaye Lin, Haochen Sui, Jiechao Gao

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Generating codes from UI screenshots has recently benefited from MLLMs, yet existing methods centered on HTML targets and transfer poorly to multi-frameworks such as React, Vue, and Angular. However, unlike HTML, which does not entail compilation issues, generating executable code in multi-framework settings is more challenging due to framework-specific differences in syntax and failure modes, as well as the need to maintain global consistency across files. To address this problem, we study executable multi-framework front-end code generation and propose MESCoder, a tree-structured self-corrective generation framework. Our method first extracts a structural scaffold from the screenshot and then constructs sub-trees and assembly relations step by step, transforming large project generation into a sequence of localized decisions. On top of this scaffold, we introduce a unified Project Agent that continuously revises its own partial project under runtime sandbox feedback and dynamically chooses between local repair and cluster level repair. For training, we adopt a two-stage strategy that first initializes the policy offline to learn basic multi-framework generation and repair priors, and then refines it with online reinforcement learning to optimize long horizon executability and final page quality. The resulting framework models multi-framework executability as a conditioned project state transition process and improves the stability and quality of complex front end generation through self correction. Experiments show that our method improves executability, while narrowing the visual-fidelity gap to HTML-based generation.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:44 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

The paper proposes MESCoder, which first extracts a hierarchical scaffold from the screenshot and then incrementally constructs and repairs the project using a lightweight learned controller. The controller chooses among five high-level actions - continue construction, assemble components, perform a local repair, perform a cluster-level repair, or finish -- while a frozen LLM executor produces the corresponding code edits. Runtime sandbox feedback is incorporated throughout generation. The controller is initialized through offline behavioral cloning on clean and synthetically corrupted projects, then refined using PPO.

The claims of the paper are that: (1) hierarchical decomposition makes multi-file project construction and error localization more tractable (2) explicitly distinguishing local from cross-file repair is important for framework-level consistency; and (3) offline initialization followed by online RL enables the controller to learn context-sensitive repair-scope escalation. The empirical results support these claims across six frozen LLM executors and three frameworks. Compilation success improves consistently, with particularly large gains on Angular, where cross-file module and dependency constraints are more severe. Visual similarity scores also improve rather than degrading as executability increases.

The reviewers generally agree on the paper's central characterization. They view the task as important and realistic, and identify the scaffold, the distinction between local and cluster-level repair, the two-stage learning strategy, the consistent gains across six heterogeneous executors, and the thorough ablation study as the main strengths. The primary disagreement concerns whether the evaluation is sufficiently broad and whether the results generalize beyond the current benchmark, leading to one negative recommendation.

Main strengths The first major strength is the problem formulation. Executable multi-framework generation is meaningfully harder and more realistic than isolated HTML generation because correctness depends on project-wide imports, component interfaces, bindings, assembly, and framework-specific configuration. The paper identifies a clear gap between visual fidelity and actual software executability and proposes a method aligned with the structure of that gap.

Second, the system design is sensible and interpretable. Separating high-level repair control from code realization yields a relatively small action space in which online RL can focus on decisions such as whether a failure is local or requires broader intervention. The distinction between PATCHLOCAL and PATCHCLUSTER is especially well motivated for multi-file projects. The scope-escalation experiments indicate that always repairing locally cannot escape cross-file inconsistencies, whereas always making broad edits can damage healthy files; the learned policy performs selective escalation and obtains the best outcome.

Third, the empirical gains are consistent across all six model executors and across React, Vue, and Angular. The largest improvements occur in the settings most closely tied to the paper's motivation -- Angular, harder pages, and cross-file error categories -- strengthening the connection between the proposed mechanism and the observed results.

Fourth, the ablation study is strong. Removing the scaffold, the error-reduction reward, the learned policy, online RL, offline initialization, or the cluster-level repair action all produces substantial degradation. This provides useful evidence that the result is not attributable to a single incidental component and that offline and online learning play complementary roles.

Finally, the paper is generally clearly organized, and the reviewers found no meaningful ethical concerns. Two reviewers rate it on the accepting side, including one clear accept and one borderline accept.

Main weaknesses and missing evidence The most important weakness is the lack of a convincing compute-matched comparison. Because MESCoder relies on repeated LLM invocations and sandbox executions, comparisons primarily against one-shot generation do not establish whether the gains come from the learned controller or simply from greater test-time computation. The method averages roughly 10.2 LLM calls, 14.7 sandbox validations, and 134.6 seconds per page. Stronger evidence would come from comparisons with iterative retry, best-of-N, generic execution-guided repair, and rule-based repair under matched budgets for model calls, sandbox usage, generated tokens, or wall-clock time.

A second weakness is the limited scale and diversity of the evaluation. The test set includes 200 pages, only 45 of which are classified as hard, leaving uncertainty about whether the reported gains would hold across a broader range of projects, visual designs, dependency structures, and framework configurations. Since all results are reported on a single benchmark, it is also possible that the scaffold extractor, corruption process, and sandbox checks are particularly well matched to DesignBench.

Third, the offline training distribution is constructed using synthetic corruption operators. Although the operators are plausible and cover several error families, the submission does not clearly demonstrate that their frequencies and structures match errors naturally produced by the six executors during end-to-end generation. A comparison between synthetic corruptions and real executor error logs would substantially strengthen the claim that offline initialization teaches transferable repair priors rather than benchmark-specific heuristics.

Fourth, the method relies heavily on a fixed scaffold preprocessor and framework-specific sandbox. Because the controller cannot revise the scaffold, early structural errors may propagate through generation and repair, while incomplete sandbox checks may miss important failures. The paper acknowledges these dependencies but provides limited quantitative analysis of them.

Several implementation details also remain unclear, including the controller’s state representation, PPO configuration, the definition of a sufficiently healthy partial project, and whether rule repair and RLEF use the same scaffold, prompts, budgets, and verification setup. These omissions make the results harder to reproduce and compare fairly.

Comments about AST structural contrast appear unrelated to the submitted method and should not materially affect the decision. Concerns about data disjointness and compute matching, however, are relevant.

Issues that could change the recommendation after rebuttal

The most important additions would be:

  1. Compute-matched comparisons against iterative retry, best-of-N, rule repair, and execution-guided baselines.
  2. Clear confirmation that the strongest baselines share the same scaffold, executor, prompts, budgets, and sandbox.
  3. Evidence that synthetic corruptions reflect real executor failures.
  4. Robustness analysis for incorrect or incomplete scaffolds.
  5. Explicit confirmation of train–test disjointness and missing implementation details.

Strong evidence on compute matching and baseline fairness could move the paper clearly toward acceptance. If the gains disappear under matched budgets or depend on weaker baseline infrastructure, the recommendation would move toward rejection.

Recommendation Overall, the paper is technically solid and well motivated, with a meaningful problem, coherent hierarchical repair design, strong ablations, and consistent results across frameworks and executors. The main concerns are the substantial inference cost, limited single-benchmark evaluation, and reliance on synthetic training errors and fixed infrastructure.

My current recommendation is accept. Confidence would increase substantially with budget-controlled comparisons and clearer evidence that the gains come from the learned repair policy rather than additional test-time computation or benchmark-specific engineering.

Area Chair C3dT · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

The paper proposes MESCoder, which first extracts a hierarchical scaffold from the screenshot and then incrementally constructs and repairs the project using a lightweight learned controller. The controller chooses among five high-level actions - continue construction, assemble components, perform a local repair, perform a cluster-level repair, or finish -- while a frozen LLM executor produces the corresponding code edits. Runtime sandbox feedback is incorporated throughout generation. The controller is initialized through offline behavioral cloning on clean and synthetically corrupted projects, then refined using PPO.

The claims of the paper are that: (1) hierarchical decomposition makes multi-file project construction and error localization more tractable (2) explicitly distinguishing local from cross-file repair is important for framework-level consistency; and (3) offline initialization followed by online RL enables the controller to learn context-sensitive repair-scope escalation. The empirical results support these claims across six frozen LLM executors and three frameworks. Compilation success improves consistently, with particularly large gains on Angular, where cross-file module and dependency constraints are more severe. Visual similarity scores also improve rather than degrading as executability increases.

The reviewers generally agree on the paper's central characterization. They view the task as important and realistic, and identify the scaffold, the distinction between local and cluster-level repair, the two-stage learning strategy, the consistent gains across six heterogeneous executors, and the thorough ablation study as the main strengths. The primary disagreement concerns whether the evaluation is sufficiently broad and whether the results generalize beyond the current benchmark, leading to one negative recommendation.

Main strengths The first major strength is the problem formulation. Executable multi-framework generation is meaningfully harder and more realistic than isolated HTML generation because correctness depends on project-wide imports, component interfaces, bindings, assembly, and framework-specific configuration. The paper identifies a clear gap between visual fidelity and actual software executability and proposes a method aligned with the structure of that gap.

Second, the system design is sensible and interpretable. Separating high-level repair control from code realization yields a relatively small action space in which online RL can focus on decisions such as whether a failure is local or requires broader intervention. The distinction between PATCHLOCAL and PATCHCLUSTER is especially well motivated for multi-file projects. The scope-escalation experiments indicate that always repairing locally cannot escape cross-file inconsistencies, whereas always making broad edits can damage healthy files; the learned policy performs selective escalation and obtains the best outcome.

Third, the empirical gains are consistent across all six model executors and across React, Vue, and Angular. The largest improvements occur in the settings most closely tied to the paper's motivation -- Angular, harder pages, and cross-file error categories -- strengthening the connection between the proposed mechanism and the observed results.

Fourth, the ablation study is strong. Removing the scaffold, the error-reduction reward, the learned policy, online RL, offline initialization, or the cluster-level repair action all produces substantial degradation. This provides useful evidence that the result is not attributable to a single incidental component and that offline and online learning play complementary roles.

Finally, the paper is generally clearly organized, and the reviewers found no meaningful ethical concerns. Two reviewers rate it on the accepting side, including one clear accept and one borderline accept.

Main weaknesses and missing evidence The most important weakness is the lack of a convincing compute-matched comparison. Because MESCoder relies on repeated LLM invocations and sandbox executions, comparisons primarily against one-shot generation do not establish whether the gains come from the learned controller or simply from greater test-time computation. The method averages roughly 10.2 LLM calls, 14.7 sandbox validations, and 134.6 seconds per page. Stronger evidence would come from comparisons with iterative retry, best-of-N, generic execution-guided repair, and rule-based repair under matched budgets for model calls, sandbox usage, generated tokens, or wall-clock time.

A second weakness is the limited scale and diversity of the evaluation. The test set includes 200 pages, only 45 of which are classified as hard, leaving uncertainty about whether the reported gains would hold across a broader range of projects, visual designs, dependency structures, and framework configurations. Since all results are reported on a single benchmark, it is also possible that the scaffold extractor, corruption process, and sandbox checks are particularly well matched to DesignBench.

Third, the offline training distribution is constructed using synthetic corruption operators. Although the operators are plausible and cover several error families, the submission does not clearly demonstrate that their frequencies and structures match errors naturally produced by the six executors during end-to-end generation. A comparison between synthetic corruptions and real executor error logs would substantially strengthen the claim that offline initialization teaches transferable repair priors rather than benchmark-specific heuristics.

Fourth, the method relies heavily on a fixed scaffold preprocessor and framework-specific sandbox. Because the controller cannot revise the scaffold, early structural errors may propagate through generation and repair, while incomplete sandbox checks may miss important failures. The paper acknowledges these dependencies but provides limited quantitative analysis of them.

Several implementation details also remain unclear, including the controller’s state representation, PPO configuration, the definition of a sufficiently healthy partial project, and whether rule repair and RLEF use the same scaffold, prompts, budgets, and verification setup. These omissions make the results harder to reproduce and compare fairly.

Comments about AST structural contrast appear unrelated to the submitted method and should not materially affect the decision. Concerns about data disjointness and compute matching, however, are relevant.

Issues that could change the recommendation after rebuttal

The most important additions would be:

  1. Compute-matched comparisons against iterative retry, best-of-N, rule repair, and execution-guided baselines.
  2. Clear confirmation that the strongest baselines share the same scaffold, executor, prompts, budgets, and sandbox.
  3. Evidence that synthetic corruptions reflect real executor failures.
  4. Robustness analysis for incorrect or incomplete scaffolds.
  5. Explicit confirmation of train–test disjointness and missing implementation details.

Strong evidence on compute matching and baseline fairness could move the paper clearly toward acceptance. If the gains disappear under matched budgets or depend on weaker baseline infrastructure, the recommendation would move toward rejection.

Recommendation Overall, the paper is technically solid and well motivated, with a meaningful problem, coherent hierarchical repair design, strong ablations, and consistent results across frameworks and executors. The main concerns are the substantial inference cost, limited single-benchmark evaluation, and reliance on synthetic training errors and fixed infrastructure.

My current recommendation is accept. Confidence would increase substantially with budget-controlled comparisons and clearer evidence that the gains come from the learned repair policy rather than additional test-time computation or benchmark-specific engineering.

2 comments
Authors · CommentOpenReview ↗

Response to Area Chair (Part 1/2)

Dear AC,

Thank you so much for recognizing the contributions of our work and for your recommendation for acceptance. Your support is a great encouragement to us. We sincerely appreciate your time and the effort you have taken to summarize reviews.

We summarize the five main points that you highlighted. We hope that these clarifications can adequately address all concerns.

Q1. Compute-Matched comparison and rollout budget

We agree that Table 8 reports the natural inference cost but does not isolate the effect of additional test-time computation. We therefore add an approximately LLM-call-matched comparison at a budget of 10 calls.

  • Iterative Retry (N=10): resample the full project from the same prompt up to 10 times, stop at the first sandbox-passing project (or return the last attempt if none pass).
  • Best-of-N (N=10): sequentially sample 10 full projects, verify all with the sandbox, and return the one with the highest CSR/CLIP.
  • Rule Repair (compute-matched): the existing rule-based repair loop, but allowed to run until it exhausts the same 10-call budget.
  • Execution-Guided (compute-matched): same scaffold and sandbox as MESCoder, but the LLM receives the raw diagnostic and freely rewrites any files it deems necessary each round, iterating until the budget is exhausted.

Table. CSR (%) under matched LLM-call budget (≈10 calls), GPT-4o, avg over React/Vue/Angular.

Method LLM Calls Sandbox Calls Wall Time (s) Avg CSR
One-Shot 1.0 1.0 18.3 87.8
Iterative Retry (N=10) 9.6 9.6 177.1 91.5
Best-of-N (N=10) 10.0 10.0 183.0 91.5
Rule Repair (compute-matched) 9.8 12.1 118.6 90.9
Execution-Guided (compute-matched) 9.9 13.5 127.6 92.6
MESCoder (ours) 10.2 14.7 134.6 95.4

Under a comparable LLM-call budget, MESCoder outperforms the strongest baseline, Execution-Guided, by 2.8 CSR points, while exceeding Iterative Retry and Best-of-(N) by 3.9 points. It is also substantially faster than repeated full-project generation. The additional sandbox calls arise from pre- and post-edit verification for cluster repair. These results show that the gain comes not only from additional calls, but from learned action selection and repair-scope control.

Q2. Baseline configuration and comparison fairness

The baseline Rule Repair uses exactly the same scaffold extraction pipeline as MESCoder, including the same layout tree, task queue, and file decomposition logic, rather than an independent or simplified one-pass component decomposition mechanism. The two methods share the same architecture and differ only at the decision layer. MESCoder uses a learned MLP policy to make decisions over the same task queue and five-action space, whereas Rule Repair relies on 20 hard-coded rule templates. Both methods use the same sandbox, verification scopes, and executor prompts.

Q3. Synthetic-to-Real failures distribution

The offline corruption pipeline contains six operators covering syntax and template errors, local bindings, component contracts, assembly and hierarchy, module dependencies, and framework-specific engineering errors. Importantly, the repair labels are not assigned through fixed rules. For each corrupted state, the executor samples four candidate edits for each repair scope, and the action with the best observed sandbox outcome is selected. This produces 27,430 state-action pairs.

We collect real failure logs by running all executors end-to-end (One-Shot setting, no repair) on DesignBench, and classify every compilation error into the same six error families. We compare this real-failure distribution against the distribution of errors sampled by our corruption operator C\mathcal{C} on the offline corpus.

Table. Error-family distribution (%): synthetic corruption corpus vs. real executor failures.

Error Family Synthetic (C\mathcal{C}) Real Executor Failures Δ
Syntax & Template 18.2 21.4 +3.2
Local Binding 22.6 19.8 −2.8
Component Contract 15.4 17.1 +1.7
Assembly & Hierarchy 17.9 15.6 −2.3
Module Dep. & Import/Export 16.1 17.9 +1.8
Framework-Specific Engineering 9.8 8.2 −1.6
Jensen–Shannon divergence 0.003

The two distributions are close, suggesting the corruption operator does not systematically over- or under-represent any error family relative to real executor behavior.

Authors · CommentOpenReview ↗

Response to Area Chair (Part 2/2)

Q4. Robustness analysis for scaffolds.

We quantify sensitivity to scaffold quality by injecting controlled structural noise into the extracted layout tree before running each method: at each noise level, a fraction of nodes have their parent link randomly reassigned, are merged with a sibling, or are dropped entirely.

Table. Avg CSR (%) under injected scaffold noise (GPT-4o, avg over React/Vue/Angular).

Node Corruption Rate Rule Repair Offline-Only MESCoder
0% 89.4 84.1 95.4
10% 85.1 79.8 92.6
20% 79.7 73.2 88.3
30% 72.3 64.5 81.9

At the estimated real-world noise level (8–12%), MESCoder's CSR degrades only marginally, whereas Rule Repair and Offline-Only degrade more sharply over the same range. We attribute this to MESCoder's cluster-level repair being able to partially compensate for structural errors introduced upstream, whereas fixed heuristics and a policy without online exploration cannot.

Q5. Explicit confirmation of train–test disjointness and missing implementation details

The training and evaluation pages are fully disjoint. The DesignBench design-generation split contains 310 compilation-verified pages. We stratify these pages by framework and structural complexity, hold out 200 pages exclusively for evaluation, and use the remaining 110 pages for training. The additional 2,000 WebCode2M projects are filtered for compilation correctness, decomposed into multi-file projects, and deduplicated against the 200 test pages. No screenshot, reference project, scaffold, corruption state, or execution trajectory derived from the 200 test pages is used during either offline initialization or online PPO training. We will add the split construction and deduplication procedure more explicitly.

To evaluate cross-benchmark generalization beyond DesignBench, we additionally use Design2Code [1], which includes 484 diverse real-world webpages, to generate React, Vue, and Angular projects with GPT-4o under the same inference protocol. MESCoder consistently improves both executability and visual fidelity across all three frameworks.

Table. Comparison on Design2Code, GPT-4o (CSR / CLIP)

Framework Method CSR CLIP
React One-Shot 96.2 0.886
React MESCoder 98.4 0.897
Vue One-Shot 91.4 0.869
Vue MESCoder 96.1 0.884
Angular One-Shot 80.6 0.803
Angular MESCoder 93.8 0.851

[1]Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineering

For missing implementation details, we clarify these details: the state–action space consists of a 101-dim continuous state and the 5-way discrete action set, with both πϕ\pi_\phi and VψV_\psi implemented as separate 2-layer MLPs mapping zt∈R101z_t\in\mathbb{R}^{101} to, respectively, the 5 action logits and a scalar state value; offline behavior cloning minimizes LoffL_{off} on the 27430 state–action pairs with per-sample Adam updates (lr 3e-4); online PPO then starts from πϕ0\pi_{\phi_0} and rolls out on the training projects with clip range 0.2, entropy coefficient 0.01, value loss coefficient 0.5, learning rate 3e-4, and GAE (γ=0.99\gamma=0.99, λ=0.95\lambda=0.95).

Finally, we would like to thank AC again for recognizing our work and for taking the time to summarize review.

Reviewer 5kUGOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes MESCoder, a tree-structured self-corrective generation framework. MESCoder operates by decomposing screenshot-to-project construction for React, Vue, and Angular into localized subtree expansions and assembly decisions based on an extracted structural scaffold. It integrates a unified Project Agent, driven by a lightweight neural controller policy, that operates within an execution sandbox. The sandbox returns runtime compiler feedback to help the agent decide when to continue construction, perform local repairs, or escalate to cluster-level repairs. The policy is trained using a two-stage process: an offline behavioral cloning phase on an automated error-corrupted project dataset, followed by online reinforcement learning via PPO to optimize long-horizon executability and visual quality.

Strengths and weaknesses

Pros:

  1. Transitioning the vision-to-code domain from simplistic, monolithic, single-file HTML generation to modular, compilable components within React, Vue, and Angular fills a critical, realistic gap in automated software engineering.

  2. The framework’s empirical claims are backed by solid experimentation across six highly distinct, state-of-the-art multimodal foundation models, including GPT-4O, Claude 3.7 Sonnet, and Gemini 2.0 Flash, used as frozen code executors. The resulting evaluation details consistent, uniform boosts in both structural CSR and CLIP metrics, indicating an architecture-agnostic advantage.

  3. The comprehensive ablation study presented in Table 2 isolates nearly every critical component of the architecture, workflow, and reward function. It cleanly quantifies the specific performance impacts of different architecture components, training settings, and rewards.

Cons:

  1. The methodology suffers from several under-explained notation assumptions and ambiguous terminology in its core text. (1) In Equation 1, the policy module parameter symbol πϕ\pi_\phi is thrown into the state-action transition system without any explicit prose defining it or explaining its parameters in the following paragraph, which skips standard formal context. (2) At Line 147, the text references executing a CONTINUE action "when the partial project is sufficiently healthy," yet fails to deliver an explicit quantitative or structural metric specifying what exact threshold constitutes a "sufficiently healthy" state.

  2. The detailed implementations of the offline behavioral cloning and online PPO exploration stages are not transparent in terms of hyperparameter selection, state-action representation vector spaces, and exact optimization duration. Furthermore, when describing the baseline architectures in Section 4.1, the authors state that "Rule Repair" "Augments a scaffold-based generation pipeline with hard-coded, heuristic fix templates...". However, it is never clearly explained where this underlying "scaffold-based generation pipeline" originates, nor whether it shares identical layout processing models with MESCoder.

  3. The systematic approach to achieving code robustness imposes a substantial operational overhead. As highlighted in Table 8, MESCoder averages 14.7 active sandbox validations and 10.2 distinct LLM inference invocations per single web page generation, driving the average wall time up to a significant 134.6 seconds. This footprint severely constrains the deployment of this architecture within latency-sensitive or interactive production environments.

  4. The entire downstream execution engine relies fundamentally on an immutable, rule-configured scaffold preprocessor. If the visual extraction logic makes an early mistake, the control policy possesses no corresponding actions to step back, re-evaluate, or restructure the core layout tree root, making it highly brittle to primary detection errors.

Questions
  1. Can you explain the theoretical or empirical process used to establish the exact action set: {CONTINUE, PATCHLOCAL, PATCHCLUSTER, ASSEMBLE, FINISH}? Why are these specific five actions necessary and sufficient to minimize compilation errors across highly distinct framework engines?

  2. In reference to text descriptions indicating that a CONTINUE choice triggers when a partial project is "sufficiently healthy", please clarify the exact criteria used to calculate this. Is it tied directly to a zero-count or stable threshold of sandbox error clusters (ete_t) within the active scope, or is it a qualitative layout heuristic check?

  3. What is the specific architectural layout and component makeup of the pipeline underlying the "Rule Repair" baseline? Does it map onto the identical layout extraction tree used by MESCoder, or is it built on a separate, simplified single-pass component decomposition mechanism?

Limitations

Yes. The authors honestly outline their limitations in Appendix H.

Final justification

The rebuttal substantively addresses all four weaknesses and all three questions, with new experiments (compute-matched cost comparison, scaffold noise robustness) that meaningfully strengthen the paper's claims. Based on the initial version of the paper, I will maintain the score.

Formatting concerns

None

4 comments
Authors · CommentOpenReview ↗

Response to Reviewer 5kUG (Part 1/2)

Dear Rrviewer 5kUG,

Thank you for recognizing our work and postive score. We address each concern below. We hope our rebuttals address your concerns.

Q1. Action-Space rationale

The five actions are derived from two operational distinctions in empirical multi-file project construction.

First, forward construction requires separate actions for generating the current unit and integrating completed children into a parent. These are represented by CONTINUE and ASSEMBLE. Second, correction requires distinguishing a single-file failure from a dependency or assembly failure spanning multiple files. These are represented by PATCHLOCAL and PATCHCLUSTER. FINISH provides the terminal decision after the task queue has been exhausted and full-project verification succeeds.

We do not claim that these five actions are theoretically necessary or universally sufficient for every possible front-end failure. They form a compact operational action space covering forward construction, hierarchical integration, two repair scopes, and termination.

The existing ablations provide empirical support for the important distinctions. Removing PATCHCLUSTER reduces average CSR by 9.9 percentage points, while removing ASSEMBLE reduces it by 5.7 points. On stagnated-cluster episodes, Always-Local obtains 21.7 CSR, Always-Cluster obtains 44.8 CSR, and MESCoder obtains 76.2 CSR. These results show that neither a single repair scope nor unconditional broad repair is sufficient, while the learned controller benefits from selecting between them contextually.

Q2. Sufficiently Healthy Criterion

Sufficiently healthy is an action-scope executability condition rather than a qualitative visual heuristic. Before advancing, the active task must have no unresolved critical diagnostic in its action-relevant scope. After CONTINUE or ASSEMBLE produces an edit, the task is committed and the pointer advances only when:

  1. the expected target file for the current scaffold node has been generated or updated;
  2. the edit is successfully applied;
  3. the number of sandbox error clusters in the active verification scope becomes zero.

The partial project is not required to pass full-project compilation at this point because files associated with future tasks may not yet exist. Full-project verification is required only for FINISH. We will replace sufficiently healthy with this explicit criterion in the main text.

Q3. Rule Repair baseline configuration

Rule Repair uses exactly the same scaffold extraction pipeline as MESCoder, including the same layout tree, task queue, and file decomposition logic, rather than an independent or simplified one-pass component decomposition mechanism. The two methods share the same architecture and differ only at the decision layer. MESCoder uses a learned MLP policy to make decisions over the same task queue and five-action space, whereas Rule Repair relies on 20 hard-coded rule templates. Both methods use the same sandbox, verification scopes, and executor prompts.

Q4. Notation and Implementation details

The policy πϕ(mt∣st)\pi_\phi(m_t \mid s_t) is a categorical actor over the five high-level actions, parameterized by ϕ\phi. The critic Vψ(st)V_\psi(s_t) estimates the value of the same project state. Only the actor and critic are optimized during online training, while the LLM executor remains frozen.

For missing implementation details, we clarify these details: the state–action space consists of a 101-dim continuous state and the 5-way discrete action set, with both πϕ\pi_\phi and VψV_\psi implemented as separate 2-layer MLPs mapping zt∈R101z_t\in\mathbb{R}^{101} to, respectively, the 5 action logits and a scalar state value; offline behavior cloning minimizes LoffL_{off} on the 27430 state–action pairs with per-sample Adam updates (lr 3e-4); online PPO then starts from πϕ0\pi_{\phi_0} and rolls out on the training projects with clip range 0.2, entropy coefficient 0.01, value loss coefficient 0.5, learning rate 3e-4, and GAE (γ=0.99\gamma=0.99, λ=0.95\lambda=0.95).

Authors · CommentOpenReview ↗

Response to Reviewer 5kUG (Part 2/2)

Q5. Cost

Although MESCoder incurs higher inference cost, our target is complete multi-file WebUI project generation rather than lightweight code completion. A low-cost but non-executable project often shifts the cost to repeated generation, manual diagnosis, and cross-file repair. We therefore consider additional inference a reasonable trade-off when it substantially improves executability and potentially reduces subsequent human verification and correction effort. We add an approximately LLM-call-matched comparison at a budget of 10 calls.

  • Iterative Retry (N=10): resample the full project from the same prompt up to 10 times, stop at the first sandbox-passing project (or return the last attempt if none pass).
  • Best-of-N (N=10): sequentially sample 10 full projects, verify all with the sandbox, and return the one with the highest CSR/CLIP.
  • Rule Repair (compute-matched): the existing rule-based repair loop, but allowed to run until it exhausts the same 10-call budget.
  • Execution-Guided (compute-matched): same scaffold and sandbox as MESCoder, but the LLM receives the raw diagnostic and freely rewrites any files it deems necessary each round, iterating until the budget is exhausted.

Table. CSR (%) under matched LLM-call budget (≈10 calls), GPT-4o, avg over React/Vue/Angular.

Method LLM Calls Sandbox Calls Wall Time (s) Avg CSR
One-Shot 1.0 1.0 18.3 87.8
Iterative Retry (N=10) 9.6 9.6 177.1 91.5
Best-of-N (N=10) 10.0 10.0 183.0 91.5
Rule Repair (compute-matched) 9.8 12.1 118.6 90.9
Execution-Guided (compute-matched) 9.9 13.5 127.6 92.6
MESCoder (ours) 10.2 14.7 134.6 95.4

Under a comparable LLM-call budget, MESCoder outperforms the strongest baseline, Execution-Guided, by 2.8 CSR points, while exceeding Iterative Retry and Best-of-(N) by 3.9 points. It is also substantially faster than repeated full-project generation. The additional sandbox calls arise from pre- and post-edit verification for cluster repair. These results show that the gain comes not only from additional calls, but from learned action selection and repair-scope control.

Q6. Scaffold Robustness

We quantify sensitivity to scaffold quality by injecting controlled structural noise into the extracted layout tree before running each method: at each noise level, a fraction of nodes have their parent link randomly reassigned, are merged with a sibling, or are dropped entirely.

Table R4. Avg CSR (%) under injected scaffold noise (GPT-4o, avg over React/Vue/Angular).

Node Corruption Rate Rule Repair Offline-Only MESCoder
0% 89.4 84.1 95.4
10% 85.1 79.8 92.6
20% 79.7 73.2 88.3
30% 72.3 64.5 81.9

At the estimated real-world noise level (8–12%), MESCoder's CSR degrades only marginally, whereas Rule Repair and Offline-Only degrade more sharply over the same range. We attribute this to MESCoder's cluster-level repair being able to partially compensate for structural errors introduced upstream, whereas fixed heuristics and a policy without online exploration cannot.

Reviewer 5kUG · CommentOpenReview ↗

I thank the authors for their thorough and well-organized response. The rebuttal substantively addresses all four weaknesses and all three questions, with new experiments (compute-matched cost comparison, scaffold noise robustness) that meaningfully strengthen the paper's claims. Based on the initial version of the paper, I will maintain the score.

Authors · CommentOpenReview ↗

Thank you for your response and for your high evaluations. Thank you again for your time and support. Best wishes.

Reviewer xdhmOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

MESCoder is a tree-structured self-corrective framework for generating executable React, Vue, and Angular projects from UI screenshots. It extracts a layout scaffold, then uses a policy module paired with an LLM executor that edits code under runtime sandbox feedback. Training combines offline behavioral cloning with online RL (PPO) optimized for compilation success and visual fidelity. On DesignBench, across six LLM executors, MESCoder consistently boosts compilation success rates—especially for Angular—while improving visual similarity to the reference screenshots, with ablations confirming the importance of the scaffold, cluster-level repair, and the two-stage training approach.

Strengths and weaknesses

Strengths:

  • Tree-structured scaffold with local/cluster repair actions directly targets cross-file failure modes.
  • Two-stage training (offline cloning + online RL) is well-ablated and shown to matter.
  • Gains hold across six LLMs and three frameworks, especially on Angular.

Weaknesses:

  • Higher inference cost (more steps, sandbox calls, wall time).
  • Small test set (200 pages, only 45 "Hard"), offline data from synthetic corruptions.
  • Heavy reliance on scaffold/sandbox quality, with limited failure analysis.
Questions
  • How does MESCoder's performance and inference cost compare to baselines on a larger or more diverse test set beyond DesignBench's 200 pages, particularly for "Hard" cases where the sample size (45) is quite small?

  • How well do the synthetic corruption operators used for offline training generalize to the actual distribution of errors made by LLM executors in practice—has this been validated against real (non-synthetic) error logs?

  • What happens when the scaffold preprocessor produces an incorrect or incomplete layout tree, or when the sandbox's framework-specific checks miss a class of errors—does the system have any mechanism to detect or recover from these upstream failures?

Limitations

See weaknesses and questions.

Final justification

The rebuttal from authors addressed most of my concerns. I have increased my score.

Formatting concerns

N/A

4 comments
Authors · CommentOpenReview ↗

Response to Reviewer xdhm (Part 1/2)

Dear reviewer xdhm,

Thank you for recognizing our work and constructive feedback. We address each concern below. We hope our rebuttals address your concerns.

Q1. Evaluation scale and diversity

The current DesignBench contains 200 held-out pages, each evaluated under React, Vue, and Angular. This corresponds to 600 framework-specific project-generation instances per executor and 3,600 instances across the six executors in each run. The 45 hard pages similarly correspond to 135 framework-specific instances per executor. Nevertheless, we agree that the current results are obtained from a single benchmark and that the number of distinct hard layouts remains limited.

To evaluate cross-benchmark generalization beyond DesignBench, we additionally use Design2Code [1], which includes 484 diverse real-world webpages, to generate React, Vue, and Angular projects with GPT-4o under the same inference protocol. MESCoder consistently improves both executability and visual fidelity across all three frameworks.

Table. Comparison on Design2Code, GPT-4o (CSR / CLIP)

Framework Method CSR CLIP
React One-Shot 96.2 0.886
React MESCoder 98.4 0.897
Vue One-Shot 91.4 0.869
Vue MESCoder 96.1 0.884
Angular One-Shot 80.6 0.803
Angular MESCoder 93.8 0.851

[1] Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineering

Q2. Synthetic-to-Real failures distribution

The offline corruption pipeline contains six operators covering syntax and template errors, local bindings, component contracts, assembly and hierarchy, module dependencies, and framework-specific engineering errors. Importantly, the repair labels are not assigned through fixed rules. For each corrupted state, the executor samples four candidate edits for each repair scope, and the action with the best observed sandbox outcome is selected. This produces 27,430 state-action pairs.

We collect real failure logs by running all executors end-to-end (One-Shot setting, no repair) on DesignBench, and classify every compilation error into the same six error families. We compare this real-failure distribution against the distribution of errors sampled by our corruption operator C\mathcal{C} on the offline corpus.

Table. Error-family distribution (%): synthetic corruption corpus vs. real executor failures.

Error Family Synthetic (C\mathcal{C}) Real Executor Failures Δ
Syntax & Template 18.2 21.4 +3.2
Local Binding 22.6 19.8 −2.8
Component Contract 15.4 17.1 +1.7
Assembly & Hierarchy 17.9 15.6 −2.3
Module Dep. & Import/Export 16.1 17.9 +1.8
Framework-Specific Engineering 9.8 8.2 −1.6
Jensen–Shannon divergence 0.003

The two distributions are close, suggesting the corruption operator does not systematically over- or under-represent any error family relative to real executor behavior.

Q3. Scaffold and Sandbox Robustness

We quantify sensitivity to scaffold quality by injecting controlled structural noise into the extracted layout tree before running each method: at each noise level, a fraction of nodes have their parent link randomly reassigned, are merged with a sibling, or are dropped entirely.

Table. Avg CSR (%) under injected scaffold noise (GPT-4o, avg over React/Vue/Angular).

Node Corruption Rate Rule Repair Offline-Only MESCoder
0% 89.4 84.1 95.4
10% 85.1 79.8 92.6
20% 79.7 73.2 88.3
30% 72.3 64.5 81.9

At the estimated real-world noise level (8–12%), MESCoder's CSR degrades only marginally, whereas Rule Repair and Offline-Only degrade more sharply over the same range. We attribute this to MESCoder's cluster-level repair being able to partially compensate for structural errors introduced upstream, whereas fixed heuristics and a policy without online exploration cannot.

Authors · CommentOpenReview ↗

Response to Reviewer xdhm (Part 2/2)

Q4. Compute-Matched Comparison and Inference Cost

Although MESCoder incurs higher inference cost, our target is complete multi-file WebUI project generation rather than lightweight code completion. A low-cost but non-executable project often shifts the cost to repeated generation, manual diagnosis, and cross-file repair. We therefore consider additional inference a reasonable trade-off when it substantially improves executability and potentially reduces subsequent human verification and correction effort. We add an approximately LLM-call-matched comparison at a budget of 10 calls.

  • Iterative Retry (N=10): resample the full project from the same prompt up to 10 times, stop at the first sandbox-passing project (or return the last attempt if none pass).
  • Best-of-N (N=10): sequentially sample 10 full projects, verify all with the sandbox, and return the one with the highest CSR/CLIP.
  • Rule Repair (compute-matched): the existing rule-based repair loop, but allowed to run until it exhausts the same 10-call budget.
  • Execution-Guided (compute-matched): same scaffold and sandbox as MESCoder, but the LLM receives the raw diagnostic and freely rewrites any files it deems necessary each round, iterating until the budget is exhausted.

Table. CSR (%) under matched LLM-call budget (≈10 calls), GPT-4o, avg over React/Vue/Angular.

Method LLM Calls Sandbox Calls Wall Time (s) Avg CSR
One-Shot 1.0 1.0 18.3 87.8
Iterative Retry (N=10) 9.6 9.6 177.1 91.5
Best-of-N (N=10) 10.0 10.0 183.0 91.5
Rule Repair (compute-matched) 9.8 12.1 118.6 90.9
Execution-Guided (compute-matched) 9.9 13.5 127.6 92.6
MESCoder (ours) 10.2 14.7 134.6 95.4

Under a comparable LLM-call budget, MESCoder outperforms the strongest baseline, Execution-Guided, by 2.8 CSR points, while exceeding Iterative Retry and Best-of-(N) by 3.9 points. It is also substantially faster than repeated full-project generation. The additional sandbox calls arise from pre- and post-edit verification for cluster repair. These results show that the gain comes not only from additional calls, but from learned action selection and repair-scope control.

Reviewer xdhm · CommentOpenReview ↗

I thank the authors for their response which mostly addresses my concerns. I am happy to increase my score.

Authors · CommentOpenReview ↗

Thank you for your thoughtful response and positive evaluation. We sincerely appreciate your time and constructive feedback. Best wishes.

Reviewer Y1N2OpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies executable front-end code generation for React, Vue, and Angular. MESCoder first extracts a structural scaffold from the screenshot and then builds the project step by step. It uses a Project Agent to choose actions such as continuing construction, local repair, cluster repair, assembly, and finish. The policy is first initialized offline and then improved with online RL using sandbox feedback. Experiments show strong improvements in compilation success and visual quality.

Strengths and weaknesses

Strength:

  1. The task is important and realistic, because real front-end projects need compilation, multi-file consistency, and runtime correctness.

  2. The scaffold design is clear and useful. It matches the tree structure of UI pages and makes generation and repair more local.

  3. The local repair and cluster repair actions are well designed. They can handle both single-file errors and cross-file errors.

  4. Offline initialization gives a useful prior, and online RL helps the agent learn when broader repair is needed.

Weaknesses:

  1. The method has higher inference cost because it uses more LLM calls and sandbox calls. A clearer budget-matched cost-quality analysis would be helpful.

  2. The train and test split is not clearly described, although the method uses benchmark problems, test cases, and reference solutions during training.

  3. The efficiency metrics are computed only on correct programs, so different methods are compared on different sets of solved problems.

Questions
  1. Are the training and evaluation problems fully disjoint for every benchmark?
  2. Are all baselines matched for total rollout and compute budget?
Limitations

NA

Final justification

The rebuttal have addressed all of my concerns, so I keep my score. I give 5 since I think MESCoder is a practical agent for generating different front-end framework. Also, the provided code is a good resource for me and this community.

Formatting concerns

NA

3 comments
Authors · CommentOpenReview ↗

Response to Reviewer Y1N2

Dear reviewer Y1N2,

Thank you for recognizing our work and postive score. We address each concern below.

Q1. Unclear train-test disjointness

The training and evaluation pages are fully disjoint. The DesignBench design-generation split contains 310 compilation-verified pages. We stratify these pages by framework and structural complexity, hold out 200 pages exclusively for evaluation, and use the remaining 110 pages for training. The additional 2,000 WebCode2M projects are filtered for compilation correctness, decomposed into multi-file projects, and deduplicated against the 200 test pages. No screenshot, reference project, scaffold, corruption state, or execution trajectory derived from the 200 test pages is used during either offline initialization or online PPO training. We will add the split construction and deduplication procedure more explicitly.

Q2. AST

MESCoder does not contain AST structural-contrast module, and no AST difference is mapped to efficiency-related token spans.

Q3. Compute-Matched comparison and rollout budget

We agree that Table 8 reports the natural inference cost but does not isolate the effect of additional test-time computation. We therefore add an approximately LLM-call-matched comparison at a budget of 10 calls.

  • Iterative Retry (N=10): resample the full project from the same prompt up to 10 times, stop at the first sandbox-passing project (or return the last attempt if none pass).
  • Best-of-N (N=10): sequentially sample 10 full projects, verify all with the sandbox, and return the one with the highest CSR/CLIP.
  • Rule Repair (compute-matched): the existing rule-based repair loop, but allowed to run until it exhausts the same 10-call budget.
  • Execution-Guided (compute-matched): same scaffold and sandbox as MESCoder, but the LLM receives the raw diagnostic and freely rewrites any files it deems necessary each round, iterating until the budget is exhausted.

Table. CSR (%) under matched LLM-call budget (≈10 calls), GPT-4o, avg over React/Vue/Angular.

Method LLM Calls Sandbox Calls Wall Time (s) Avg CSR
One-Shot 1.0 1.0 18.3 87.8
Iterative Retry (N=10) 9.6 9.6 177.1 91.5
Best-of-N (N=10) 10.0 10.0 183.0 91.5
Rule Repair (compute-matched) 9.8 12.1 118.6 90.9
Execution-Guided (compute-matched) 9.9 13.5 127.6 92.6
MESCoder (ours) 10.2 14.7 134.6 95.4

Under a comparable LLM-call budget, MESCoder outperforms the strongest baseline, Execution-Guided, by 2.8 CSR points, while exceeding Iterative Retry and Best-of-(N) by 3.9 points. It is also substantially faster than repeated full-project generation. The additional sandbox calls arise from pre- and post-edit verification for cluster repair. These results show that the gain comes not only from additional calls, but from learned action selection and repair-scope control.

Q4. Baseline fairness

Rule Repair, RLEF, Offline-Only, and MESCoder use the same LLM executor, framework build environment, runtime verifier, input screenshots, and evaluation protocol. Rule Repair and Offline-Only additionally use the same extracted scaffold and task queue as MESCoder. Their differences lie in how the next construction or repair operation is selected. We will explicitly list every shared and method-specific component in the revised experimental setup.

Q5. Efficiency evaluation

Table 8 is computed over all 200 test pages across React, Vue, and Angular, including both successful and unsuccessful generations. It is not restricted to correctly compiled projects. Therefore, all methods are compared over the same fixed evaluation population. We will revise the caption to remove this ambiguity.

Reviewer Y1N2 · CommentOpenReview ↗

I have read your rebuttals, I have no more concerns. Also, I read other reviews, I keep my positive scores. It's a good practical paper.

Authors · CommentOpenReview ↗

Thank you for your encouraging comments and positive evaluation. We are delighted that you found our work to be a practical contribution. We sincerely appreciate your time and careful review. Best wishes.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…