z#15
Conversation
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied ☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts how LocalMode background jobs determine whether “JSA Activity Mode” should be available, and wires up the related job in DI. It also updates the tracked portable ZIP split artifacts (Git LFS pointers).
Changes:
- Update
LocalBackgroundServiceto enable JSA Activity Mode based on the JSON storage data directory path (instead of the hardcodedData/path). - Register
JsaActivityModeJobwith the DI container. - Update Git LFS pointer metadata for portable ZIP split files.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Services/LocalBackgroundService.cs | Changes how JSA Activity Mode visibility is determined (now based on storage backend data directory). |
| Program.cs | Registers JsaActivityModeJob in DI so the background service can resolve it. |
| Portable/JobTracker-x86.zip.001 | Updates Git LFS pointer (portable artifact). |
| Portable/JobTracker-x86.zip.002 | Updates Git LFS pointer (portable artifact). |
| Portable/JobTracker-x64.zip.001 | Updates Git LFS pointer (portable artifact). |
| Portable/JobTracker-x64.zip.002 | Updates Git LFS pointer (portable artifact). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| _configPath = Path.Combine(env.ContentRootPath, "Data", "background-jobs.json"); | ||
|
|
||
| // JSA Activity Mode is only available when the data directory contains "passp" | ||
| _jsaActivityEnabled = _configPath.Contains("passp", StringComparison.OrdinalIgnoreCase); | ||
| // JSA Activity Mode is only available when the user data directory path contains "passp" | ||
| var dataDir = storageBackend is JsonStorageBackend jsonBackend | ||
| ? jsonBackend.GetDataDirectory() | ||
| : env.ContentRootPath; | ||
| _jsaActivityEnabled = dataDir.Contains("passp", StringComparison.OrdinalIgnoreCase); |
There was a problem hiding this comment.
_configPath is still hardcoded to env.ContentRootPath/Data/background-jobs.json, but the app supports a custom data directory via data-directory.config (used when constructing JsonStorageBackend). When a custom data dir is configured, the background job config will be read/written in the wrong folder and won’t be included in JSON backups. Consider deriving _configPath from the JSON backend data directory (e.g., jsonBackend.GetDataDirectory()) when available, and only fall back to env.ContentRootPath when not using JSON storage.
fix