For the Revise Tone Structured Task, we want to close the Visual Editor again when the user declines the initial Tone check shown to them (see {T405173}).
While that works as expected on desktop, there is an error on mobile and our steps after closing VE are failing to show. Given that mobile is our main target audience for this project, this is not great.
Looking into the technical interfaces for that, it becomes clear that the problem is VE/MobileFrontend.
In VE, the `tryTeardown` method on `MobileArticleTarget` is not returning a Promise like the method on `ArticleTarget` that it overrides (LSP violation):
```name=ve.init.mw.MobileArticleTarget.js,lang=js,COUNTEREXAMPLE
ve.init.mw.MobileArticleTarget.prototype.tryTeardown = function () {
this.overlay.onExitClick( $.Event() );
};
```
We depend on that Promise to know when the teardown of VE has finished so that we can show our UI elements.
Based on [previous conversations](https://wikimedia.slack.com/archives/C09733J9YTF/p1759420966609659?thread_ts=1758902317.597859&cid=C09733J9YTF), this seems to be fundamentally an issue with MobileFrontend.
There was already some attempt to improve this 3 years ago, but it fizzled out:
* VE: [ve.init.mw.MobileArticleTarget.tryTeardown: Fix return type](https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/727010)
* MobileFrontend: [EditorOverlayBase: fix onBeforeExit's cancel call](https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/773940)