cs.LGNov 1, 2026

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

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

Organizations: The University of Sydney · Harvard University · Meituan · University of Michigan · 

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. Code is available at https://github.com/leo-lilinxiao/MESCoder.

Figures & tables

Appendix figures & tables7 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. MulFCoder: Framework-conditioned Multi-agent for MLLM-based Multi-framework Front-end Code Generation

    Oct 25, 2026Jie Wu, Haoran Ma, Shisong Tang +3Code GenerationImage-to-Code Generation

  2. Phase-wise MLLM Tuning for Multi-framework WebUI Code Generation

    Nov 1, 2026Haoran Ma, Linxiao Li, Chenyue Wang +2Image-to-Code GenerationLLM Code Generation

  3. Vision-Guided Iterative Refinement for Frontend Code Generation

    Apr 7, 2026Hannah Sansford, Derek H. C. Law, Wei Liu +3Code GenerationVision-Language Model-as-a-Judge