Behaviour SwRS-MDOKFSTUDIO-MYST-081
A closable banner announces conf.py warnings
When a render succeeds with conf.py warnings, the extension SHALL show a one-line banner N MyST syntax warning(s) from conf.py with a warning icon, an Open Problems button and a Close the warning button, as a polite status after the status region in Tab order, that takes no layout room and stays closed for that document until the set of warning texts changes.
Step 1 of path 2 in StRS-MDOKFSTUDIO-MYST-007: from “The warnings are listed” to “The banner shows the number of MyST syntax warnings from conf.py”.
Scenarios 9
The situations the tests check; open one to read it.
nominalThe banner shows the count and both buttons
refusalOther statuses show the full list instead
boundaryThe banner takes no layout room
| Input | Outcome |
|---|---|
| The banner appears or closes | No content or scroll anchor moves |
| The banner shows | It sits in the 40 px gap left of the floating toolbar without covering it and scrolls away with the page top; it keeps 156 px clear at the right (the four-button width of the toolbar main row, its 14 px margin and 8 px of clearance), with the toolbar expanded or collapsed |
| A very narrow pane (460 px) | It stays on one line with an ellipsis and adds no sideways scroll |
| Light, dark and cream themes | It stays readable |
nominalOpen Problems opens the Problems view
| Input (the reader activates Open Problems) | Outcome |
|---|---|
| A trusted preview | The host's Problems view opens |
| An untrusted preview (a message already sent) | The host accepts `previewShowProblems` since it edits nothing; in Restricted Mode the banner itself has no Open Problems button |
The message type previewShowProblems (page to host) carries the envelope fields only (documentId, revision, requestId), no further field, and passes the document gate (SwRS-MDOKFSTUDIO-TRUST-052 for the envelope, SwRS-MDOKFSTUDIO-TRUST-065 for the gate).
refusalA malformed or mismatched previewShowProblems is ignored
| Input | Outcome |
|---|---|
| previewShowProblems without the envelope | not a registered message; ignored, no handler runs |
| previewShowProblems whose documentId is not the shown document | dropped by the document gate; the Problems view is not opened |
nominalClosing dismisses the banner for that document
boundaryThe banner returns when the warning set changes
| Input (after a dismissal) | Outcome |
|---|---|
| A new warning text | The banner shows again |
| Only line numbers change | The banner stays closed |
| Only the order changes | The banner stays closed |
The warnings stay in the status region in every case.
boundaryThe memory of closed banners is bounded
| Input | Outcome |
|---|---|
| A banner closed for a 201st document in one session | The least recently used dismissal is forgotten (that document shows its banner again) and the memory keeps at most 200 documents |