{"action":"created","comment":{"url":"https://api.github.com/repos/brave/browser-laptop/pulls/comments/78018164","id":78018164,"diff_hunk":"@@ -59,7 +59,14 @@ module.exports.saveAppState = (payload, isShutdown) => {\n         wndPayload.tabs = wndPayload.tabs.filter((tab) => !tab.isPrivate)\n       })\n     } else {\n-      delete payload.perWindowState\n+      // Reset the window state except for the ui data\n+      payload.perWindowState.forEach((wndPayload) => {","path":"app/sessionStore.js","position":6,"original_position":6,"commit_id":"172dfc9da07428123b106b1f2f4bf0e278ba9390","original_commit_id":"172dfc9da07428123b106b1f2f4bf0e278ba9390","user":{"login":"bbondy","id":831718,"avatar_url":"https://avatars.githubusercontent.com/u/831718?v=3","gravatar_id":"","url":"https://api.github.com/users/bbondy","html_url":"https://github.com/bbondy","followers_url":"https://api.github.com/users/bbondy/followers","following_url":"https://api.github.com/users/bbondy/following{/other_user}","gists_url":"https://api.github.com/users/bbondy/gists{/gist_id}","starred_url":"https://api.github.com/users/bbondy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbondy/subscriptions","organizations_url":"https://api.github.com/users/bbondy/orgs","repos_url":"https://api.github.com/users/bbondy/repos","events_url":"https://api.github.com/users/bbondy/events{/privacy}","received_events_url":"https://api.github.com/users/bbondy/received_events","type":"User","site_admin":false},"body":"specifically [] is not falsy so maybe the check in the block above is superfluous `if (payload.perWindowState && savePerWindowState) {` but it makes me wonder if it can be undefined and not empty sometimes. It could be an old check. ","created_at":"2016-09-08T14:34:34Z","updated_at":"2016-09-08T14:34:34Z","html_url":"https://github.com/brave/browser-laptop/pull/3786#discussion_r78018164","pull_request_url":"https://api.github.com/repos/brave/browser-laptop/pulls/3786","_links":{"self":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/comments/78018164"},"html":{"href":"https://github.com/brave/browser-laptop/pull/3786#discussion_r78018164"},"pull_request":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/3786"}}},"pull_request":{"url":"https://api.github.com/repos/brave/browser-laptop/pulls/3786","id":84241346,"html_url":"https://github.com/brave/browser-laptop/pull/3786","diff_url":"https://github.com/brave/browser-laptop/pull/3786.diff","patch_url":"https://github.com/brave/browser-laptop/pull/3786.patch","issue_url":"https://api.github.com/repos/brave/browser-laptop/issues/3786","number":3786,"state":"open","locked":false,"title":"Brave doesn't remember last position and size if homepage is set","user":{"login":"Sh1d0w","id":5074917,"avatar_url":"https://avatars.githubusercontent.com/u/5074917?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh1d0w","html_url":"https://github.com/Sh1d0w","followers_url":"https://api.github.com/users/Sh1d0w/followers","following_url":"https://api.github.com/users/Sh1d0w/following{/other_user}","gists_url":"https://api.github.com/users/Sh1d0w/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh1d0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh1d0w/subscriptions","organizations_url":"https://api.github.com/users/Sh1d0w/orgs","repos_url":"https://api.github.com/users/Sh1d0w/repos","events_url":"https://api.github.com/users/Sh1d0w/events{/privacy}","received_events_url":"https://api.github.com/users/Sh1d0w/received_events","type":"User","site_admin":false},"body":"- [x] Submitted a [ticket](https://github.com/brave/browser-laptop/issues) for my issue if one did not already exist.\r\n- [x] Used Github [auto-closing keywords](https://help.github.com/articles/closing-issues-via-commit-messages/) in the commit message.\r\n- [x] Added/updated tests for this change (for new code or code which already has tests).\r\n- [x] Ran `git rebase -i` to squash commits (if needed).\r\n\r\n\r\nBrave doesn't remember last position and size if you set it to start with homepage\r\n\r\nWhen closed Brave does not retain last window position and size as it should be when re-launched.\r\n\r\nThis happens only if in Settings -> General you set the value for Brave starts with to My homepage. If you select Session and tabs from last time it correctly remembers the position and the size of the window.\r\n\r\nFixes ##3754\r\n\r\nAuditors\r\n@bbondy\r\n\r\nTest Plan:\r\n1. In settings -> general set Brave starts with to My homepage\r\n2. Launch Brave, move the window around and close\r\n3. Re-launch Brave and compare the last window position","created_at":"2016-09-07T06:03:45Z","updated_at":"2016-09-08T14:34:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"688a8095a69ec5702ff25e81fb78605914566086","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/brave/browser-laptop/milestones/34","html_url":"https://github.com/brave/browser-laptop/milestones/0.12.1dev","labels_url":"https://api.github.com/repos/brave/browser-laptop/milestones/34/labels","id":1981234,"number":34,"title":"0.12.1dev","description":"","creator":{"login":"bbondy","id":831718,"avatar_url":"https://avatars.githubusercontent.com/u/831718?v=3","gravatar_id":"","url":"https://api.github.com/users/bbondy","html_url":"https://github.com/bbondy","followers_url":"https://api.github.com/users/bbondy/followers","following_url":"https://api.github.com/users/bbondy/following{/other_user}","gists_url":"https://api.github.com/users/bbondy/gists{/gist_id}","starred_url":"https://api.github.com/users/bbondy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbondy/subscriptions","organizations_url":"https://api.github.com/users/bbondy/orgs","repos_url":"https://api.github.com/users/bbondy/repos","events_url":"https://api.github.com/users/bbondy/events{/privacy}","received_events_url":"https://api.github.com/users/bbondy/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":14,"state":"open","created_at":"2016-09-03T03:23:36Z","updated_at":"2016-09-08T14:21:38Z","due_on":"2016-09-14T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/brave/browser-laptop/pulls/3786/commits","review_comments_url":"https://api.github.com/repos/brave/browser-laptop/pulls/3786/comments","review_comment_url":"https://api.github.com/repos/brave/browser-laptop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brave/browser-laptop/issues/3786/comments","statuses_url":"https://api.github.com/repos/brave/browser-laptop/statuses/172dfc9da07428123b106b1f2f4bf0e278ba9390","head":{"label":"Sh1d0w:hotfix/remember-last-window-position","ref":"hotfix/remember-last-window-position","sha":"172dfc9da07428123b106b1f2f4bf0e278ba9390","user":{"login":"Sh1d0w","id":5074917,"avatar_url":"https://avatars.githubusercontent.com/u/5074917?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh1d0w","html_url":"https://github.com/Sh1d0w","followers_url":"https://api.github.com/users/Sh1d0w/followers","following_url":"https://api.github.com/users/Sh1d0w/following{/other_user}","gists_url":"https://api.github.com/users/Sh1d0w/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh1d0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh1d0w/subscriptions","organizations_url":"https://api.github.com/users/Sh1d0w/orgs","repos_url":"https://api.github.com/users/Sh1d0w/repos","events_url":"https://api.github.com/users/Sh1d0w/events{/privacy}","received_events_url":"https://api.github.com/users/Sh1d0w/received_events","type":"User","site_admin":false},"repo":{"id":65408115,"name":"browser-laptop","full_name":"Sh1d0w/browser-laptop","owner":{"login":"Sh1d0w","id":5074917,"avatar_url":"https://avatars.githubusercontent.com/u/5074917?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh1d0w","html_url":"https://github.com/Sh1d0w","followers_url":"https://api.github.com/users/Sh1d0w/followers","following_url":"https://api.github.com/users/Sh1d0w/following{/other_user}","gists_url":"https://api.github.com/users/Sh1d0w/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh1d0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh1d0w/subscriptions","organizations_url":"https://api.github.com/users/Sh1d0w/orgs","repos_url":"https://api.github.com/users/Sh1d0w/repos","events_url":"https://api.github.com/users/Sh1d0w/events{/privacy}","received_events_url":"https://api.github.com/users/Sh1d0w/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sh1d0w/browser-laptop","description":"Brave browser for Desktop and Laptop computers running Windows, OSX, and Linux","fork":true,"url":"https://api.github.com/repos/Sh1d0w/browser-laptop","forks_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/forks","keys_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/teams","hooks_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/hooks","issue_events_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/issues/events{/number}","events_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/events","assignees_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/assignees{/user}","branches_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/branches{/branch}","tags_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/tags","blobs_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/statuses/{sha}","languages_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/languages","stargazers_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/stargazers","contributors_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/contributors","subscribers_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/subscribers","subscription_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/subscription","commits_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/contents/{+path}","compare_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/merges","archive_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/downloads","issues_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/issues{/number}","pulls_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/pulls{/number}","milestones_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/milestones{/number}","notifications_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/labels{/name}","releases_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/releases{/id}","deployments_url":"https://api.github.com/repos/Sh1d0w/browser-laptop/deployments","created_at":"2016-08-10T18:49:17Z","updated_at":"2016-08-10T18:49:21Z","pushed_at":"2016-09-07T06:02:29Z","git_url":"git://github.com/Sh1d0w/browser-laptop.git","ssh_url":"git@github.com:Sh1d0w/browser-laptop.git","clone_url":"https://github.com/Sh1d0w/browser-laptop.git","svn_url":"https://github.com/Sh1d0w/browser-laptop","homepage":"https://www.brave.com","size":27079,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brave:master","ref":"master","sha":"90d4f7993739be7c6fbfb8564532c10c848a272d","user":{"login":"brave","id":12301619,"avatar_url":"https://avatars.githubusercontent.com/u/12301619?v=3","gravatar_id":"","url":"https://api.github.com/users/brave","html_url":"https://github.com/brave","followers_url":"https://api.github.com/users/brave/followers","following_url":"https://api.github.com/users/brave/following{/other_user}","gists_url":"https://api.github.com/users/brave/gists{/gist_id}","starred_url":"https://api.github.com/users/brave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brave/subscriptions","organizations_url":"https://api.github.com/users/brave/orgs","repos_url":"https://api.github.com/users/brave/repos","events_url":"https://api.github.com/users/brave/events{/privacy}","received_events_url":"https://api.github.com/users/brave/received_events","type":"Organization","site_admin":false},"repo":{"id":46891997,"name":"browser-laptop","full_name":"brave/browser-laptop","owner":{"login":"brave","id":12301619,"avatar_url":"https://avatars.githubusercontent.com/u/12301619?v=3","gravatar_id":"","url":"https://api.github.com/users/brave","html_url":"https://github.com/brave","followers_url":"https://api.github.com/users/brave/followers","following_url":"https://api.github.com/users/brave/following{/other_user}","gists_url":"https://api.github.com/users/brave/gists{/gist_id}","starred_url":"https://api.github.com/users/brave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brave/subscriptions","organizations_url":"https://api.github.com/users/brave/orgs","repos_url":"https://api.github.com/users/brave/repos","events_url":"https://api.github.com/users/brave/events{/privacy}","received_events_url":"https://api.github.com/users/brave/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brave/browser-laptop","description":"Brave browser for Desktop and Laptop computers running Windows, OSX, and Linux","fork":false,"url":"https://api.github.com/repos/brave/browser-laptop","forks_url":"https://api.github.com/repos/brave/browser-laptop/forks","keys_url":"https://api.github.com/repos/brave/browser-laptop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brave/browser-laptop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brave/browser-laptop/teams","hooks_url":"https://api.github.com/repos/brave/browser-laptop/hooks","issue_events_url":"https://api.github.com/repos/brave/browser-laptop/issues/events{/number}","events_url":"https://api.github.com/repos/brave/browser-laptop/events","assignees_url":"https://api.github.com/repos/brave/browser-laptop/assignees{/user}","branches_url":"https://api.github.com/repos/brave/browser-laptop/branches{/branch}","tags_url":"https://api.github.com/repos/brave/browser-laptop/tags","blobs_url":"https://api.github.com/repos/brave/browser-laptop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brave/browser-laptop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brave/browser-laptop/git/refs{/sha}","trees_url":"https://api.github.com/repos/brave/browser-laptop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brave/browser-laptop/statuses/{sha}","languages_url":"https://api.github.com/repos/brave/browser-laptop/languages","stargazers_url":"https://api.github.com/repos/brave/browser-laptop/stargazers","contributors_url":"https://api.github.com/repos/brave/browser-laptop/contributors","subscribers_url":"https://api.github.com/repos/brave/browser-laptop/subscribers","subscription_url":"https://api.github.com/repos/brave/browser-laptop/subscription","commits_url":"https://api.github.com/repos/brave/browser-laptop/commits{/sha}","git_commits_url":"https://api.github.com/repos/brave/browser-laptop/git/commits{/sha}","comments_url":"https://api.github.com/repos/brave/browser-laptop/comments{/number}","issue_comment_url":"https://api.github.com/repos/brave/browser-laptop/issues/comments{/number}","contents_url":"https://api.github.com/repos/brave/browser-laptop/contents/{+path}","compare_url":"https://api.github.com/repos/brave/browser-laptop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brave/browser-laptop/merges","archive_url":"https://api.github.com/repos/brave/browser-laptop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brave/browser-laptop/downloads","issues_url":"https://api.github.com/repos/brave/browser-laptop/issues{/number}","pulls_url":"https://api.github.com/repos/brave/browser-laptop/pulls{/number}","milestones_url":"https://api.github.com/repos/brave/browser-laptop/milestones{/number}","notifications_url":"https://api.github.com/repos/brave/browser-laptop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brave/browser-laptop/labels{/name}","releases_url":"https://api.github.com/repos/brave/browser-laptop/releases{/id}","deployments_url":"https://api.github.com/repos/brave/browser-laptop/deployments","created_at":"2015-11-25T22:55:10Z","updated_at":"2016-09-08T14:15:21Z","pushed_at":"2016-09-08T13:49:13Z","git_url":"git://github.com/brave/browser-laptop.git","ssh_url":"git@github.com:brave/browser-laptop.git","clone_url":"https://github.com/brave/browser-laptop.git","svn_url":"https://github.com/brave/browser-laptop","homepage":"https://www.brave.com","size":30720,"stargazers_count":3363,"watchers_count":3363,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":385,"mirror_url":null,"open_issues_count":1080,"forks":385,"open_issues":1080,"watchers":3363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/3786"},"html":{"href":"https://github.com/brave/browser-laptop/pull/3786"},"issue":{"href":"https://api.github.com/repos/brave/browser-laptop/issues/3786"},"comments":{"href":"https://api.github.com/repos/brave/browser-laptop/issues/3786/comments"},"review_comments":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/3786/comments"},"review_comment":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brave/browser-laptop/pulls/3786/commits"},"statuses":{"href":"https://api.github.com/repos/brave/browser-laptop/statuses/172dfc9da07428123b106b1f2f4bf0e278ba9390"}}}}
{"actor":{"display_login":"bbondy"}}