scrod / nv

Notational Velocity: modeless, mouseless Mac OS X note-taking application
http://notational.net
GNU General Public License v3.0
2.07k stars 404 forks source link

Tag sync between NV and Simplenote #104

Open julianjdr opened 14 years ago

julianjdr commented 14 years ago

Since Simplenote app includes tagging, NV does not sync the tags we introduce in Simplenote, and Simplenote doesn't sync the tags we introduce in NV. It would be great if we could have tags synchronized in both applications.

scrod commented 14 years ago

Unfortunately I can't begin work on this feature until the Simplenote developers release the details of their newer syncing API.

andrewheiss commented 14 years ago

Any updates on the new API? This would be a fantastic feature once implemented…

2nd-metaman commented 13 years ago

Just want to add my vote to this issue.

Syncing of tags between NV and Simplenote would be truely useful.

On the other hand, until this is implemented, I will not start using tags in NV or Simplenote anyway, because it is just pointless :)

Jason4V commented 13 years ago

+1 to this issue. WE NEED IT!

scrod commented 13 years ago

Notational Velocity is an open source project — not a sole proprietorship. So if you want development in a particular area to move faster, then this site has everything you need to start hacking in features/fixes/changes all on your own; I'm not hiding any kind of vital source code or project info, nor do I need to be any kind of gate-keeper. The best way to make a feature happen is to implement it yourself and submit the changes.

Jason4V commented 13 years ago

Calm down dude, we don't force anyone to do anything. This feature is just so useful for our daily life and work (only if he uses the simplenote.app everyday)

scrod commented 13 years ago

My goal is for people to participate in the development process as much as possible, and all these one-way requests could give others the impression that I'm somehow holding NV hostage. So it's important to make the dynamics here as clear as possible, especially for others reading the thread. In general, if people want to see progress they need to help out, whether it be in the form of visual mock-ups, detailed specifications of a particular program behavior they'd like, or just source code.

Jason4V commented 13 years ago

Personally, I totally agree w/ you and applause your great work. Your goal is nothing wrong but great! Another goal, I thought for those who are not developers, is to make a great software that make people's life easier, which is also important. Shall we?:)_

anatomatic commented 13 years ago

Is anyone working on this? I know that Simperium has released the SimpleNote API (to those who ask nicely). I'm not a coder, but am willing to provide support in mock-ups, specifications, etc. to whomever wishes to take tag-sync on.

Personally, I like the idea of "in-line" tagging for more seamless writing. i.e. writing #projectX in the note and NV recognizes and adds the tag "projectX."

scrod commented 13 years ago

anatomatic: inline tagging is an attractive idea — what do you propose to do about those who don't want to see their tags in two different places when using Simplenote?

But I'd be interested in seeing simple layouts for both this and any other unconventional tagging models you might have in mind.

anatomatic commented 13 years ago

scrod: Don't mean to leave you hanging. Working on it, will have something for you soon.

anatomatic commented 13 years ago

I've thought tagging through more thoroughly and it boils down to two issues: tag sync and tag management.

Tag sync is straight-forward. It's a duplicated effort to tag something in NV then again in SN or vice-versa. You should only need to tag once (and I'd prefer to do it in NV).

While waiting for sync I've been foregoing both NV's and SN's tag-features and using a plain-text, inline tagging system. This begs the question, why have a tag feature at all? I came up with three reasons:

While a plain-text, inline tagging system (such as outlined by brief) is attractive, it doesn't accomplish any of the reasons to have a tagging feature in the first place. It's also already a feature!

Furthermore, as it stands now, invoking the tag field via a command isn't all that different from an inline keystroke, especially since there's a quick way to return to where you were typing, a quick tab.

So, to sum up, I've contradicted half of my original request. Syncing would remove the necessity of a hacked-together inline tagging system and/or the duplicated-effort of tagging in two programs. Inline-tagging already exists and I find it lacking.

