Skip to content

Refactor storage & downloader#31

Merged
Purdze merged 7 commits intoPommeMC:masterfrom
arse09:refactor/storage
Mar 24, 2026
Merged

Refactor storage & downloader#31
Purdze merged 7 commits intoPommeMC:masterfrom
arse09:refactor/storage

Conversation

@arse09
Copy link
Copy Markdown
Contributor

@arse09 arse09 commented Mar 23, 2026

This PR is a refactor of storage handling and separating filesystem logic from downloader logic.

Summary

Test plan

  • Remove .pomc folder from your projects directory.
    - Linux: $XDG_DATA_HOME/.pomc (usually ~/.local/share/.pomc)
    - Windows: %APPDATA%\.pomc (usually C:\Users\<User>\AppData\Roaming\.pomc)
    - macOS: $HOME/Library/Application Support/.pomc
  • Open your launcher and see the folder structure appear.
  • To test settings saving:
  • Go to settings.
  • Change them.
  • Close and open the launcher.

@arse09 arse09 force-pushed the refactor/storage branch from f4d1100 to 9030abe Compare March 24, 2026 00:56
@arse09 arse09 force-pushed the refactor/storage branch from 9030abe to 5731230 Compare March 24, 2026 01:05
@arse09 arse09 marked this pull request as ready for review March 24, 2026 01:08
@arse09 arse09 marked this pull request as draft March 24, 2026 01:08
@arse09 arse09 force-pushed the refactor/storage branch from f99bdb1 to ab8bab4 Compare March 24, 2026 02:33
@arse09 arse09 marked this pull request as ready for review March 24, 2026 04:09
Copy link
Copy Markdown
Collaborator

@Purdze Purdze left a comment

Choose a reason for hiding this comment

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

data_dir() called repeatedly, every path function calls data_dir() which calls ProjectDirs::from() each time. Should cache it with LazyLock or OnceLock

Settings loaded from disk on every toggle, update_settings calls load() then save() on each click. Should keep settings in memory and only write on change

accounts.json is fine for non-sensitive data (username, UUID) but auth tokens should stay in the OS keyring where they're encrypted. Don't migrate tokens to a plaintext JSON file

@arse09 arse09 marked this pull request as draft March 24, 2026 13:20
@arse09 arse09 marked this pull request as ready for review March 24, 2026 13:57
@Purdze Purdze merged commit 3821725 into PommeMC:master Mar 24, 2026
4 checks passed
@arse09 arse09 deleted the refactor/storage branch March 26, 2026 22:32
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.

2 participants