Use distinct buckets for VS Code-compatible editors#50
Open
johnyoonh wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds runtime detection of VS Code-compatible editors so ActivityWatch heartbeats are written under distinct clientName/bucket IDs per editor, preventing activity streams from overlapping on the same machine.
Changes:
- Introduces
activityWatchClientName()based onvscode.env.appNameand uses it for bothAWClientand bucket naming. - Documents the per-editor client/bucket naming behavior in the README.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/extension.ts | Derives a per-editor ActivityWatch client name and applies it to bucket ID and AWClient initialization. |
| README.md | Documents distinct client/bucket names for known VS Code-compatible editors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Adds runtime detection for VS Code-compatible editors so their ActivityWatch heartbeats use distinct client and bucket names instead of all writing to
aw-watcher-vscode_<hostname>.Known mappings:
aw-watcher-vscodeaw-watcher-vscodiumaw-watcher-cursoraw-watcher-antigravityWhy
VS Code-compatible editors can run this extension, but when multiple compatible editors are installed on the same machine, their project/file activity currently shares the same bucket. That mixes separate editor activity streams and makes ActivityWatch timelines harder to interpret.
Default VS Code behavior is preserved via the fallback to
aw-watcher-vscode.Validation
npm run compilenpm run test:mocha(completed; current test target reports 0 tests)