Markdown OKF-Schema Studio

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
Giventwo warnings and a successful render
Whenthe preview renders
Thenthe banner shows the count (2 MyST syntax warnings from conf.py), the warning icon, an Open Problems button and a Close the warning button, as a polite status after the status region in Tab order
refusalOther statuses show the full list instead
Givenan error, stale, recovery or pending status
Whenthe preview renders
Thenthe status region shows the full list instead of the banner
boundaryThe banner takes no layout room
InputOutcome
The banner appears or closesNo content or scroll anchor moves
The banner showsIt 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 themesIt stays readable
nominalOpen Problems opens the Problems view
Input (the reader activates Open Problems)Outcome
A trusted previewThe 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
InputOutcome
previewShowProblems without the envelopenot a registered message; ignored, no handler runs
previewShowProblems whose documentId is not the shown documentdropped by the document gate; the Problems view is not opened
nominalClosing dismisses the banner for that document
Giventhe banner shown
Whenthe reader activates the Close the warning button
Thenthe banner is removed at once without moving anything, the warning set key is sent, the host remembers it per document until VS Code restarts and hands it back on reload, so the banner stays closed after a reload and a second preview of the file shares the dismissal
boundaryThe banner returns when the warning set changes
Input (after a dismissal)Outcome
A new warning textThe banner shows again
Only line numbers changeThe banner stays closed
Only the order changesThe banner stays closed

The warnings stay in the status region in every case.

boundaryThe memory of closed banners is bounded
InputOutcome
A banner closed for a 201st document in one sessionThe least recently used dismissal is forgotten (that document shows its banner again) and the memory keeps at most 200 documents
boundaryRestricted Mode lists the warnings in the tooltip
Givenan untrusted workspace
Whenthe preview renders
Thenno warning is published to the Problems view, the banner has no Open Problems button, its tooltip lists the warning lines and the Close the warning button is kept and closes the banner

Implemented in 5

Tested by 6

Replaces

SwRS-MDOKFSTUDIO-MYST-082The banner takes no layout room superseded superseded by SwRS-MDOKFSTUDIO-MYST-081 Markdown file
SwRS-MDOKFSTUDIO-MYST-083Open Problems opens the Problems view superseded superseded by SwRS-MDOKFSTUDIO-MYST-081 Markdown file
SwRS-MDOKFSTUDIO-MYST-084Closing the banner dismisses it for that document superseded superseded by SwRS-MDOKFSTUDIO-MYST-081 Markdown file
SwRS-MDOKFSTUDIO-MYST-085The banner returns when the warning set changes superseded superseded by SwRS-MDOKFSTUDIO-MYST-081 Markdown file
SwRS-MDOKFSTUDIO-MYST-086In Restricted Mode the banner lists warnings in its tooltip superseded superseded by SwRS-MDOKFSTUDIO-MYST-081 Markdown file