Collab-server keeps phantom state of renamed files

Aperta
#174 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start in the collab-server code that handles File Explorer renames and manages Y.Doc instances, then reproduce the a.txt → b.txt → a.txt sequence described in the issue. Done means reopening a.txt retains Version 3 rather than overwriting it with Version 2, while Ctrl-Z no longer restores the lost content.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

To replicate:

  • Open an new file a.txt in a fresh project. Make edits to it and save them. (This is Version 1 of the document)
  • Edit the document and do not save those changes (this is Version 2 of the document)
  • Rename the file to b.txt using the File Explorer. Due to the fix in #160, the b.txt document will correctly contain Version 2 of the document
  • Make further edits to b.txt. This is Version 3 of the document. You can save these, or not.
  • Rename b.txt back to a.txt using the file explorer.

Expected: the a.txt buffer contains Version 3 of the document
Actual: the a.txt buffer contains Version 2 of the document. Pressing Ctrl-Z restores Version 3 of the document.

Reason: the collab server kept around a phantom Y.Doc for a.txt, and when a buffer for a.txt was opened, the collab server overwrote the document with its document.

Replaces #146 — this is the part of #146 that wasn't fixed by #160.

Lingua principale
TypeScript
Stelle
12
Fork
1
Merge medio
1g 8h
PR unite (30g)
66

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leanprover/lean-workbench

Tutte le issue di leanprover/lean-workbench

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.