Skip to content

Store the configuration file in Application Support for new installs - #1516

Merged
lujjjh merged 1 commit into
mainfrom
default-config-in-application-support
Nov 15, 2026
Merged

lujjjh merged 1 commit into
mainfrom
default-config-in-application-support

Conversation

@lujjjh

@lujjjh lujjjh commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

New configurations are now created in ~/Library/Application Support/linearmouse/linearmouse.json, following the macOS convention for app data.

Existing configurations are not affected:

  • If ~/.config/linearmouse/linearmouse.json exists, LinearMouse keeps using it.
  • If both files exist, the one in Application Support is used, as before.

~/.config/linearmouse/linearmouse.json is now deprecated but still supported. The configuration documentation describes how to move to the new location.

Changes

  • When no configuration file exists, create it in Application Support instead of ~/.config.
  • Mark the ~/.config location as deprecated in the code and the documentation.
  • Log which configuration file is loaded, reloaded and saved.
  • Add tests for choosing the configuration path.

🤖 Generated with Claude Code

When no configuration file exists, create it in
~/Library/Application Support/linearmouse instead of ~/.config/linearmouse,
following the macOS convention for app data.

Existing configurations are unaffected: ~/.config/linearmouse/linearmouse.json
is still used when it exists, and Application Support still wins when
both exist. The ~/.config location is now documented as deprecated.

Also log which configuration file is loaded, reloaded and saved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lujjjh lujjjh added the enhancement New feature or request label Nov 15, 2026
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

LinearMouse now prioritizes the Application Support configuration path and retains the legacy path when it exists. Reload, load, and save use the selected path and log it after success. Documentation and tests describe and verify path selection.

Changes: Configuration Path Selection

Layer / File(s) Summary
Path priority and compatibility
LinearMouse/State/ConfigurationState.swift, LinearMouseUnitTests/State/ConfigurationPathTests.swift, Documentation/Configuration.md
The Application Support path takes priority. The legacy path remains supported when present. Tests cover selection when neither, either, or both paths exist. The documentation describes the paths and how to move the configuration file.
Configuration operations
LinearMouse/State/ConfigurationState.swift
Reload, load, and save capture the selected path. Each operation logs that path after success.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to 7f746

New installs now store their configuration in ~/Library/Application Support/linearmouse. Existing ~/.config configurations keep working, and the new location wins if both files exist. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: new installs store the configuration file in Application Support. The raw summary and PR objectives confirm that new configurations go to ~/Library/Application Suppor…
Description check Passed The description states that new configurations are created in Application Support, that existing ~/.config configurations keep working, and that the ~/.config location is deprecated. It also lists the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: new installs store the configuration file in Application Support. The raw summary and PR objectives confirm that new configurations go to ~/Library/Application Support/linearmouse/linearmouse.json, and that existing ~/.config files keep working. The title is specific and concise, and it does not describe anything outside the changeset.

Full details: Description check

Explanation

The description states that new configurations are created in Application Support, that existing ~/.config configurations keep working, and that the ~/.config location is deprecated. It also lists the code, documentation, logging, and test changes. This matches the changeset in the raw summary and the PR objectives.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a75a121 and 7f74688.

Files selected for processing: 3

  • Documentation/Configuration.md
  • LinearMouse/State/ConfigurationState.swift
  • LinearMouseUnitTests/State/ConfigurationPathTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@lujjjh
lujjjh merged commit 2357313 into main Nov 15, 2026
2 checks passed
@lujjjh
lujjjh deleted the default-config-in-application-support branch November 15, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant