Skip to content

Should out-of-band detection or handling be more granular? #509

@krassowski

Description

@krassowski

Description

Currently any change to the disk timestamp of the file used by RTC will trigger full reload:

self._document.source = model["content"]
self._document.dirty = False

This leads to issues such as:

Reproduce

  1. Install jupyter-collaboration
  2. Create a test.ipynb notebook with few cells, including interactive outputs, select the last one
  3. In terminal run touch test.ipynb
  4. See that notebook widget reloads, with cursor jumping to the first cell
  5. See that cell outputs were reset and all intermediate state was lost

Expected behavior

  • Only the subset of cells that actually changed gets reloaded (rather than a full document).
    • looking at the codebase, I think this may need solving at jupyter-ydoc level
  • For touch this should be a no-op
    • this could be solved here as a special case, since we would not want to change the dirty flag either

Context

  • JupyterLab version: 4.5.0rc0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions