# Concurrent prompt and response blocks Extend the supplied single-block page into a workspace for independent prompt requests. Keep the root `index.html` directly openable offline, using local mock generation rather than an external AI service. ## Interaction Start with one draft block. Ignore empty sends. Sending puts that block into a visible loading state immediately. Draft text alone must not reveal the add-block control. Show exactly one add-block placeholder whenever all existing blocks have been submitted, including pending, completed and failed requests. Clicking it adds a draft, focuses the new input and hides the placeholder until the new draft is submitted. Let multiple blocks generate concurrently. Results and failures belong only to their originating block, even when requests finish out of order. Keep the response area visible while pending and show loading text such as “Generating” or “生成中”, or a visible indicator with `aria-busy="true"`. Show failure in that block's response area (for example, “Error” or “失败”). A completed or failed request stops loading, and the block can be edited and submitted again. Updates in another block must not steal focus or discard edits. ## Integration and layout Use centralized lifecycle state (a block manager with app-level state and change notifications); keep each block's state independent and update it through the manager rather than mutating rendered components independently. Expose `window.__setMockGenerate(fn)`, where `fn(prompt, blockId)` returns a Promise of response text. Use distinct, stable IDs for blocks. Preserve `data-testid` hooks `sidebar`, `content`, `prompt-response-block`, `prompt-input`, `send-button`, `response`, and `new-block-placeholder`. The sidebar displays the status of each block. At 1200 px viewport width, use a 240 px sidebar, 32 px spacing, and a fluid centered content area with a 900 px maximum and 16 px side padding. Keep the page scrollable with a Raycast-style custom scrollbar; define shared dimensions as CSS variables and adapt the layout on narrow screens. ## Acceptance Checklist - Offline rendering preserves the sidebar and responsive content dimensions; at phone width the page does not scroll horizontally. - Blank sends and unsent drafts do not unlock the placeholder. Submitting each draft enables one placeholder, and adding a block focuses its input. - Concurrent blocks show loading independently, have distinct IDs and retain their own out-of-order results. The sidebar tracks statuses and completion does not steal focus. - Resubmitting a completed or failed block updates that block without creating a duplicate. A local failure leaves other results intact and does not block adding another block.