Repository navigation
Bound custom agent SVG classification cache - #1192
kogekiplay wants to merge 2 commits into
Conversation
|
The Ubuntu desktop jobs on #1192, #1193, and #1194 each report a runner shutdown signal and exit 143. Could someone with Actions write access rerun those jobs once the runs finish? The separate frontend failure on this PR is the existing login expiry test. A one-millisecond gap between its two clock reads reproduces the observed redirect using the actual storage helpers. #1194 fixes the test clock independently; the icon cache PR does not change the login path. |
The bounded monochrome classification cache evicted in insertion order with a 512 Ki-unit budget, smaller than two maximum-size (256 KiB) icons. Two such icons on screen evicted each other, re-decoding on every render. Refresh entries on hit (LRU) and raise the budget to 2 Mi units. The login test's expiry case read Date.now() before the stamp was written; a millisecond on a slow runner left the item at the limit instead of past it. Freeze the clock for the stamp.
|
Verdict: the approach holds. Ready once the follow-up commit is included. Bounding the per-URL classification cache in Findings and fixes (follow-up commit on this branch)
Verification: prettier, eslint and The changes were pushed to this pull request (3 files, +58/-6). 🤖 Generated with Codeg |
Replacing or previewing a custom agent SVG leaves its full base64 data URL in the monochrome classification cache until the renderer exits. Repeating this retains old icons even after they are no longer displayed.
Cap the cache at 128 entries and 512 Ki UTF-16 code units of URL keys. Evict the oldest entries when either limit would be exceeded, and classify an oversized URL without caching it. SVG classification is unchanged.
Both regression cases fail on
mainand pass with the fix: many small icons and a few large icons evict the old classification while the newest still hits the cache. The full frontend test suite, changed-file lint and formatting, and the static build pass.