Code change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: Stable & Insiders OS Version: Any Steps to Reproduce: Jupyter extension the following cell against a Python kernel The expected output is fairly simple: ( can appear some where in the middle) However VS Codes output is incorrect We are missing the line breaks (looks like this PR seems to have broken that) (using blockinline-block` fixes this). We have duplicate entries (as you can see below, we have multiple times) i think this has to do with the fact that we're trying to re-use the previous output and append the new stuff into the previous output element Note: This can be repro'ed in stable as well, but if i were to remove the code that tries to append to the previous element, then it looks as expected. Not sure when this part of the code broken though. Didn't go through the change log to determine this, you might have a better idea.
note that this is from the test, so that could probably be modified to check for the fix
It looks like this was briefly solved (at least for me as I reported in ) but the problem is now reappearing.
I agree, I can replicate the same bug again, hence reopening this issue. Looks like subsequent change regressed the fix.
seems to be a worse regression now (only in insiders) and repros without needing to do anything with background threads (unless I just have some bad setting): !
I'm seeing something similar with the JavaScript/tslab notebook I use for teaching async and promises. Previously, the output was inconsistent across runs with sometimes missing or duplicated output. Now all the expected output is present but with line breaks appearing only after some async code (e.g. ) is executed. <img width="661" alt="image" src="https://user-"
I reproduced output shown by above with missing new lines in code-insiders at ~14:00 UTC +1 (CET). In a code-insiders session that has been running last 24 hours. Restarting code-insiders approximately an hour later (15.00 UTC+1), the output is now shown with correct line breaks, see screenshot below. Version: 1.75.0-insider (user setup) Commit: Date: 2023-01-09T05:29:27.679Z Electron: 19.1.8 Chromium: 102.0.5005.167 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0. Sandboxed: Yes Output after code-insiders restart: !
confirmed that this no longer seems to reproduce on the latest.
Adding label as confirmed above.

Related discussion:
text: const outputElement = (prev.firstChild as HTMLElement | null); if (outputElement && outputElement.getAttribute('output-mime-type') === outputInfo.mime) { // same stream <del> const text = outputInfo.text(); const element = document.createElement('span'); </del> <ins> // find child with same id const existing = outputElement.querySelector(`[output-item-id="${outputInfo.id}"]`) as HTMLElement | null; if (existing) { clearContainer(existing); } const text = outputInfo.text(); const element = existing ?? document.createElement('span'); element.classList.add('output-stream'); element.setAttribute('output-item-id', outputInfo.id); </ins> insertOutput(outputInfo.id, [text], ctx.settings.lineLimit, ctx.settings.outputScrolling, element); outputElement.appendChild(element); return;