Skip to content

fix: centralize cache file registry#1370

Merged
andrinoff merged 7 commits into
floatpane:masterfrom
mavonx:fix/issue-564
May 29, 2026
Merged

fix: centralize cache file registry#1370
andrinoff merged 7 commits into
floatpane:masterfrom
mavonx:fix/issue-564

Conversation

@mavonx
Copy link
Copy Markdown
Member

@mavonx mavonx commented May 27, 2026

What?

Replaces the hardcoded file list inside MigrateCacheFiles() with two package-level registries: cacheFiles for JSON cache files and cacheDirectories for cache subdirectories.

Why?

Previously, adding a new cache file to the project required finding and updating the hardcoded list inside MigrateCacheFiles(). This was easy to forget and caused files to be silently left behind in the old ~/.config/matcha/ location after migration. Now there is a single obvious place to register new cache paths.

Closes #564

@mavonx mavonx requested a review from a team as a code owner May 27, 2026 21:31
@floatpanebot floatpanebot added bug Something isn't working area/config Configuration / settings size/S Diff: 11–50 lines labels May 27, 2026
@floatpanebot floatpanebot added the size/M Diff: 51–200 lines label May 27, 2026
@mavonx mavonx marked this pull request as draft May 28, 2026 07:24
@mavonx mavonx marked this pull request as ready for review May 28, 2026 09:07
@andrinoff
Copy link
Copy Markdown
Member

@mavonx join the Discord, please, we communicate there, there is also an audit log

Comment thread config/encryption.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectDataFiles still has the directory names hardcoded (also in bodyDir and sigDir) loop over them too

@mavonx mavonx marked this pull request as draft May 28, 2026 16:01
@mavonx mavonx marked this pull request as ready for review May 28, 2026 16:04
@mavonx
Copy link
Copy Markdown
Member Author

mavonx commented May 28, 2026

@andrinoff

The signatures part is not related to centralized caching folders or files, so I didn’t touch it.

@mavonx mavonx requested a review from andrinoff May 28, 2026 16:05
@andrinoff andrinoff requested review from FromSi and removed request for andrinoff May 28, 2026 16:06
@andrinoff andrinoff removed the size/S Diff: 11–50 lines label May 28, 2026
@andrinoff andrinoff enabled auto-merge (squash) May 29, 2026 15:40
@andrinoff andrinoff merged commit 18062bf into floatpane:master May 29, 2026
27 checks passed
@floatpane floatpane deleted a comment from mavonx May 29, 2026
@floatpane floatpane deleted a comment from andrinoff May 29, 2026
@floatpane floatpane deleted a comment from mavonx May 29, 2026
@mavonx mavonx deleted the fix/issue-564 branch May 29, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Configuration / settings bug Something isn't working size/M Diff: 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: MigrateCacheFiles list is incomplete/static

4 participants