RSNewWebUI/webui-src/app/forums
jolavillette b62095aaf3 forums: measure the composer limit in bytes, and build the body once
Three defects in the new thread composer.

The 199 000 limit of a GXS message is a *byte* count, but the composer compares
it against String.length, which counts UTF-16 units: an accented letter is two
bytes for one unit, an emoji four bytes for two. With an emoji picker one click
away in that very toolbar, the counter can report room left on a message the
core will refuse. It now measures UTF-8 through TextEncoder, and says bytes
rather than characters.

postBody() was called five times per render -- twice for the class, twice for
the counter text, once for the disabled state -- and it re-escapes the message
and re-joins every inline image, each of which is up to 175 KB of base64. That
ran on every global redraw, which the statusbar triggers continuously, while the
user is typing. It is now built once per pass.

pollFileHash() re-arms itself every 500 ms for up to a minute. Closing the
composer left it running: it kept polling and redrawing a component that is no
longer mounted. onremove now stops it.
2026-08-13 13:50:09 +02:00
..
forum_view.js forums: measure the composer limit in bytes, and build the body once 2026-08-13 13:50:09 +02:00
forums_util.js Improved forum create 2026-08-12 20:43:39 +02:00
forums.js Improved forum create 2026-08-12 20:43:39 +02:00
my_forums.js fix: forum needs bug fix, fixed basic ui 2023-06-19 23:57:35 +05:30
other_forums.js fix: forum needs bug fix, fixed basic ui 2023-06-19 23:57:35 +05:30
popular_forums.js Improved for phone the webui pages 2026-07-26 20:50:14 +02:00
subscribed_forums.js Improved for phone the webui pages 2026-07-26 20:50:14 +02:00