I'll add my thoughts on tag management over at Issue 6. In the meantime I'm interested to hear if anyone thinks differently on this. And I'd be curious to know if Tag Sync & Tag Management need to be developed hand-in-hand.

elmimmo commented 13 years ago

+1 Vote for Simplenote tag syncing! (^_^)

rsebbe commented 13 years ago

+1 SN / NV tag syncing.

adec commented 13 years ago

Here's another +1 from me. I've also asked the Simperium folks to see the details of the Simplenote API and will take a look at the NV source to see if I can help move things on. I don't want to get people too excited though - I suspect it may take me some time. It's more years than I care to remember since I last did any serious development. However, this may be just the little project that I need to get me going with Objective-C. =8-)

scrod commented 13 years ago

adec, I can send you the documents if you give me your email address, as well as some pointers for where to start and what needs to be done.

fletom commented 13 years ago

Would really like to see this done!

adec commented 13 years ago

Hi Nomulous,

I'm still planning on doing this. Unfortunately things have been temporarily delayed as I've moved jobs in the last few weeks but hopefully things will start to settle down soon.

Regards,

Adrian.

On 12 Apr 2011, at 23:14, nomulous wrote:

Would really like to see this done!

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_992448

scrod commented 13 years ago

Adrian, Just let me know when you're about to start, as I may have already gotten to it by then, and I don't want you to do any unnecessary work. I'll of course let you know if/when this is the case.

darrylhthomas commented 13 years ago

Not to steal this out from under adec, but I wouldn't mind working on this feature, and I could start pretty much right away. I'll send you my email, scrod, and if you don't mind sending me the applicable docs, that'd be great. If you prefer to wait for adec, that's cool too. D

adec commented 13 years ago

Hi Daryl,

Hey, if you've got time, go for it! I'm not precious about it, honest.

My availability is improving but it'll still be 2 weeks before I could work seriously on it.

Let me know how you get on though. If you hit any barriers I'll be happy to help out.

Regards,

Ade.

On 28 Apr 2011, at 05:03, darrylhthomasreply@reply.github.com wrote:

Not to steal this out from under adec, but I wouldn't mind working on this feature, and I could start pretty much right away. I'll send you my email, scrod, and if you don't mind sending me the applicable docs, that'd be great. If you prefer to wait for adec, that's cool too. D

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1068100

darrylhthomas commented 13 years ago

Right on. I've sent a message to scrod, so I'm waiting to hear back from him. I'll let you know how things work out. Biggest issue I face to start with is just getting a build environment that'll work, as everything else I do is Xcode4 w/ 10.6sdk. I'm sure I can dig up some older SDKs somewhere.

Thanks, D

darrylhthomas commented 13 years ago

Just to update: scrod contacted me w/ the same info he gave to adec. I'll start pouring over the docs tomorrow and will create a branch on my fork to start working on this.

As scrod has noted, this essentially entails a complete update to simplenote's v2 api. I haven't researched enough to see whether we'll need to support a migration path, etc. If I run into any design questions, I'll post them to this issue.

In the meantime, I've got 3.2.6 and the required SDKs installed, and I've confirmed that nv is building cleanly for me, so I should be good-to-go.

Thanks, D

adec commented 13 years ago

From my investigations the v1 & v2 APIs can be used interchangeably, so migration isn't an issue.

However, there is a fair chunk of reengineering required around note saving as the v2 api supports merging. So when you upload a note, simplenote may return you a different (updated) version with your changes merged in if it had been updated elsewhere too.

As it sounds like you're a seasoned Objective C developer you're like to get to something robust in a shorter timescale than me. ;-)

Good luck and give me a shout if I can assist in any way.

On 28 Apr 2011, at 08:32, darrylhthomasreply@reply.github.com wrote:

Just to update: scrod contacted me w/ the same info he gave to adec. I'll start pouring over the docs tomorrow and will create a branch on my fork to start working on this.

