Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-004

A long render never blocks the text editor, and a render that a newer edit supersedes stops

When a preview renders a document in the VS Code host, the extension SHALL keep the text editor responsive during a long render, stop a render that a newer edit, a cancel or a closed preview supersedes, and still render when no background thread can start.

Part of StRS-MDOKFSTUDIO-LIFE-005, outside the paths drawn on its map.

Scenarios 3

The situations the tests check; open one to read it.

nominalA long render leaves the host free
Givena preview of an 11,000-line document in the VS Code host
Whenan edit triggers a render
Thenthe text editor stays responsive while the render runs, and the preview shows the same HTML, diagnostics and dependencies as any other render
boundaryA superseded render stops
InputOutcome
a render whose request is aborted while it runs (a newer edit, a cancel, the preview closed)the render stops at once and rejects as canceled; the next render starts normally
a render waiting its turn whose request is abortedthe render rejects as canceled and never starts
a render whose request was aborted before it startedthe render never starts
the extension stops while a render runsthe render rejects as canceled
refusalNo background thread can run
InputOutcome
the worker script is missing or the thread fails before it is readythe render, and every later one, still completes with the same output
a thread that was ready dies during a renderthat render fails with the reason; after three such deaths in a row renders still complete

Implemented in 5

Tested by 3