HTML rendered in UI
URL
No response
How to reproduce the issue?
when trying to post to a note
Screenshot(s) or anything else?
No response
@gravitystorm @Firefishy - Where does this message live? I'm assuming load balancer? I can't find it anywhere in our repos.
It's the page passenger renders if the queue is full.
There was a brief spike just after 0800 UTC when the things may have been overloaded:
I'm not really sure why this was closed though I'm also not sure what we can do about it.
I'm also not sure what we can do about it.
parse the XML and use the textContent if the message starts with a <?
We could simplify this a lot (and fix various other things, e.g. #6367) if we rewrote the notes UI to just be standard rails views. The current situation, where it runs as a mini-SPA built to use the API, adds more complexity (and edge cases) than is necessary, imho.
Looking at how this works currently, with view to creating a descriptive issue. Is my understanding below correct?
The interface is glued together by the router, which handles page loads (full or pushState). This is similar to how libraries like Sammy.js or Davies.js used to do it back at the time when this was built.
Each route handles a module (eg: index/new_note.js) which does a lot of JS-based heavy lifting, handling state, interacting with the API and rendering results on the appropriate panel.
Ideally this should be converted to use Hotwire. Rather than a big bang rewrite, we might be able to convert each individual route separately (eg: NewNote) and only remove the router at the end, if everything has indeed been converted.
Does that sound right?
Well the main issue @gravitystorm was talking about is that fact that the web site interface to notes (unlike most things) is implemented in javascript using API calls rather than having separate rails/web routes.
Separately there is the issue of the client side javascript router thing that none of us understands properly and which we'd love to replace with hotwire/turbo etc yes.
So yes please feel free to work on those things!
When in comes to notes it may also be worth looking at the previous tickets around the data model and the ideas for improving it which I think are currently partially implemented.
Adding to that router confusion is that some of the JS controller invoking code is mixed into the JS controller code. To separate those there's #6295.
I have reframed this issue in terms of the solution (as suggested above), the root cause, and related issues at https://github.com/openstreetmap/openstreetmap-website/issues/6495