Replicating a Conversational Web UI: Workflow and Quality Acceptance Criteria

    A conversational web page looks like nothing more than an input box and a message stream, but a faithful replica touches information architecture, interaction states, streaming output, session persistence, credential boundaries, and mobile layout. This article explains how to split the work into three independently reviewable deliverables—functional specification, high-fidelity replica, and optimized version—how to collect reference-site behavior in an auditable way, how to run a two-round prompting process with proper API key handling, and how to use a fixed acceptance checklist instead of subjective "looks similar" judgments. The approach turns differences between coding agents and execution frameworks into repeatable engineering comparisons rather than one-off demos.

    A conversational web page looks deceptively simple—an input box plus a message stream—but a real replica involves information architecture, interaction states, streaming output, session persistence, permission and API key boundaries, and mobile layout. Handing the task to an AI coding tool with “make a version of this” commonly produces something visually close with a working happy path, while sharing, history, error handling, and narrow screens all fall out of alignment. A more reliable approach is to split the work into three independently reviewable deliverables and use a unified operating procedure to compare how different models and agent frameworks differ in strategy.

    Define “Replica” First, Not the Page

    A replica is not a pixel-perfect screenshot collage. It means equivalence with the reference site in observable behavior. Start by fixing three deliverables:

    1. Product functional spec and structure diagram—what capabilities the page has, where the entry points are, how states transition, and what the user sees on failure.
    2. High-fidelity replica page—matching the reference site in functionality and key UI, including critical layout relationships on both desktop and mobile.
    3. Optimized version—adding capabilities the reference site doesn’t fully cover but that conversational products generally need, without breaking the main path.

    Review the three deliverables separately. The spec answers “what exists,” the replica answers “is it faithful and usable,” and the optimized version answers “what’s more reasonable.” If you mix them into one generation pass, the model tends to substitute “prettier” for “more consistent.”

    Make Information Collection Auditable

    When collecting from the reference site, record only publicly visible interactions and never rely on private post-login data. Browse by area checklist: top bar and account entry, session list, new conversation, message area, input area, attachments and voice, settings, sharing, error and empty states, loading and interruption. Each record should capture the trigger condition, the UI change, whether it’s reversible, and whether it survives a refresh.

    Also read the public conversational API documentation, but abstract only the general contract: how a conversation turn is created, how responses stream or don’t, how history is carried, how roles are represented, and how rate limits and auth failures are handled. Don’t copy one vendor’s paths and field names into your business code as the only standard; implement your own adapter interface and keep vendor differences behind your gateway.

    The functional structure diagram can have two layers. The upper layer is user tasks: start a conversation, continue with context, manage history, share results, adjust preferences. The lower layer is system capabilities: identity and quota, message orchestration, streaming, storage, content safety, observability. Mark the boundary between “must match the reference site” and “optimization allowed,” so the optimized version can’t silently change what the replica is being accepted on.

    Unified Prompts, Separate Acceptance

    Instructions to the executing agent should be stable and repeatable. Round one provides only goals and constraints: the role is a senior product and frontend engineer; deliverables are the three artifacts above; work must be based on public pages and public API docs, with no invented unobserved buttons; the replica must not change the information architecture on its own; the optimized version must justify each addition and its impact on the main path. Explicitly require the spec and structure diagram before the page, to avoid writing the UI first and patching the docs afterward into inconsistency.

    Only in round two do you provide credentials—and only test-environment, minimal-privilege, rotatable keys. State in the prompt: keys must not be bundled into the frontend package or appear in the repo or screenshots; the frontend talks only to your own backend; the backend forwards to the model service. Round-two acceptance is not “it returns one message” but a regression suite after key integration: auth failure, timeout, interrupted generation, empty reply, overlong context, and concurrent send clicks.

    In practice you’ll see strategy divergence. Some agents, once given a key, only run the shortest smoke path and stop as soon as the page prints text. Others keep probing error branches and discover issues like the input box being obscured on narrow screens, share links losing session readability in a different browser, or state not rolling back after stopping generation. The operator should keep the same prompt, same reference site, and same acceptance sheet, recording differences as strategy rather than as one-off luck. Comparison dimensions can include: does the documentation cover exceptions, does the replica explicitly mark unimplemented items, position and size of key mobile controls, depth of testing after key integration, and whether optimizations can be toggled off.

    In Implementation, Capture State, Not Skin

    The core states of a chat page are few but easy to combine incorrectly: empty session, sending, streaming, completed, failed-retryable, stopped, and history loading. The input area must handle disabled state, placeholder, multi-line growth, and send/stop mutual exclusion. The message area must handle user and assistant bubbles, code blocks, and long-text scroll anchoring: scroll to the bottom when the user just sent, but don’t yank the view back down as new tokens arrive while the user is reading earlier messages.

    Aggregate streaming at your gateway. The sketch below shows structure only, not any vendor’s interface:

    1. Client --POST /chat--> own gateway --forward--> model service
    2. Gateway pushes an event stream: delta / done / error
    3. Client only appends increments; on done, persist and unlock the input

    History messages should be stored and retrieved server-side by session ID so a refresh restores them. If sharing exists, define its visibility scope separately: does the link opener need to log in, is it read-only, does it include subsequent new messages. During acceptance, open the share link in a clean browser—don’t self-test only in your logged-in window. On mobile, check the input box’s position relative to the keyboard and safe area; don’t settle for “looks the same” at desktop width.

    Optimizations Must Be Explainable and Reversible

    Optimization is not feature-stacking. Generic improvements worth prioritizing: understandable failure reasons with retry, stoppable generation, searchable long conversations, confirmation for dangerous actions, locally remembered preferences (such as streaming on/off), and loading feedback for key operations. For each item, document the user problem, the scope of change, and whether it affects the replica comparison. When researching publicly, only adopt verifiable interaction principles—don’t write unverified capabilities into the spec.

    Keys, logging, and content safety should be tightened during optimization too. Logs can record request IDs, latency, and error categories—but not full prompts or keys. Run a secret scan on frontend build artifacts. Put rate limiting and quota at the gateway, so the browser never connects directly and exposes credentials to every visitor.

    An Acceptance Checklist Beats Subjective Scoring

    Score against one fixed sheet instead of a one-line “looks similar” verdict:

    • Does the spec list the main path, exceptions, refresh, and sharing?
    • Does the structure diagram separate user tasks from system capabilities?
    • Are unimplemented items in the replica explicitly marked rather than faked with dead buttons?
    • Do the input area, message area, and primary buttons match reference behavior on both desktop and mobile?
    • After round two, are auth failure, timeout, interruption, and empty replies covered?
    • Can each optimization be toggled off individually without breaking the replica comparison?

    The most robust result is usually not the flashiest single-generation page, but the version with honest documentation, a clearly drawn fidelity boundary, aligned mobile details, and continued deep testing after key integration. Fix the prompt, the procedure, and the acceptance sheet, and your team can turn “different execution strategies” into a repeatable engineering comparison instead of a one-off demo.