mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-13 02:39:42 +02:00
_selectTiledSession added a once animationend listener to the focused tile's tab on every focus. On every skin but OG the glow is `animation: none`, so animationend never fires: the listeners piled up on the tab (and the class stayed). It now glows a tab only when it is not glowing already, so a tab holds at most one; on OG the animation ends, the class goes and the next focus glows again. Measured (50 tile focus changes, daylight-blue): animationend listeners on the tabs 0 -> 49 before, 0 -> 6 (one per tab) after. Over the leak run's 20 grid open/close cycles the page's listener count grew 1003 -> 1042; this is the part CDP could attribute. Live, this code: 50 tile focus changes leave 6 animationend listeners on the tabs, one per tab. The single view's copy of the same block (app.js selectSession) has the same leak on every non-OG skin; it is a separate, pre-existing copy and is left alone here. Test: ten focus changes leave one listener; after animationend the next focus glows again; mutation-checked. Scope: PR 2 (tile-grid.js). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>