oliver-zehentleitner / maity
web: a redraw replaces every image on the page (logo and avatars load twice and are aborted)
tsk-4pgj07raakw7 Done An agent
Seen by Oliver on maity.team, Firefox, /agents (2026-11-12, screenshot in the lead's chat): after a delete, every image on the page shows NS_BINDING_ABORTED in the network panel. That covers both header logos (maity-lockup.svg, maity-lockup-dark.svg) and every avatar (/api/v1/avatars/…, initiator dom.js:37), each loaded twice, 30–170 ms and 0.9–2.8 kB each.
Reading: a redraw builds the whole page again, the frame and header included. Each new <img> replaces the old one, so the browser aborts the old load and starts a new one. The images still arrive, but each redraw costs one request per image and can flicker.
Goal:
- A redraw keeps
<img>nodes whosesrchasn't changed: logo, avatars, and anything else with a stable URL. - The frame and header aren't rebuilt for a content redraw.
- Find out which pages redraw this way (only /agents, or every page on each poll or event) and post it as a note before the fix.
- Test: a redraw with unchanged data creates no new
<img>nodes (e2e or unit test ondom.js).
Related: tsk-m65g76c979jk (the slow delete; its web part shows "deleted" right away and redraws in the background).
Notes
An agent · Nov 12, 2026, 15:08 UTC
Which pages redraw this way (read in the code at main
327c359, checked in headless Chromium against the fixtures):1. A full drawing (`render()` in `web/js/app.js`, also `M.redraw`) clears
#headerinrenderHeaderand builds it again: both lockups, the switcher's project logos, the profile avatar (M.avatar(ctx.me)). Then it replaces<main>with a freshly built view, so every avatar is new too. This happens on every page whenever one of these runs:- any change of view (a link, Back or Forward; a card opened on the board and a chat picked in /chats follow the route and are the exceptions)
- Reload / Reload list in the watch notice
- the quiet reload on /all and a project's Inbox when the request count moves (counts round)
keepFreshafter a switch when the session,/meor the memberships changed- a Settings save, the restricted-access save, the sign-in banner, a maintenance change, a language change, Try again
The first load also swaps
index.html's static lockups for new<img>nodes.2. Idle polling does not redraw the whole page. I left 10 pages open for 65 s (/all, /agents, /inbox, /chats, /notifications, board, overview, project agents, team, a project chat). None got a new lockup or a new
<main>. Two rounds do replace images:- the 60 s
/meround swaps the whole switcher (renderSwitcher), so its project logos are new each round, on every page - /chats rebuilds its conversation list every 30 s, which gave 12 new logo
<img>in the fixture
3. Redraws local to a view rebuild their lists, avatars included:
- /agents:
draw()clears the list body after any change, whether a delete, a new profile or a join, and every row'sM.avataris new. These are the avatars from the report (dom.js:37is thesrcset inh()). - the project's Agents page (
redraw) - Members (
members.js:1052) - the org tree and fleet on
member_*events
A delete on #/agents in the fixture added no
<img>to#header. So on /agents the doubled lockups come from a full drawing, i.e. the page load or a change of view, and not from the delete's own redraw.Plan for the fix goes to the lead next.