Playground snippet menu is broken (CTRL+SPACE)

Hello !

I just noticed that the code snippet menu (CTRL+SPACE) on the Playground is broken.

Screencast from 03-04-2025 10:03:54

I have used it a few days ago, so I’m pretty sure it’s a recent change

cc @RaananW

Additional info:

In Chrome version 134.0.6998.165 (arm64), the helper functions are visible. However, after upgrading to version 135.0.7049.42 (arm64), they no longer appear.

If you open a new “Incognito mode” window, you should see the helper functions even in the latest version. Maybe Chrome caching might affecting the visibility.

1 Like

@SimoneDev you are right pointing out a cache issue. After a forced refresh of Google Chrome, the broken snippet it gone. Either is was indeed cache, either at the same time one of the devs had changed something :stuck_out_tongue:

1 Like

Works for me:

But I am going to continue trying to reproduce, as I a sure both of you have tried refreshing etc’.

Does anyone else experience that? any error in the network/console?

1 Like

Hello Raanan ! :slight_smile:

Yes sorry, maybe you missed my message just above, but on my side a forced refresh fixed it


Still, I think there is something odd with the Monaco editor cache management, that’s not the first time the editor has something broken until a full refresh. Also, I remember that @roland which is MacOS user had tons of issue with unwanted $ signs on code snippets (Auto TAB jump being broken), I don’t know if it’s still the case :thinking:

2 Likes

Sorry, missed that.

Was probably an issue with the typings. Either a bad build/nightly that we missed (which I am going to check, because we shouldn’t) or something temporary on the CDN. I’ll try investigating, I hope to find the reason.

2 Likes

Issue identified! This appears to be an async issue that occurs randomly due to network conditions. However, you can reproduce it consistently by increasing network latency (Chrome Developer Tools > Network > Fast 4G).

When the issue occurs, the following code:

is executed before the callback function that populates the this._template:

ending with the missing helper functions in the array.

Maybe we can move the fetch in setupMonacoAsync function and await its completion before iterating over this._templates.

5 Likes

@SimoneDev now that’s a neat bug identification ! Well done ! :smiley:


Are you kidding we can simulate latency in Google Chrome ? :rofl: :rofl: :rofl:
OMG I love you.
I had never looked for such option since I use to have a custom option on my side to simulate latency on my NodeJS servers ! :grin:

2 Likes

Always put it on 3G. Simulate real-life-work-from-tunnel :slight_smile:

1 Like

Want to submit a PR? I will be happy to review it and see if it works as expected :slight_smile:

1 Like

Absolutely! On it!

3 Likes

Here we are!

6 Likes

Approved

4 Likes