Skip to content
This repository was archived by the owner on Jul 31, 2020. It is now read-only.

Rename a bookmark inside a folder problem #95

Closed
SergeyZhukovsky opened this issue Jun 2, 2017 · 1 comment · Fixed by #96
Closed

Rename a bookmark inside a folder problem #95

SergeyZhukovsky opened this issue Jun 2, 2017 · 1 comment · Fixed by #96
Assignees
Labels

Comments

@SergeyZhukovsky
Copy link
Member

That is related to that issue
https://github.com/brave/browser-android-tabs/issues/260
So I debugged and collected logs from Android device for that:
That's what I have on GET_EXISTING_OBJECTS:
[{"action":1,"deviceId":{"0":0},"objectId":{"0":16,"1":84,"2":219,"3":81,"4":33,"5":13,"6":44,"7":121,"8":211,"9":208,"10":1,"11":203,"12":114,"13":18,"14":215,"15":244},"bookmark":{"isFolder":false,"parentFolderObjectId":{"0":119,"1":148,"2":37,"3":242,"4":165,"5":20,"6":119,"7":15,"8":53,"9":57,"10":223,"11":116,"12":155,"13":99,"14":9,"15":128},"site":{"location":"https://www.bobsclamhut.com/","title":"Bob's Clam Hut","customTitle":"best seafood in Kittery","lastAccessedTime":0,"creationTime":0,"favicon":""}},"objectData":"bookmark","syncTimestamp":1496444669585}]

that's what I send back calling RESOLVE_SYNC_RECORDS:
[[{ action: 1, deviceId: [0], objectId: [16, 84, 219, 81, 33, 13, 44, 121, 211, 208, 1, 203, 114, 18, 215, 244], objectData: 'bookmark', bookmark:{ site:{ location: "https://www.bobsclamhut.com/", title: "Bob's Clam Hut", customTitle: "best seafood in Kittery", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: false, parentFolderObjectId: [119, 148, 37, 242, 165, 20, 119, 15, 53, 57, 223, 116, 155, 99, 9, 128]} }, { action: 1, deviceId: [12], objectId: [16, 84, 219, 81, 33, 13, 44, 121, 211, 208, 1, 203, 114, 18, 215, 244], objectData: 'bookmark', bookmark:{ site:{ location: "https://www.bobsclamhut.com/", title: "Bob's Clam Hut", customTitle: "", favicon: "", lastAccessedTime: 0, creationTime: 0}, isFolder: false, parentFolderObjectId: [119, 148, 37, 242, 165, 20, 119, 15, 53, 57, 223, 116, 155, 99, 9, 128]} }]]

that's what I have on RESOLVED_SYNC_RECORDS:
[{"action":1,"deviceId":[0],"objectId":[16,84,219,81,33,13,44,121,211,208,1,203,114,18,215,244],"objectData":"bookmark","bookmark":{"site":{"location":"https://www.bobsclamhut.com/","title":"Bob's Clam Hut","customTitle":"best seafood in Kittery","favicon":"","lastAccessedTime":0,"creationTime":0}}}]

As you see parentFolderObjectId gone somewhere and my bookmark on Android device moved from the folder on top, but on laptop it is inside the folder.

@diracdeltas
Copy link
Member

discussed on Slack. the problem was that all the browser sync implementers (myself included) assumed that RESOLVED_SYNC_RECORD would send the final records to-be-applied for history and bookmarks, not a shallow diff of the existing record and the new record (which is what it currently sends).

however, the shallow-diff is expected for siteSetting records on browser-laptop, so we are only going to change history/bookmarks for now to send full records instead of diffs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants