Skip to content

Standardize preferences storage paths across all platforms (macOS, Windows, Linux) #531

Description

@haiphucnguyen

Summary

Currently, ApplicationPreferences and AccountPreferences both rely on Java's Preferences API, which writes to ~/.java/.userPrefs/io/askimo/... on all platforms. This path is non-standard on every OS and causes friction - especially on Linux where XDG compliance is expected.

Current behavior

Storage Path
Java Preferences (ApplicationPreferences, AccountPreferences) ~/.java/.userPrefs/io/askimo/app/...
App data (AskimoHome) ~/.askimo/personal/

Expected behavior (per-platform convention)

Platform Preferences path Notes
macOS ~/Library/Application Support/Askimo/ Standard for macOS apps
Windows %APPDATA%\Askimo\ Standard for Windows apps
Linux $XDG_CONFIG_HOME/askimo/ (default ~/.config/askimo/) XDG Base Directory spec

Scope

  • ApplicationPreferences — UI layout, onboarding state
  • AccountPreferences — sync cursors, model selection, plan inputs, star prompt state, hardware acceleration flags, UI scale

Proposed behavior

Class New storage location
ApplicationPreferences <AskimoHome.base()>/prefs/app.properties
AccountPreferences (per account) <AskimoHome.base()>/prefs/accounts/<accountId>.properties
AccountPreferences (device) <AskimoHome.base()>/prefs/accounts/__device__.properties

AskimoHome.base() already resolves to ~/.askimo/personal/ by default and respects the ASKIMO_HOME env override - no new path logic needed.

Benefits

  • Consistent with AskimoHome - all app data under one known directory
  • Fully testable via the existing AskimoHome.withTestBase() test infrastructure - no system property hacks needed in tests
  • No global JVM-level side effects (unlike a custom PreferencesFactory)
  • Users can easily find, back up, and inspect their preferences as plain text files
  • If user remove Askimo, then they delete ~/.askimo, everything gone, no orphaned data scattered across other folders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions