Skip to content

Keep local file image URLs between mounts so avatars do not reload - #1913

Closed
joepio wants to merge 2 commits into
developfrom
claude/project-thread-u8vgm0-avatar-cache
Closed

joepio wants to merge 2 commits into
developfrom
claude/project-thread-u8vgm0-avatar-cache

Conversation

@joepio

@joepio joepio commented Sep 29, 2026

Copy link
Copy Markdown
Member

What

Before: opening User Settings again made your picture load again, and slowly. Every time the page mounted, the image was read out of the local database again, showed nothing until that finished, and got a brand new blob: URL that the browser had to decode from scratch.

After: the URL made for a blob is remembered for the session (per database, at most 24, oldest revoked), so the picture shows on the first render when you return to the page.

How

useFileObjectUrl keeps a small least-recently-used map from blob to object URL and returns it synchronously; it no longer revokes the URL when a component unmounts. Files that are not stored locally still use the server download URL, so their speed depends on the browser cache and is not changed here. Lint and typecheck pass; not measured in a browser yet.


Generated by Claude Code

joepio added a commit that referenced this pull request Oct 5, 2026
… chat, search, CI) (#2060)

Combines #1530, #1638, #1663, #1835, #1869, #1896, #1898, #1911, #1912, #1913, #1914, #1918, #1919, #1929, #1931, #1949, #1958, #1959, #1961, #1963, #1968, #1975, #1981, #1985, #1988, #2038, #2041, #2047 and #2050, tested in one full Mancave run on the exact head (run 4999, green).

joepio commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in the combined batch #2060 (95707c0), tested together in one full run. Closing as included.


Generated by Claude Code

@joepio joepio closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant