fix(config): read isolated-root config.toml instead of config-<profile>.toml - #132
Merged
ErikBjare merged 2 commits intoSep 8, 2026
Merged
Conversation
…e>.toml aw-server-rust writes bare config.toml under activitywatch-<profile>/. aw-qt still looked for config-<profile>.toml (and [server-<profile>]) in whatever dir AW_PROFILE currently pointed at, so a research instance never saw the rust server's port. Lookup now sets AW_PROFILE for the target profile, reads config.toml / [server] in the isolated root, and only uses the legacy suffixed names when testing still lives on the shared activitywatch/ root. Refs: ActivityWatch/activitywatch#1434
Contributor
Greptile SummaryThis revision fixes the previously reported legacy-root mismatch while retaining isolated-profile configuration precedence.
Confidence Score: 5/5The PR appears safe to merge; the legacy shared-root fallback is now restored without overriding isolated-profile configuration. The previous configuration-fallback finding is fully fixed: Rust server files, Python server sections, and aw-qt sections are now searched under the shared default root only after isolated configuration misses, with tests covering both fallback and precedence. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
P[Selected profile] --> I[Resolve isolated profile root]
I --> C{Bare isolated config has setting?}
C -->|Yes| U[Use isolated setting]
C -->|No, named profile| S[Read suffixed setting from shared root]
C -->|No, default/testing| D[Use normal fallback behavior]
S --> F{Legacy setting found?}
F -->|Yes| L[Use legacy setting]
F -->|No| D
Reviews (2): Last reviewed commit: "fix(config): look up pre-isolation profi..." | Re-trigger Greptile |
Isolated-root lookup set AW_PROFILE first, so the config-<profile>.toml / [server-<profile>] / [aw-qt-<profile>] fallbacks ran inside activitywatch-<profile>/ instead of the pre-isolation activitywatch/ root. Existing named profiles then lost their port and module list. Search the shared root for those suffixed files/sections after the isolated bare config misses.
Contributor
Author
|
@greptileai review |
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 baked
profile=researchand port 5667 into the research build, but noted a pre-existing lookup mismatch: aw-qt readsconfig-<profile>.tomlfor the rust server's port while aw-server-rust writes bareconfig.tomlin isolated profile roots (activitywatch-research/aw-server-rust/config.toml). The tray then misses the baked 5667 and falls back to 5600.Erik asked to fix that on #1434: aw-qt should use isolated roots too.
What
AW_PROFILEfor the target profile so aw-core dirs resolveactivitywatch-<profile>/.activitywatch-testing/) read bareconfig.tomland[server], matching aw-server-rust#652 / aw-core#152.config-testing.toml/[server-testing]stay legacy-only (testing data still on the sharedactivitywatch/root).config-<profile>.toml/[server-<profile>]remain a fallback so an old shared-root file is not silently ignored.aw-corebumped to^0.5.18forusing_legacy_testing_root.Companion: ActivityWatch/aw-server (same isolated-root
[server]change on the python server).Tests
pytest tests/test_profile_config.py tests/test_profile.py: 33 passed (XDG-isolated; covers bareconfig.toml,[server], suffixed fallback, and legacyconfig-testing.toml).Refs: ActivityWatch/activitywatch#1434