As scrod has noted, this essentially entails a complete update to simplenote's v2 api. I haven't researched enough to see whether we'll need to support a migration path, etc. If I run into any design questions, I'll post them to this issue.

In the meantime, I've got 3.2.6 and the required SDKs installed, and I've confirmed that nv is building cleanly for me, so I should be good-to-go.

Thanks, D

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1068633

darrylhthomas commented 13 years ago

To clarify my statement regarding migration: Yes, it's true that the two apis can co-exist, but without a migration path, the initial sync using api2 could be problematic.

I'd like to hear others' feedback, but it seems to me that once api2 is introduced, we might want to be able to do one final sync using v1 to make sure we're 'clean', because prior to that, we won't have version/syncnum numbers to work with. This would mean that any updates we send would overwrite what is on the server, as opposed to merging changes made by other clients. (Perhaps I shouldn't be so concerned about this, since the end result of my alternative approach below would essentially mimic the behavior of api1.)

An alternative approach would be compare remote entries using the version and syncnum whenever these values exist in the local syncservice metadata but fall back to the modify timestamp when these values are absent. (This should happen exactly once, upon initial sync with api2.) This approach does have the aforementioned drawback of potentially obliterating changes made by other clients (as we can't sync using the modify stamp via api2 - the value still exists, but it's solely for sorting now).

Lastly, a slight variation of the previous approach would be to drop all of the api1 stuff except for the ability to push modifications through api1. This could be fairly straight forward, wouldn't result in having to maintain two entirely separate api handlers and would provide a light-weight migration path; the basic idea being that when we encounter a local note that lacks version/syncnum metadata but does not lack modify metadata, we fall back to the api1 update and send a request for the note using api2 upon completion of the update. I'm thinking this might be the best way to go.

Thoughts? D

darrylhthomas commented 13 years ago

The more I think about it, the more convinced I become that the last approach I mentioned is the way to go. In the interest of time, I'm going to start working on this using that approach, but I'm still open to feedback and can change things up if you feel I've missed something or would prefer an alternate approach.

darrylhthomas commented 13 years ago

One issue regarding the approach I'm taking is the preservation of tags(labels) that already exist in a local note after initial sync. Normally, we would be able to look at the syncnum to see whether the tag array we get back from the api should override the local tags, but in the initial sync, local tags could be lost if they don't also exist on the server.

Some hacky solutions come to mind immediately, but I want to put some thought into an elegant solution for this and would love to hear suggestions.

For now I'm just focusing on updating the api calls to v2, which is coming along just fine. SimplenoteEntryCollector is (I believe) complete. Once I've got all the api2 stuff working from a clean install, I'll turn my attention to migration.

darrylhthomas commented 13 years ago

Just landed commits for phase 1 (api2 syncing) to my fork. The actual tag support will go much more quickly. Should be able to land something tomorrow.

Right now, I'm not explicitly doing a migration, so there's a slim chance of obliterating another client's changes upon the very first sync w/ the new api.

I've tested out syncing with both my testing and personal simplenote accounts, but for such a significant overhaul, I'd like to get as many daring testers as possible, so I'd love to hear from volunteers. Once we've given it a good work-over, I'll submit a pull request.

adec commented 13 years ago

I'm happy to help test this out but at the moment my development environment isn't set up for it. Can you make a pre-compiled binary available for testing?

On 30 Apr 2011, at 08:58, darrylhthomasreply@reply.github.com wrote:

Just landed commits for phase 1 (api2 syncing) to my fork. The actual tag support will go much more quickly. Should be able to land something tomorrow.

Right now, I'm not explicitly doing a migration, so there's a slim chance of obliterating another client's changes upon the very first sync w/ the new api.

I've tested out syncing with both my testing and personal simplenote accounts, but for such a significant overhaul, I'd like to get as many daring testers as possible, so I'd love to hear from volunteers. Once we've given it a good work-over, I'll submit a pull request.

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1080142

darrylhthomas commented 13 years ago

Sure thing. You can grab it here: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+sn-api2-0c0af95.zip

It's built from the Development config.

darrylhthomas commented 13 years ago

Just sent a pull request that includes API2 support and basic tag syncing (Issue 221).

When a local note is sent to the server for the first time using api2, the tags will not be sent if the local tagset is empty. This prevents tags on the server from being obliterated. Likewise, when a note comes in from the server for the first time via api2, the tagsets get merged instead of having the server overwrite local, which is the normal behavior.

scrod commented 13 years ago

Thanks, Darryl! I really appreciate your time and effort on this matter — this ought to make the process go much faster. I will review your changes when I get a chance and check it for regressions and/or incompatible assumptions.

darrylhthomas commented 13 years ago

Right on. I'm sure it could use a pair of eyes other than mine. :)

I've been looking at the other open issues to see what else I could work on, but I think alot of it depends on the direction you're wanting to take things, so please just consider me as a resource for any other tasks you'd like tackled. I'd be particularly interested in Lion-related updates or things that build upon the new sync api, but I'm game for whatever.

Thanks, D

adec commented 13 years ago

Excellent. Any change you could post an updated binary.

I tried the older version which appeared to sync notes (but not tags) and appeared to remove all my tags from NV. I'll retest as I have my notes database in a non-standard location, so I'll put that back to normal first before running it again.

On 1 May 2011, at 03:07, darrylhthomas wrote:

Just sent a pull request that includes API2 support and basic tag syncing (Issue 221).

When a local note is sent to the server for the first time using api2, the tags will not be sent if the local tagset is empty. This prevents tags on the server from being obliterated. Likewise, when a note comes in from the server for the first time via api2, the tagsets get merged instead of having the server overwrite local, which is the normal behavior.

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1082249

darrylhthomas commented 13 years ago

Location shouldn't be a factor at all. The only thing I can conceive of is perhaps I uploaded a stale build, as I did at one point have code that did that, but not in anything I committed (to my knowledge). If that's the case, I apologize.

Just in case, I'll be taking the old build down.

Here's a new build (again, Development) of my most recent commit: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+simplenote-tags-0d89837be89b8de8eea5.zip

adec commented 13 years ago

Hehehe… No problem at all. I did save a copy of the notes database just in case. ;-)

