This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="720" viewBox="0 0 1200 720" role="img" aria-labelledby="title desc">
|
||||
<title id="title">Автомат учебной формы с обработкой устаревшего ответа</title>
|
||||
<desc id="desc">Схема показывает состояния ready, submitting, editing after submit, stale response ignored, server error и accepted. Нижняя примечание отделяет модель данных от HTTP и браузера.</desc>
|
||||
<rect width="1200" height="720" fill="#f7f8fc"/>
|
||||
<text x="60" y="66" font-family="Arial, sans-serif" font-size="38" font-weight="700" fill="#172033">Форма: response применим только к снимку input</text>
|
||||
<text x="60" y="110" font-family="Arial, sans-serif" font-size="25" fill="#536079">attemptId + versions, а не «последний callback»</text>
|
||||
<g font-family="Arial, sans-serif" text-anchor="middle">
|
||||
<rect x="70" y="230" width="180" height="92" rx="16" fill="#e9edff" stroke="#536dfe" stroke-width="3"/>
|
||||
<text x="160" y="269" font-size="30" font-weight="700" fill="#172033">ready</text><text x="160" y="300" font-size="21" fill="#536079">current values</text>
|
||||
<rect x="330" y="230" width="220" height="92" rx="16" fill="#fff0dd" stroke="#d77700" stroke-width="3"/>
|
||||
<text x="440" y="269" font-size="30" font-weight="700" fill="#172033">submitting</text><text x="440" y="300" font-size="21" fill="#536079">attempt 1 · v2</text>
|
||||
<rect x="630" y="230" width="230" height="92" rx="16" fill="#fff7de" stroke="#b18200" stroke-width="3"/>
|
||||
<text x="745" y="269" font-size="27" font-weight="700" fill="#172033">editing after submit</text><text x="745" y="300" font-size="21" fill="#536079">email v3</text>
|
||||
<rect x="940" y="230" width="190" height="92" rx="16" fill="#e7f6ed" stroke="#198754" stroke-width="3"/>
|
||||
<text x="1035" y="269" font-size="29" font-weight="700" fill="#172033">accepted</text><text x="1035" y="300" font-size="20" fill="#536079">save snapshot</text>
|
||||
<rect x="450" y="420" width="255" height="102" rx="16" fill="#ffe7e8" stroke="#c73743" stroke-width="3"/>
|
||||
<text x="578" y="459" font-size="29" font-weight="700" fill="#172033">server error</text><text x="578" y="490" font-size="20" fill="#536079">matching attempt + version</text>
|
||||
<rect x="810" y="420" width="265" height="102" rx="16" fill="#e2f5f4" stroke="#147a75" stroke-width="3"/>
|
||||
<text x="943" y="459" font-size="28" font-weight="700" fill="#172033">stale ignored</text><text x="943" y="490" font-size="20" fill="#536079">old error has no effect</text>
|
||||
</g>
|
||||
<g fill="none" stroke="#536079" stroke-width="3" marker-end="url(#arrow)">
|
||||
<path d="M250 276H322"/><path d="M550 276H622"/><path d="M860 276H932"/>
|
||||
<path d="M745 322V382H943V412"/><path d="M440 322V382H578V412"/>
|
||||
<path d="M578 522V570H160V332"/><path d="M943 522V570H250V322"/>
|
||||
</g>
|
||||
<g font-family="Arial, sans-serif" font-size="21" fill="#3e4a63">
|
||||
<text x="267" y="252">submit → snapshot</text><text x="570" y="252">edit field</text><text x="869" y="252">matching success</text>
|
||||
<text x="820" y="374">old response, v2 ≠ v3</text><text x="462" y="374">matching error</text>
|
||||
<text x="304" y="557">retry from current values</text><text x="695" y="557">retry</text>
|
||||
</g>
|
||||
<rect x="60" y="626" width="1080" height="54" rx="10" fill="#172033"/>
|
||||
<text x="84" y="660" font-family="Arial, sans-serif" font-size="20" fill="#ffffff">Граница fixture: только in-memory state. Нет HTTP, Fetch, задержки, DOM, browser или server status.</text>
|
||||
<defs><marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#536079"/></marker></defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
Reference in New Issue
Block a user