Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverted to old version of text after using Gitlab Comment "Preview" feature #13

Open
inducer opened this issue Nov 21, 2017 · 6 comments
Labels

Comments

@inducer
Copy link

inducer commented Nov 21, 2017

I just lost about an hour of work through an interaction of textern with gitlab, where (I believe) after using Gitlab's "preview" mode, I was reverted an old version of my (lengthy) input. I don't quite recall the steps, but it's scary that textern

  • needlessly deleted the temporaries containing the old text
  • contributed to this reversion in the first place
@inducer inducer changed the title Reverted to old version of text after using Gitlab "Preview" feature Reverted to old version of text after using Gitlab Comment "Preview" feature Nov 21, 2017
@jlebon
Copy link
Owner

jlebon commented Nov 21, 2017

Ouch, so sorry to hear that. :( I know how painful losing work is. Can you try to reproduce this and write down the steps? I couldn't get it to fail while playing around on Gitlab.

Re. deleting temporaries: all files are stored in a private tmpdir, which is deleted once the last editor instance is closed (in fact, Textern is not running at all if no editors are open). This ensures that tmp files don't accumulate on the host and more importantly that no potentially sensitive information is left on disk (see also #6).

I suppose we could define an alternative garbage collection policy, e.g. deleting on browser exit instead? Hmm, not sure. I'd like to flesh out the use case a bit more first.

@inducer
Copy link
Author

inducer commented Nov 21, 2017

Re. deleting temporaries: all files are stored in a private tmpdir, which is deleted once the last editor instance is closed (in fact, Textern is not running at all if no editors are open). This ensures that tmp files don't accumulate on the host and more importantly that no potentially sensitive information is left on disk (see also #6).

Understandable, though not my biggest concern on a single-user laptop.

@inducer
Copy link
Author

inducer commented Jan 19, 2018

Just happened again. This time without the use of the Preview feature. I think I saw the full text in the textarea briefly, but it looked like it disappeared as I clicked "submit".

@TheZoq2
Copy link

TheZoq2 commented Aug 16, 2019

For me, this seems completely reproducible using these steps:

  1. Create a new issue and enter a description
  2. Start editing using textern
  3. Don't type anything in the text area outside of textern
  4. Hit submit

This only the content of the textarea before starting extern is writen to the
issue. Step 3 is important, if you add a single character to the description,
everything is saved. To me it feels like the text area updates that textern is
doing aren't triggering some important event in gitlab. Therefore, a workaround
is to make a tiny modification to the text inside the browser before hitting
submit.

@jlebon
Copy link
Owner

jlebon commented Oct 15, 2019

OK yup, I can reproduce this issue as well now. For me, the description textarea of a new Gitlab issue works fine. The problem seems to be commenting on an open issue (and I imagine open MRs too). If you seed the textarea with some text before starting Textern, then entering Textern, adding text there, and exiting the editor, and clicking Submit without typing into the textarea, the submitted text ends up being the version prior to starting Textern.

Could implement some Gitlab specific hack for this, though I'd rather something a bit more generic. Hmm, will play around a bit with solutions.

@jlebon jlebon added the bug label Oct 15, 2019
@archenemies
Copy link

I've also experienced the same problem with text being reverted. It may have been gitlab, I can't remember.

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

No branches or pull requests

4 participants