I'm not much of a coder so I can't really speak to how well coded the game is, but they started work on the JS port over a year ago. So if it's really as bad as you say, I can't imagine how they've been spending all that time. That said, it doesn't exactly inspire confidence that Gedan, the guy who handled building the APKs for the flash version, told me that he could either spend a bunch of time getting mobile builds out (something he should already know the basics of considering he's done it before) or he could learn a completely new system (PWAs) and it would still take the same amount of time.
The impression I get from poking around in the dev tools while the game is running is that they spent much of the time converting AS3 to JS, and building up the new UI. That's a huge ass task, I'm sure, and they
have obviously done some things to make stuff better.
I have to add that I enjoy TiTS a lot and I fully support their transition to JS, I'm just armchair developer-ing. It's easy for me to be critical of how the game works, b/c I have
lots of both game and web dev experience. If it were me I'd have used the JS update to 'refactor', not just 'port', but
many of their decisions make sense.
The biggest thing that jumped out to me is that the game code seems to rely
a lot on 'side effects' (technical term). How flags get set and where they are read from is kind of all over the place. That's considered a very poor design choice, b/c it makes it hard to keep track of and maintain things over time. I imagine some of that is b/c of TiTS starting in Flash/AS3/whatever. That is probaby the biggest basic problem that ripples out into other issues, like the insane (imo) inefficiency in their save game files, softlocks during encounters, etc.