Screenshot-to-code moves beyond single HTML files: MESCoder lifts React, Vue and Angular compilation success to as high as 99.1%
Generating front-end code from UI screenshots has largely targeted a single HTML file, while React, Vue and Angular projects only count as usable when the whole project compiles. MESCoder first extracts a layout tree from the screenshot, turning whole-project generation into localized subtree and assembly decisions, then has a Project Agent choose between local repair and cross-file cluster repair under runtime sandbox feedback, trained by offline initialization plus online reinforcement learning. On the 200-page DesignBench test set, compilation success exceeds one-shot generation for all three frameworks across six LLM executors, with the largest gain on Angular, for example 71.1 to 89.2 under GPT-4o.