diff --git a/services/web/public/src/ide/editor/Document.js b/services/web/public/src/ide/editor/Document.js index 1387e274ef..789cc5c9a4 100644 --- a/services/web/public/src/ide/editor/Document.js +++ b/services/web/public/src/ide/editor/Document.js @@ -395,7 +395,8 @@ define([ doc_id: this.doc_id, remote_doc_id: update != null ? update.doc : undefined, wantToBeJoined: this.wantToBeJoined, - update + update, + hasDoc: (this.doc != null) }) if ( @@ -420,6 +421,9 @@ define([ (update != null ? update.doc : undefined) === this.doc_id && this.doc != null ) { + this.ide.pushEvent('received-update:processing', { + update + }) this.doc.processUpdateFromServer(update) if (!this.wantToBeJoined) { @@ -476,6 +480,10 @@ define([ callback = function(error) {} } if (this.doc != null) { + this.ide.pushEvent('joinDoc:existing', { + doc_id: this.doc_id, + version: this.doc.getVersion() + }) return this.ide.socket.emit( 'joinDoc', this.doc_id, @@ -496,6 +504,9 @@ define([ } ) } else { + this.ide.pushEvent('joinDoc:new', { + doc_id: this.doc_id + }) return this.ide.socket.emit( 'joinDoc', this.doc_id, @@ -505,6 +516,10 @@ define([ return callback(error) } this.joined = true + this.ide.pushEvent('joinDoc:inited', { + doc_id: this.doc_id, + version + }) this.doc = new ShareJsDoc( this.doc_id, docLines, diff --git a/services/web/public/src/ide/services/ide.js b/services/web/public/src/ide/services/ide.js index bf66d1940b..adc9379cd0 100644 --- a/services/web/public/src/ide/services/ide.js +++ b/services/web/public/src/ide/services/ide.js @@ -37,7 +37,7 @@ define(['base'], function(App) { meta = {} } this.recentEvents.push({ type, meta, date: new Date() }) - if (this.recentEvents.length > 40) { + if (this.recentEvents.length > 100) { return this.recentEvents.shift() } }