You've solved that incredibly well!
I also really like that the Marimo file format is just Python. Here's an example saved file from playing around with the intro: https://gist.github.com/simonw/e6e6e4b45d1bed9fc1482412743b8...
Nice that it's Apache 2 licensed too.
Wow, I just found the GitHub Copilot feature too!