Took a short look into the bug discussed here: Anki 2.1.43 Beta - #10 by dae
When you empty deck, in webview.py load_ts_page("congrats") is called. Which calls this function:
class AnkiWebView:
def inject_dynamic_style_and_show(self):
self.evalWithCallback("...", self.show)
And that is where the race condition happens. If the page goes to rebuilt-deck page before the callback is called, the callback and self.show() never runs. (deck rebuilding doesn’t call self.show()) So the page remains hidden.
No idea if this will help, but figured since I’ve already investigated this much, I’d write it anyway. I was actually planning to write a fix, but the webview.py code has changed so much that I’m afraid any fix I write is probably going to create more bugs 