These messages are known as Watchlist notices.
This page is transcluded via MediaWiki:Watchlist-summary to the top of Special:Watchlist, where this gadget selectively shows it to editors. The list itself is also used as an anchor point for Geonotices to insert themselves into the HTML. The specific watchlist notices that the user has dismissed are stored in the browser's local storage, in a variable named hidewatchlistmessages
.
<ul>...</ul>
elements.