feat: rich terminal context, editor enrichment, and multi-window fix#48
Open
kepptic wants to merge 4 commits intoActivityWatch:masterfrom
Open
feat: rich terminal context, editor enrichment, and multi-window fix#48kepptic wants to merge 4 commits intoActivityWatch:masterfrom
kepptic wants to merge 4 commits intoActivityWatch:masterfrom
Conversation
…ichment Track active terminal with working directory resolution via lsof fallback for terminals without shellIntegration (e.g., Claude Code sessions). Detect terminal switches using array index for terminals sharing the same name. New event fields: terminal_cwd, terminal_description, active_terminal_label, terminal_names, terminal_count, git_dirty_count, git_remote, is_debugging, debug_type, cursor_line, cursor_col, lines_in_file, relative_path, open_files, open_file_count, is_focused, workspace_folders. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Multiple VS Code windows share the same bucket. Unfocused windows were interleaving different project data, breaking pulse merge and causing 0-duration events. Now only the focused window heartbeats; unfocused windows get one final heartbeat on blur to close the event. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…yWatch#40 + multi-window fix - PR ActivityWatch#36: workspace name field (workspace.name) - PR ActivityWatch#39: editor identification (dynamic via env.appName — supports Cursor, Windsurf, and other VS Code forks) - PR ActivityWatch#40: untrusted workspace support (capabilities declaration) - Fix: only focused window sends heartbeats, preventing interleaved project data from breaking pulse merge in multi-window setups Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 5s periodic heartbeat timer so pulse merge builds proper event durations (previously only fired on change events, leaving 0s gaps) - Show project name + "(terminal)" for file field when terminal is focused instead of "unknown"; language shows "terminal" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Comprehensive enhancement to the VS Code watcher — adds terminal tracking, git enrichment, multi-window safety, and incorporates community PRs #36, #39, #40.
Terminal Context
shellIntegrationAPI withlsofPID-based fallback (for terminals like Claude Code that lack shell integration)terminal.processId(Thenable) to prevent hung heartbeatsEditor Enrichment
repositories[0])is_focused)Multi-Window Fix
Community PRs Merged
workspacefield from.code-workspacenameeditorfield, enhanced to use dynamicenv.appName(supports Cursor, Windsurf, and other VS Code forks)capabilities.untrustedWorkspaces.supported: true)New Heartbeat Fields
editorworkspaceactive_terminalactive_terminal_labelterminal_cwdterminal_descriptionterminal_names;separated)terminal_countgit_dirty_countgit_remoteis_debugging/debug_typecursor_line/cursor_collines_in_filerelative_pathopen_files/open_file_countis_focusedworkspace_foldersTest plan
editorfield dynamically detects Cursor/Windsurf/VS Codeworkspacefield populated from .code-workspace name