Just tried the new version and it appears to work perfectly. I've tried the following:

I'll keep on testing over the next few days to make sure everything is stable and i'll report back if I spot anything.

Thanks again for doing this. It would have taken me far longer (even when I managed to find time to start).

Regards,

Adrian.

On 1 May 2011, at 23:56, darrylhthomas wrote:

Location shouldn't be a factor at all. The only thing I can conceive of is perhaps I uploaded a stale build, as I did at one point have code that did that, but not in anything I committed (to my knowledge). If that's the case, I apologize.

Just in case, I'll be taking the old build down.

Here's a new build (again, Development) of my most recent commit: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+simplenote-tags-0d89837be89b8de8eea5.zip

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1085964

adec commented 13 years ago

I forgot to mention one additional test that I tried…

I created a note with a tag which is an email address to see whether the Simplenote service would share the note. What do you know… it worked!

Now I'll be able to bombard my wife with notes created in NV. ;-)

On 1 May 2011, at 23:56, darrylhthomas wrote:

Location shouldn't be a factor at all. The only thing I can conceive of is perhaps I uploaded a stale build, as I did at one point have code that did that, but not in anything I committed (to my knowledge). If that's the case, I apologize.

Just in case, I'll be taking the old build down.

Here's a new build (again, Development) of my most recent commit: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+simplenote-tags-0d89837be89b8de8eea5.zip

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1085964

darrylhthomas commented 13 years ago

No problem. I wanted the feature pretty badly myself, and I was chomping at the bit for a diversion from my other projects.

D

On May 1, 2011, at 7:23 PM, adecreply@reply.github.com wrote:

Hehehe… No problem at all. I did save a copy of the notes database just in case. ;-)

