Skip to content

Add log directory configuration for macOS - #164

Merged
1lck merged 9 commits into
1lck:preview/0.3.0from
Wz58luck:preview/0.3.0
Aug 19, 2026
Merged

Add log directory configuration for macOS#164
1lck merged 9 commits into
1lck:preview/0.3.0from
Wz58luck:preview/0.3.0

Conversation

@Wz58luck

@Wz58luck Wz58luck commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a user-configurable log directory for the Lithe macOS app, allowing users to view, set, and restore the directory where logs are saved. The changes include updates to the settings model, UI enhancements in the settings view, new persistence logic, and comprehensive tests to ensure correct behavior. Additionally, a requirements specification document has been added to clarify the scope and acceptance criteria for this feature.

Log Directory Customization

  • Added a new customLogDirectory property to AppSettings, with logic to persist, restore, and reset the custom log directory. The effective log directory is now determined by this setting, defaulting to the standard user logs location if unset. (Sources/Lithe/Models/Settings/AppSettings.swift) [1] [2] [3] [4] [5]
  • Updated the settings UI to display both the default and current log directories, allow users to select a custom directory, restore the default, and copy directory paths. (Sources/Lithe/Views/App/SettingsView.swift) [1] [2] [3]

Testing and Documentation

  • Added a test to verify that the custom log directory persists across app launches and can be restored to default, ensuring robust behavior. (Tests/LitheTests/AppSettingsTests.swift)
  • Introduced a requirements specification document detailing the motivation, scope, UI/UX, and acceptance criteria for the macOS log directory configuration feature. (docs/superpowers/specs/2026-08-17-cross-platform-logging-requirements.md)

测试前后对比图
4de150b708d3c3afdec72d61e5c1ef88
image

Comment thread Sources/Lithe/Models/Settings/AppSettings.swift
Comment thread Sources/Lithe/Models/Settings/AppSettings.swift Outdated
@Wz58luck
Wz58luck requested a review from 1lck August 18, 2026 15:24
@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

基本没啥问题了

@1lck
1lck merged commit ada13ad into 1lck:preview/0.3.0 Aug 19, 2026
5 checks passed
@Wz58luck
Wz58luck deleted the preview/0.3.0 branch August 29, 2026 02:28
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.

3 participants