News for hackers. Stuff that matters.
Re:RustGPT: ChatGPT UI Built with Rust, Htmx, SQLite by wild_egg on Monday November 20, 2023 @11:15AM (#38349942)
I've found the simplest option is to have the server respond with the markup for the flash message.

The server can include a couple response headers to override the placement of the message to not affect the existing page state

https://htmx.org/docs/#response-headers

This allows the error to either be added inline in the UI somewhere or (my preference) displayed as a toast by appending to the end of the <body>

Re:RustGPT: ChatGPT UI Built with Rust, Htmx, SQLite by hu3 on Monday November 20, 2023 @01:28PM (#38352132)
Perfect thanks!