Testing AI Coding Models: The Boundaries of Visual Generation and Code Reasoning

    This article explores the capabilities of mainstream AI coding models when handling multimodal inputs and complex code generation. Through qualitative tests on three common development tasks—UI design-to-code, WebGL 3D scene generation, and a table editor with undo/redo and async saving—we examine how AI models understand visual designs and implement frontend logic, while also discussing the limitations of these tests and practical considerations for developers.

    With the increasing popularity of cloud-native and low-code tools, intelligent coding models are evolving from simple code completion tools into engines capable of understanding multimodal requirements and generating code. This article records a small-scale test of a mainstream large language model (LLM), focusing on one core question: when a model possesses both visual understanding and code reasoning capabilities, how does the frontend and backend collaboration workflow change?

    1. Test Scope and Limitations

    The test covered three high-frequency development tasks: generating a frontend page from a UI design draft, building a WebGL 3D scene based on semantic descriptions, and implementing a table editor with undo/redo and asynchronous save features. No fine-tuning or specialized prompt optimization was applied to the model. Instead, developers used everyday natural language to make requests, aiming to replicate the experience of an average user.

    Three limitations must be stated upfront. First, this article does not provide test sample sizes or statistical methods; the descriptions below are qualitative observations and should not be treated as performance metrics. Second, specific details such as the model’s exact version, cloud instance CPU and GPU specs, browser version, and the full original prompts are not disclosed. Readers wishing to reproduce the tests will need to fill in these gaps. Third, no side-by-side comparisons with other models under identical conditions were conducted, so we cannot judge its standing relative to competitors.

    2. Frontend Page Rendering: Layout and Design Intent

    The input for the first task was a UI design draft that included responsive grids, flexible layouts, and interactive animation specifications. The generated code was rendered in Chrome at a 1440px desktop viewport and a 375px mobile viewport, then compared against the design draft.

    The comparison showed no obvious layout misalignment in either viewport. The code utilized a mix of CSS Grid and Flexbox, with an overall structure consistent with common engineering practices. For requirements like “elements vertically centered within a container while height adjusts with content,” the code used a combination of min-height and align-content instead of fixed heights, preventing overflow when content increased. It is worth noting that this comparison was done manually via visual inspection, without calculating pixel deviation rates or setting tolerance thresholds.

    In terms of visual details, branded buttons with gradients and shadows in the design draft were approximated in the code using linear-gradient and box-shadow. While this approach closely matched the original texture, verifying the exact color values would require checking them one by one with a color picker tool.

    For interactions, the task required a card to flip and display information on its back when clicked. The generated code used transform-style: preserve-3d and backface-visibility: hidden to achieve the flip effect, paired with useState to manage the front-to-back switching state. This demonstrates the model’s ability to translate “seen interactions” into corresponding CSS and state logic.

    If teams want to quantify such results, they can build a comparison table recording screenshots, color difference tolerances, and interaction states for each viewport, and agree on acceptance criteria in advance.

    3. 3D Scene: Level of Detail in Example Code

    The second task required building a space scene featuring a rotating Earth, an orbiting satellite, and a dynamic starry sky background. Instead of calling a high-level encapsulated 3D library, the model directly used native WebGL interfaces and relied on glMatrix for matrix transformations.

    In the code, the vertex shader handled the deformation of the sphere mesh, while the fragment shader calculated the atmospheric light attenuation based on the viewing direction. The division of labor between them was clear, and the structure closely resembled common graphics programming tutorials.

    The code also included a Level of Detail (LOD) implementation. In the example, when the Earth’s radius was set to 20 units, the longitude segment count decreased from 64 to 24. These numbers were merely example values; they were not automatically determined by the model based on the runtime environment. In actual projects, segment counts should be configured according to the target device and stress-tested on the target GPU to confirm that frame rates and memory usage meet requirements before finalizing them.

    4. Table Editor: State History and Asynchronous Saving

    The third task required implementing undo and redo, in-cell validation, and asynchronous saving. Instead of stacking multiple useState hooks to manage state, the code adopted the Reducer pattern to record change history.

    Each modification was saved as a command object, structured similarly to {type: 'UPDATE_CELL', row, col, prevValue, nextValue}. The object also stores