Problem
aw-webui category queries currently run through canonicalEvents(...), which builds categorized activity from current-window + browser + stopwatch events.
Editor activity buckets (app.editor.activity) are queried separately via editorActivityQuery(...) and are only used for editor visualizations (top_files, top_languages, top_projects). They are not part of the categorization pipeline today.
That means requests like "match this category by editor project/workspace" cannot work yet, even if the UI grows a field selector, because the project data never reaches the events being categorized.
User-facing example: activity-watch-mode / Emacs reports project data, but a category rule cannot currently match on it. See ActivityWatch/aw-webui#619.
Current State
aw-webui/src/queries.ts::canonicalEvents(...) categorizes canonical window/browser/stopwatch events
aw-webui/src/queries.ts::editorActivityQuery(...) fetches editor buckets separately
- Editor bucket fields such as
project are therefore unavailable to normal category reports, timelines, and aggregates
Design Questions
- Should category queries consume editor buckets directly?
- Or should editor-derived fields be merged/projection-attached onto canonical window events before categorization?
- How should overlap/conflicts between window activity and editor activity be handled?
- Which editor fields should be treated as stable/canonical across watchers (
project, file, language, etc.)?
Acceptance Criteria
- A user can define a category rule that matches editor project/workspace data.
- The resulting category appears in normal category views/reports, not only editor-specific visualizations.
- The approach is documented clearly enough that watcher implementations know which fields they need to provide.
Related
Problem
aw-webuicategory queries currently run throughcanonicalEvents(...), which builds categorized activity from current-window + browser + stopwatch events.Editor activity buckets (
app.editor.activity) are queried separately viaeditorActivityQuery(...)and are only used for editor visualizations (top_files,top_languages,top_projects). They are not part of the categorization pipeline today.That means requests like "match this category by editor project/workspace" cannot work yet, even if the UI grows a field selector, because the
projectdata never reaches the events being categorized.User-facing example:
activity-watch-mode/ Emacs reports project data, but a category rule cannot currently match on it. See ActivityWatch/aw-webui#619.Current State
aw-webui/src/queries.ts::canonicalEvents(...)categorizes canonical window/browser/stopwatch eventsaw-webui/src/queries.ts::editorActivityQuery(...)fetches editor buckets separatelyprojectare therefore unavailable to normal category reports, timelines, and aggregatesDesign Questions
project,file,language, etc.)?Acceptance Criteria
Related