fix(config): use [server] in isolated profile roots - #170
Open
TimeToBuildBob wants to merge 2 commits into
Open
Conversation
[server-testing] in the same file as [server] is the pre-profile model. Isolated roots (activitywatch-testing/, activitywatch-research/, ...) already separate instances, so they get a single [server] section with the profile's default port, and settings.json without a suffix. Legacy shared-root testing still reads [server-testing] and settings-testing.json so existing installs are not orphaned. Refs: ActivityWatch/activitywatch#1434
Greptile SummaryThis PR changes isolated profile roots to use conventional, unsuffixed configuration resources while preserving the legacy shared-root testing layout.
Confidence Score: 4/5The PR is not yet safe to merge because isolated testing remains on the legacy configuration paths under the repository’s currently supported aw-core dependency. The new behavior relies on two aw-core directory helpers, but the dependency remains resolved to aw-core 0.5.18; the fallbacks then classify every testing profile as legacy and preserve the old section and filename. Files Needing Attention: aw_server/config.py, aw_server/settings.py, pyproject.toml, poetry.lock Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Resolve and export profile] --> B{Legacy shared testing root?}
B -- Yes --> C[Read server-testing section]
B -- Yes --> D[Read settings-testing.json]
B -- No --> E[Read server section]
B -- No --> F[Read settings.json]
Reviews (1): Last reviewed commit: "fix(config): use [server] in isolated pr..." | Re-trigger Greptile |
XDG_*_HOME only redirects platformdirs on Linux. The legacy-testing marker was planted under the XDG data path, so Windows/macOS never saw it and kept using [server] / settings.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
activitywatch#1434: Erik asked to check aw-server, which used
[server-testing]in the same file as prod. That is the pre-profile model. Isolated roots (activitywatch-testing/,activitywatch-research/, …) already separate instances, so a second section in the same file is the same class of bug as aw-qt readingconfig-<profile>.tomlwhile rust writesconfig.toml.What
[server]section with the profile's default port (5666 for testing, 5600 otherwise). The directory isolates;[server-testing]is not written there.config_section()returns[server]except in the legacy shared-root testing layout, where[server-testing]is kept so existing installs are not orphaned.settings.jsonis similarly bare in isolated roots;settings-testing.jsonremains legacy-only.Companion: ActivityWatch/aw-qt (tray/manager port lookup now reads isolated-root
config.toml/[server]).Tests
pytest tests/test_profile_config.py tests/test_profile.py: 41 passed.Refs: ActivityWatch/activitywatch#1434