@@ -63,6 +63,9 @@ const _state = {
6363 active : {
6464 available : false ,
6565 duration : 0 ,
66+ // non-afk events (no detail data) for the current period
67+ events : [ ] ,
68+ // Aggregated events for current and past periods
6669 history : { } ,
6770 } ,
6871
@@ -178,15 +181,16 @@ const actions = {
178181 app_events : [ ] ,
179182 title_events : [ ] ,
180183 cat_events : [ ] ,
184+ active_events : [ ] ,
181185 duration : 0 ,
182186 } ;
183187 commit ( 'query_window_completed' , data ) ;
184188 } ,
185189
186190 async query_desktop_full (
187191 { state, commit } ,
188- { timeperiod, filterCategories, filterAFK } : QueryOptions )
189- {
192+ { timeperiod, filterCategories, filterAFK } : QueryOptions
193+ ) {
190194 const periods = [ timeperiodToStr ( timeperiod ) ] ;
191195 const classes = loadClassesForQuery ( ) ;
192196 const q = queries . fullDesktopQuery (
@@ -411,6 +415,9 @@ const actions = {
411415 app_events,
412416 title_events,
413417 cat_events,
418+ active_events : [
419+ { timestamp : new Date ( ) . toISOString ( ) , duration : 1.5 * 60 * 60 , data : { afk : 'not-afk' } } ,
420+ ] ,
414421 } ) ;
415422
416423 commit ( 'browser_buckets' , [ 'aw-watcher-firefox' ] ) ;
@@ -493,6 +500,7 @@ const mutations = {
493500 state . window . top_titles = data [ 'title_events' ] ;
494501 state . category . top = data [ 'cat_events' ] ;
495502 state . active . duration = data [ 'duration' ] ;
503+ state . active . events = data [ 'active_events' ] ;
496504 } ,
497505
498506 query_browser_completed ( state , data ) {
0 commit comments