code: function removeOpenWindowState(tabWindow) {
    var savedItems = tabWindow.tabItems.filter(function (ti) {
      return ti.saved;
    });
    var resetSavedItems = savedItems.map(resetSavedItem);
  
    return tabWindow.remove('open').remove('openWindowId').remove('focused').set('tabItems', resetSavedItems);
  }
docs: reset a window to its base saved state (after window is closed)