Visual Formatting Breaks on Save

While configuring a query, I can get the visual formatting set exactly the way I want it, as seen here:

However when I click save, it resets the visual formatting to this, which is incorrect:

It does this every single time, and it shows incorrectly on the dashboard as well.

Hi @gavinf
Please post "Diagnostic Info" from Admin > Troubleshooting.

{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.10+9",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": " https://adoptopenjdk.net/ ",
"java.version": "11.0.10",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.10+9",
"os.name": "Linux",
"os.version": "4.14.219-119.340.amzn1.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"bigquery"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "12.5"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
}
},
"run-mode": "prod",
"version": {
"date": "2021-04-20",
"tag": "v0.39.0.1",
"branch": "release-x.39.x",
"hash": "47bb5f2"
},
"settings": {
"report-timezone": "UTC"
}
}
}

@gavinf Try latest release 0.39.2
I'm not able to reproduce - I have tried several things. Can you reproduce with Sample Dataset or just plain static SQL?
Does this happen with all questions, or only specifically this question?
It kinda sounds like this issue, but just for the X-axis, though the different axis are quite different code:
https://github.com/metabase/metabase/issues/15882

It only happens to this question. I've got about 40 other questions that work fine. And it's happening to me and two other people (including our data scientist.) Again, only for this question, though.

I'll ask our team to upgrade to 0.39.2

@gavinf If you just take the query and create a new question, does it also happen?
I'm trying to figure out if it is caused by something specific to the results metadata, or if it is some strange visualization/setting that is causing problems on the old question.

I copy/pasted the query into a new question, and it seems to be working fine now.

@gavinf If you have this problem again, then it would be great if you could provide the row of the question from the application database (Postgres 12.5 in your case) - they're stored in the table report_card
Anything that you absolutely need to redact should be done by replacing it with <redact>, so I can easily see the difference between the possible corruption and changes you have made before posting.