Just tried the new version and it appears to work perfectly. I've tried the following:

  • Creating notes without tags on Simplenote website, sitenote clients on iPhone & iPad, and in NV.
  • Creating notes with tags on Simplenote website, sitenote clients on iPhone & iPad, and in NV.
  • Adding new tags to notes using each of the clients.
  • Removed tags from existing notes.

I'll keep on testing over the next few days to make sure everything is stable and i'll report back if I spot anything.

Thanks again for doing this. It would have taken me far longer (even when I managed to find time to start).

Regards,

Adrian.

On 1 May 2011, at 23:56, darrylhthomas wrote:

Location shouldn't be a factor at all. The only thing I can conceive of is perhaps I uploaded a stale build, as I did at one point have code that did that, but not in anything I committed (to my knowledge). If that's the case, I apologize.

Just in case, I'll be taking the old build down.

Here's a new build (again, Development) of my most recent commit: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+simplenote-tags-0d89837be89b8de8eea5.zip

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1085964

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1086004

anatomatic commented 13 years ago

Thanks Daryl (and Adec) for coding & testing this! It will be huge for my workflow.

I've done some testing too and can confirm Adec's testing. However, pre-existing tags in Notational Velocity (but not on Simplenote) haven't seemed to sync. All new tags/tag-deletes sync perfectly, with no lost notes.

A possible conflict/complication is that I use the latest NValt instead of Scrod's master NV. If you need more specifics from me, let me know.

Thanks again, Ian

darrylhthomas commented 13 years ago

Thanks for the report. One question: are you saying local tags were not sent to SN but remained in the local note, or were they removed from the local note?

Also if the former is the case, do you know whether adding a local tag to the note caused the other local tags to sync as well?

I'll do some testing of my own to try to confirm, but any additional info is appreciated. I'll let you guys know what I find.

--EDIT-- Ugh...just noticed that my iPhone had autocorrected from something to "boy" instead of to "not". Corrected.

On May 3, 2011, at 12:04 PM, anatomaticreply@reply.github.com wrote:

Thanks Daryl (and Adec) for coding & testing this! It will be huge for my workflow.

I've done some testing too and can confirm Adec's testing. However, pre-existing tags in Notational Velocity (but not on Simplenote) haven't seemed to sync. All new tags/tag-deletes sync perfectly, with no lost notes.

A possible conflict/complication is that I use the latest NValt instead of Scrod's master NV. If you need more specifics from me, let me know.

Thanks again, Ian

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1094636

anatomatic commented 13 years ago

Basically, thus-far I've done all my tagging in NValt and (almost) no tagging on Simplenote. The same tags are viewable locally regardless of NV version (master2, alt2, or b5master+simplenote).

When I opened up NV2.0b5+simplenote-tags (your link posted above, second build) my local tags did not sync to Simplenote. Any new tags I created, either on simplenote or in NV do sync.

When I add another local tag to a note, it synced both the original and the new local tag the first time. On subsequent notes, it didn't work. I had NV+simplenote-tag, Simplenote iPad, and Simplenote web open all at the same time, and theoretically continually syncing.

No tags were removed or lost.

I'm going to keep playing with it and see if I can get some more consistent behavior.

darrylhthomas commented 13 years ago

Ok. Thanks. This is useful info. As soon as I get a moment, I'll look into this bug.

On May 3, 2011, at 1:52 PM, anatomaticreply@reply.github.com wrote:

Basically, thus-far I've done all my tagging in NValt and (almost) no tagging on Simplenote. Whichever NV client you open the NV database with (latest NVmaster or NValt) same tags are there.

When I opened up NV2.0b5+simplenote-tags (your link posted above, second build) my local tags did not sync to Simplenote. Any new tags I created, either on simplenote or in NV do sync.

When I add another local tag to a note, it synced both the original and the new local tag the first time. On subsequent notes, it didn't work.

No tags were removed or lost.

