lecture.studio

Library sync

The library folder is watched, so changes from other apps show up on their own; Refresh reads it again on demand.

Other tools touch the same folder: a text editor, a git pull, Finder, a sync client like iCloud Drive or Dropbox, a script. Lecture Studio watches the library folder and picks those changes up without a relaunch.

What the watcher does#

The app subscribes to file system events for the library folder. A little after changes stop, it:

  • reads the file list again, so new units, files and courses appear and removed ones go;
  • reloads the presenter profile when studio.json at the root changed;
  • reloads the open file when it changed and the editor was clean, or shows Changed on disk, reload in the header when you had unsaved edits;
  • refreshes the git bar when the library is a repository.

The app's own writes are not reported back to it; those are handled where they happen. Changes inside .git, build folders, node_modules and Finder metadata are ignored.

Refresh on demand#

If something still looks stale, View › Refresh Library (⌘R) does everything the watcher would, at once. The same command sits behind the circular-arrow button on the library screen and in the workspace header. The sources dialog has its own Refresh for the index.

Sync clients#

Because everything is plain files, a library in iCloud Drive, Dropbox or a git repository on two Macs works. Two things to keep in mind:

  • Open a deck on one Mac at a time. The app does not merge; the last save wins, and a file that changes under you while you have edits shows Changed on disk, reload so you can choose.
  • Chat history is per Mac and per library path; it does not sync with the folder.

Changed on disk, reload#

The button appears in the header whenever the open file changed on disk while the editor held unsaved changes: the assistant wrote it, another app saved it, or a pull brought a new version. Clicking it loads the disk version and drops your edits. To keep yours instead, save with ⌘S, which overwrites the disk version.