Automattic / Automattic/simplenote-electron

[History] Renamed tag restoration adds a tag which is not synced to iOS.

Open
#2,942 0 comments 0 reactions 0 assignees View on GitHub
[feature] history [feature] sync [feature] tags bug
Dominant language
TypeScript
Stars
5.3k
Forks
588
Avg merge
9h 45m
Merged PRs (30d)
4

Description

I'm not completely sure if this is an iOS or Electron bug.

### Expected
All usual tags should be in sync between all platforms. I guess there's more than one option to approach this exact problem, like:
1. If the tag was renamed, reverting in history to its original name should rename the tag back, not create a new one with the previous name.
2. Or, if we keep the current way, the sync should happen correctly between platforms.

### Observed
If the tag was created for a note, then renamed, and then the user reverts to the initial revision (with original tag name) (using 'Restore deleted tags'), there will be another tag added and assigned to the note (original name), while the old will be detached from note. Up to this point all sounds good, but when the user has also an iPhone app, the new 'old' tag will not be present in the tags list there.

### Reproduced
0. Make sure you have no tags
1. iOS: create a new note and add a new tag, let's call it `One`
2. iOS: add some more text to the note, rename the tag to `Two`
3. Electron: open note history, slide back to the state when `One` tag appears and has a red background. Check the 'Restore deleted tags' and click `Restore`

On Electron: the 'Two' tag is removed form note but still exists, tag `One` is created in tags list and is attached to the note. This sounds reasonable.

On iOS: tag `One` is listed inside the note, but it's not in the tags list. See video (during the time when nothing happens on screen, seconds 20-28, , I'm reverting the history on Electron):

https://user-images.githubusercontent.com/73365754/123809344-33f43c80-d8fa-11eb-94f6-46f7f743b492.MP4

### Where did you see the bug

- OS version for Electron: desktop 2.14.0-beta1 on Windows 10 Home | Parallels on MBP 16"
- OS version for iOS: 4.29.0.0 on iPhone XR | iOS 14.6

Contributor guide

Open the contributing guide

Research direction

Reproduce the history restoration flow using the Electron “Restore deleted tags” action and an iOS note with a renamed tag. Compare the restored tag’s presence in the Electron and iOS tag lists, then trace the history-restore and cross-platform sync entry points. Done means restoring the original tag name leaves the tag consistently available and synced on both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, ios, typescript
Domain
desktop-dev, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.