I'm going to keep playing with it and see if I can get some more consistent behavior.

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1095355

anatomatic commented 13 years ago

Also, I can confirm that pre-existing tags from Simplenote (i.e. tagged on a simplenote client or webapp) did not sync to NV (local database). When that note is tagged in NV, the Simplenote tag is overwritten with a new tag.

Step-by-step:

  1. Note-in-question, tag: XYZ (Simplenote client)
  2. Note-in-question, (no tag in local NV database)
  3. Add tag "PRQ" to Note-in-Questions in local NVb5
  4. Note-in-question loses tag XYZ and gains tag PRQ everywhere.

The plot thickens. Seemed too easy, didn't it?

darrylhthomas commented 13 years ago

Just to provide a quick update:

Upon adding some debug logging, I've found that under certain circumstances, it's possible that a local note will not update itself with a syncnum provided by simplenote. This effectively prevents the local tags from ever being sent to simplenote. I've not had a chance to diagnose this yet, but I have my suspicions. I believe I also found an unrelated, non-critical tag bug as well.

I've closed my pull request, and will be removing the download I provided. I'll resubmit once I've addressed these issues. Shouldn't take long.

Thanks, D

darrylhthomas commented 13 years ago

Found and addressed the issues by adding an explicit migration path for notes that compare as being the same during sync. New pull request has been submitted. I've uploaded a new test build (again, Development), which can be found here: https://github.com/downloads/darrylhthomas/nv/nv-2.0b5+simplenote-tags-d2aee6f.zip

I tested migration from NValt to 2.0b5+simplenote-tags, and all went well.

darrylhthomas commented 13 years ago

@anatomatic @adec I was wondering whether you'd had a chance to try out my new build, and if so, whether you had any feedback.

anatomatic commented 13 years ago

Darryl,

Just got a chance to really sit down and poke around with your new version. Unfortunately still getting some wacky behavior. It took a few different launches, reverting to my original local database each time to figure out what's going on, but here's what I think is happening.

On launch of NVsn-t, all the tags from the SN server immediately sync to the local NV database (reflected in their "date modified" changing and getting pushed to the top, with the tags of course). Anything tagged locally doesn't get a "date modified" change, nor do the tags end up on the SN server (SN clients on iOS or web-app).

As with previous version, any new tags added (either to local NV or to SN client/web-app) sync across all perfectly.

Adding a new tag locally (NV) to a previously-tagged note syncs both the new-tag and the old-tag to the SN server.

Adding a new tag to a note on the server tagged locally (NV) but showing no tags on the server deletes the local tag and replaces it with the new tag from the server.

The date-modified shift is a bit of annoyance, since it re-orders notes somewhat randomly (if you sort by date-modified). However, I assume that there's nothing to be done about that, since SImplenote doesn't allow manual edits of date-modified (or date-created), so it probably can't be bypassed. I would far prefer notes with tags-in-sync than notes in proper date-modified order.

