{
  "$schema": "https://pi-tui.ratstack.sh/schema/pattern.schema.json",
  "aka": [
    "Retryable draft"
  ],
  "animated": false,
  "apis": [
    {
      "name": "ctx.ui.custom",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#use-custom-screens-and-overlays"
    },
    {
      "name": "Input",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#compose-built-in-components"
    },
    {
      "name": "KeybindingsManager.matches",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#handle-keyboard-input-and-focus"
    },
    {
      "name": "TUI.requestRender",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#understand-the-component-model"
    },
    {
      "name": "Focusable",
      "url": null
    }
  ],
  "applicability": [
    "Use this when a compact compose view submits asynchronously."
  ],
  "category": "editors",
  "categoryLabel": "Editors and drafts",
  "consequences": [
    "A failed send leaves the draft available for retry.",
    "Blank text, duplicate sends and terminal escape sequences need separate guards."
  ],
  "family": "behavioral",
  "familyLabel": "Behavioral",
  "id": "retry-buffer",
  "implementation": [
    "Reject blank drafts and duplicate sends.",
    "Ignore raw escape sequences as text input."
  ],
  "intent": "Keep the local draft editable after a failed send.",
  "jsonUrl": "https://pi-tui.ratstack.sh/patterns/retry-buffer.json",
  "kind": "component",
  "knownUses": [
    {
      "example": "intercom-compose-buffer",
      "moreRefs": 0,
      "refs": [
        {
          "file": "ui/compose.ts",
          "lines": "18-91",
          "sha": "a5fad4df",
          "url": "https://github.com/nicobailon/pi-intercom/blob/a5fad4df2a9fe4909bf4d9b06263c8316976b57d/ui/compose.ts#L18-L91"
        }
      ],
      "repo": "pi-intercom",
      "repoUrl": "https://github.com/nicobailon/pi-intercom",
      "title": "Compose with explicit send state and inline failure recovery"
    }
  ],
  "linkedFrom": [
    {
      "how": "keeps unsubmitted text local",
      "id": "draft-fence",
      "jsonUrl": "https://pi-tui.ratstack.sh/patterns/draft-fence.json",
      "mdUrl": "https://pi-tui.ratstack.sh/patterns/draft-fence.md",
      "name": "Draft Fence",
      "url": "https://pi-tui.ratstack.sh/patterns/draft-fence/"
    }
  ],
  "links": {
    "agentGuide": "https://pi-tui.ratstack.sh/llms.txt",
    "index": "https://pi-tui.ratstack.sh/patterns.md",
    "skill": "https://pi-tui.ratstack.sh/skills/build-pi-tui-component.md"
  },
  "mdUrl": "https://pi-tui.ratstack.sh/patterns/retry-buffer.md",
  "motivation": "Intercom's compose overlay can fail to send after the user has already typed a message.",
  "name": "Retry Buffer",
  "participants": [
    {
      "name": "ctx.ui.custom",
      "role": "Mounts one interaction and resolves through done.",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#use-custom-screens-and-overlays"
    },
    {
      "name": "Input",
      "role": "Owns single-line editing and cursor state.",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#compose-built-in-components"
    },
    {
      "name": "KeybindingsManager.matches",
      "role": "Resolves input against configurable action bindings.",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#handle-keyboard-input-and-focus"
    },
    {
      "name": "TUI.requestRender",
      "role": "Requests a coalesced redraw after state changes.",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.3/packages/coding-agent/docs/tui.md#understand-the-component-model"
    },
    {
      "name": "Send state",
      "role": "Prevents duplicate submission while retaining text on failure.",
      "url": null
    }
  ],
  "pi": "1.0.3",
  "related": [
    {
      "how": "restores text after temporary submission",
      "id": "draft-return",
      "jsonUrl": "https://pi-tui.ratstack.sh/patterns/draft-return.json",
      "mdUrl": "https://pi-tui.ratstack.sh/patterns/draft-return.md",
      "name": "Draft Return",
      "url": "https://pi-tui.ratstack.sh/patterns/draft-return/"
    }
  ],
  "sampleCode": {
    "code": "// Retry Buffer: keep an editable draft when an asynchronous send fails.\n// Machine: editing/failed --submit--> sending --failure--> failed.\nimport { Input, truncateToWidth, type Component, type Focusable } from \"@earendil-works/pi-tui\";\nimport type { PatternStory } from \"../../../src/pattern.ts\";\n\nexport const story: PatternStory = {\n  id: \"retry-buffer\",\n  title: \"Retry Buffer\",\n  kind: \"component\",\n  apis: [\"Input\", \"Focusable\", \"KeybindingsManager.matches\", \"TUI.requestRender\"],\n  rows: 8,\n  states: [\n    { id: \"editing\", label: \"Draft\" },\n    { id: \"sending\", label: \"Send pending\", steps: [\n      { type: \"keys\", data: \"\\r\" }, { type: \"keys\", data: \"\\r\" },\n    ] },\n    { id: \"failed\", label: \"Retry available\", steps: [{ type: \"wait\", ms: 600 }] },\n  ],\n  setup({ theme, tui, keybindings }) {\n    const draft = new Input({ prompt: \"> \" });\n    draft.setValue(\"Please review the parser patch\");\n    let sendState: \"editing\" | \"sending\" | \"failed\" = \"editing\";\n    let attempts = 0;\n    let pending: ReturnType<typeof setTimeout> | undefined;\n    class ComposeBuffer implements Component, Focusable {\n      get focused() { return draft.focused; }\n      set focused(value: boolean) { draft.focused = value; }\n      invalidate() { draft.invalidate(); }\n      dispose() { clearTimeout(pending); }\n      handleInput(data: string) {\n        if (keybindings.matches(data, \"tui.input.submit\")) {\n          if (sendState === \"sending\" || !draft.getValue().trim()) return;\n          sendState = \"sending\";\n          attempts++;\n          // Synthetic send driver: no process, network or file access.\n          pending = setTimeout(() => { sendState = \"failed\"; tui.requestRender(); }, 600);\n        } else if (sendState !== \"sending\") draft.handleInput(data);\n        tui.requestRender();\n      }\n      render(width: number) {\n        return [\n          theme.fg(\"accent\", \"Retry Buffer · compose message\"),\n          theme.fg(\"muted\", \"To: Review session\"),\n          ...draft.render(width),\n          theme.fg(sendState === \"failed\" ? \"error\" : \"muted\", truncateToWidth(\n            sendState === \"failed\" ? \"Send failed · destination unavailable\" :\n              sendState === \"sending\" ? \"Sending · input locked until result\" : \"Local draft · not sent\", width)),\n          theme.fg(\"text\", \"Send attempts: \" + attempts),\n          theme.fg(\"muted\", truncateToWidth(sendState === \"sending\" ?\n            \"Enter ignored · no duplicate send\" : \"Enter \" + (sendState === \"failed\" ? \"retry · edit the retained draft\" : \"send · blank drafts stay local\"), width)),\n        ];\n      }\n    }\n    return new ComposeBuffer();\n  },\n};\n",
    "lang": "ts",
    "path": "stories/patterns/behavioral/retry-buffer.ts"
  },
  "states": [
    {
      "dont": false,
      "expectFail": [],
      "frames": [
        {
          "alt": "Retry Buffer, Draft state, 40 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-40-dark.dcd2aac68f37.webp",
          "theme": "dark",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Draft state, 40 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-40-light.ef2be805034e.webp",
          "theme": "light",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Draft state, 60 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-60-dark.a82ee64d832a.webp",
          "theme": "dark",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Draft state, 60 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-60-light.d92987f7b758.webp",
          "theme": "light",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Draft state, 80 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-80-dark.0344b0be2a3a.webp",
          "theme": "dark",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Draft state, 80 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-80-light.da362a3d13bd.webp",
          "theme": "light",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Draft state, 120 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-120-dark.e55da5ccbc45.webp",
          "theme": "dark",
          "w": 2400,
          "width": 120
        },
        {
          "alt": "Retry Buffer, Draft state, 120 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/editing-120-light.1a04233467cb.webp",
          "theme": "light",
          "w": 2400,
          "width": 120
        }
      ],
      "how": "Show a synthetic compose draft.",
      "id": "editing",
      "label": "Draft",
      "problems": []
    },
    {
      "dont": false,
      "expectFail": [],
      "frames": [
        {
          "alt": "Retry Buffer, Send pending state, 40 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-40-dark.f1e236dbd2af.webp",
          "theme": "dark",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Send pending state, 40 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-40-light.bfc6c2238f49.webp",
          "theme": "light",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Send pending state, 60 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-60-dark.883833d8da20.webp",
          "theme": "dark",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Send pending state, 60 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-60-light.b5539cb5f5db.webp",
          "theme": "light",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Send pending state, 80 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-80-dark.e190610856fe.webp",
          "theme": "dark",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Send pending state, 80 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-80-light.93969848124e.webp",
          "theme": "light",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Send pending state, 120 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-120-dark.05d79e147c1f.webp",
          "theme": "dark",
          "w": 2400,
          "width": 120
        },
        {
          "alt": "Retry Buffer, Send pending state, 120 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/sending-120-light.1d9c698ca7e6.webp",
          "theme": "light",
          "w": 2400,
          "width": 120
        }
      ],
      "how": "Disable duplicate submission while the send is pending.",
      "id": "sending",
      "label": "Send pending",
      "problems": []
    },
    {
      "dont": false,
      "expectFail": [],
      "frames": [
        {
          "alt": "Retry Buffer, Retry available state, 40 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-40-dark.1d1c8ae57fe5.webp",
          "theme": "dark",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Retry available state, 40 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-40-light.d69e698d3c08.webp",
          "theme": "light",
          "w": 800,
          "width": 40
        },
        {
          "alt": "Retry Buffer, Retry available state, 60 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-60-dark.4525b469896f.webp",
          "theme": "dark",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Retry available state, 60 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-60-light.9d92d47af7cd.webp",
          "theme": "light",
          "w": 1200,
          "width": 60
        },
        {
          "alt": "Retry Buffer, Retry available state, 80 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-80-dark.3f7d37783567.webp",
          "theme": "dark",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Retry available state, 80 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-80-light.fc08ccc37169.webp",
          "theme": "light",
          "w": 1600,
          "width": 80
        },
        {
          "alt": "Retry Buffer, Retry available state, 120 columns, dark theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-120-dark.7ea90d27f9cc.webp",
          "theme": "dark",
          "w": 2400,
          "width": 120
        },
        {
          "alt": "Retry Buffer, Retry available state, 120 columns, light theme, 6 rows",
          "animated": false,
          "animation": null,
          "checks": [
            {
              "evidence": [],
              "name": "width",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "style-leak",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "hard-coded-colour",
              "status": "pass",
              "verdict": "pass"
            },
            {
              "evidence": [],
              "name": "height",
              "status": "pass",
              "verdict": "pass"
            }
          ],
          "h": 264,
          "rows": 6,
          "still": "https://pi-tui.ratstack.sh/frames/retry-buffer/failed-120-light.86028d7c7ea0.webp",
          "theme": "light",
          "w": 2400,
          "width": 120
        }
      ],
      "how": "Show an inline error with the unchanged draft ready to retry.",
      "id": "failed",
      "label": "Retry available",
      "problems": []
    }
  ],
  "structure": "draft -> sending\nfailure -> draft + error\nretry -> sending",
  "thumbnails": {
    "dark": {
      "animation": null,
      "src": "https://pi-tui.ratstack.sh/thumbs/retry-buffer/dark.5ccf25cb042d.webp"
    },
    "light": {
      "animation": null,
      "src": "https://pi-tui.ratstack.sh/thumbs/retry-buffer/light.303af2035e08.webp"
    }
  },
  "url": "https://pi-tui.ratstack.sh/patterns/retry-buffer/",
  "widths": [
    40,
    60,
    80,
    120
  ]
}
