Open elsylambert opened 1 year ago
@birchamp Instead of the login dialog box, there should be the modal warning that the "Save action would clobber the file on the server, do you want to keep or discard the server changes?" like how we had it when autosave feature was enabled.
Hi @birchamp , bincy, @elsylambert !! ππ π
LONG TIME NO SEE! :) Is this bug report still open? May I look at it as an outside contributor?
I have identified the chain of how the exception propagates & is handled...
But there are a few possible ways to handle the file conflict & would be good to discuss :)
Plus would love to catch up!! :)
tcc saveTranslation()
results from gitea-react-toolkit / parseError()
targetFileHook from gitea-react-toolkit / useFile()
useFile hook / actions.save --> saveFile() and saveCache()
saveFile():
updateContent()
Suggestion:
.
Steps:
Make some edits in TN and save in tCC
then go to DCS and make a change to my branch on the same file
Go back to TCC and make some new edits and try to save a new change.
tCC throws error like this:![image.png](https://images.zenhubusercontent.com/5d02efb2f425650e637abe10/8c596f5d-8109-4cee-bcbe-6efd2bf9e10a)
After login back, the changes on the server are not seen but everytime user makes an edit the error message pops up, but the edits are not reflected or saved in the branch.
Notes from Rich: Under the hood, in the network response, I can see:
{"message":"sha does not match [given: dfb6a4bd57849cf8b06979bf35316cafd4d1a8af, expected: 90dd1e6d363343a06e5183350f36fe1a44a53340]","url":"https://git.door43.org/api/swagger%22%7D
I worked with a content editor previously where I was the one who changed the file on the server. Yet then they kept logging in again, with their changes still there, but still wouldn't save. Apparently tCC still wasn't getting the new SHA. I'll ask him what is happening this time, but does it really let you clobber once you log in again? Before it wasn't. The previous time, when I had made a commit, I had to undo my commit, then it worked. Maybe I can undo his last save if his system is still using the previous save's file SHA. Will try that. But doesn't seem to be updating the SHA in tCC. I think this error message used to give us the two SHAs that don't compare, but was too technical so now doesn't show it. Wonder if still a way for them to easily get it without doing all the dev stuff in their browser.