An additional note: since it's not possible to roll back my server-side database without getting in touch with the SN folks, I'm not sure how tangled my data is getting. Even though I roll back my local database with each test, the previous "sync" might still be in the database and corrupting the test. I'm willing to reach out to the SN folk for some more rigorous testing, for which I'd actually probably just create a test database and stop playing with my actual notes (backed up in multiple spots, so I'm not too worried, but it might make these issues a little clearer.)

Happy to keep testing and doing whatever else I can to help. Many thanks.

darrylhthomas commented 13 years ago

Anatomatic,

Thanks for the update. I appreciate the time you're putting into testing this.

I'll start with the low-hanging fruit: the modified dates. The SN api2 actually does allow for the mod date to be specified by clients, though there's no guarantee it will be honored (in the event of a 3rd-party modification, for example). In this case, however, I believe what you are experiencing is that the local modification date is being updated when tags from the server are applied to the local note. Strictly speaking, this is the correct thing to do, as the note is being modified, though I must admit I also spent some time debating with myself as to whether the behavior was desired regardless of whether it was correct.

I think I'll defer to Scrod on this one - I believe he should have the final say on what the behavior should be. If it is decided that tag merging should not result in a modification date change, then it will involve touching code that lives closer to the core, which is something I'd been trying to avoid. I don't mind doing it, but I was hoping to keep changes as superficial and isolated to the syncing mechanism as possible.

As for the tag syncing, I'm thinking I may need to put together a build for you that logs the various syncing decisions that take place, as I'm unable to reproduce what you are reporting. I just performed another set of tests on a completely different machine, using the current NValt as my starting client with a test set of notes that mix having local tags only, remote tags only, both local and remote tags and no tags at all. When I start up my fork's NV (I downloaded to this test machine from the download I posted to github), the initial sync updates the tags exactly as expected. I'm tempted to make a screencast just to prove I'm not crazy ;-).

I'm performing maintenance on my build machine at the moment, so I can't prepare a logging build for you yet, but hopefully I'll have something for you later in the day.

Lastly, I'm wondering how sensitive your notes file is. If you were able to send me one of the backup files you've been using, that might be very helpful. I'll understand if you'd prefer not to share it though.

Thanks, D

adec commented 13 years ago

Sorry I've not had chance to contribute to this round of testing yet. Hopefully I'll get chance tonight.

However, thinking about tags & modification times, my personal opinion is the behaviour for Simplenote tag syncing should be the same as for updating tags in NV directly. Ie. If I update a tag in NV and NV updates the modification time (and therefore changes the sort order), the same should happen for tag updates originating in Simplenote.

I'm not sure what the NV local behaviour is in this regard but I'll check later.

Regards,

Adrian.

On 5 May 2011, at 08:06, darrylhthomasreply@reply.github.com wrote:

Anatomatic,

Thanks for the update. I appreciate the time you're putting into testing this.

I'll start with the log-hanging fruit: the modified dates. The SN api2 actually does allow for the mod date to be specified by clients, though there's no guarantee it will be honored (in the event of a 3rd-party modification, for example). In this case, however, I believe what you are experiencing is that the local modification date is being updated when tags from the server are applied to the local note. Strictly speaking, this is the correct thing to do, as the note is being modified, though I must admit I also spent some time debating with myself as to whether the behavior was desired regardless of whether it was correct.

I think I'll defer to Scrod on this one - I believe he should have the final say on what the behavior should be. If it is decided that tag merging should not result in a modification date change, then it will involve touching code that lives closer to the core, which is something I'd been trying to avoid. I don't mind doing it, but I was hoping to keep changes as superficial and isolated to the syncing mechanism as possible.

As for the tag syncing, I'm thinking I may need to put together a build for you that logs the various syncing decisions that take place, as I'm unable to reproduce what you are reporting. I just performed another set of tests on a completely different machine, using the current NValt as my starting client with a test set of notes that mix having local tags only, remote tags only, both local and remote tags and no tags at all. When I start up my fork's NV (I downloaded to this test machine from the download I posted to github), the initial sync updates the tags exactly as expected. I'm tempted to make a screencast just to prove I'm not crazy ;-).

I'm performing maintenance on my build machine at the moment, so I can't prepare a logging build for you yet, but hopefully I'll have something for you later in the day.

Lastly, I'm wondering how sensitive your notes file is. If you were able to send me one of the backup files you've been using, that might be very helpful. I'll understand if you'd prefer not to share it though.

Thanks, D

Reply to this email directly or view it on GitHub: https://github.com/scrod/nv/issues/104#comment_1104112

darrylhthomas commented 13 years ago

No problem, adec.

The current behavior is the NV behavior, as I'm using the same mechanism to update the tags. I believe the question in this case, however, is whether the initial merging of local and remote tags (including the application of remote tags to notes that had no local tags) should count as an update. This is the current behavior, and getting it not to update the timestamp would involve working around the existing behavior.