fix(cli): preserve notes during sync moves
Build and Push Docker Container / build-and-push (push) Successful in 1m52s

- Leave sync and watch notes empty by default instead of writing placeholder text.
- Preserve existing remote notes when moving or adopting files without --note.
- Detect tracked local moves by SHA-256 and update remote metadata safely.
- Skip files that vanish during watch scans instead of aborting the sync cycle.
- Bump NanoShare to 1.24.0 and the standalone CLI to 0.3.0.
This commit is contained in:
2026-07-27 21:40:30 +02:00
parent 993337be9f
commit 2b0215cd94
9 changed files with 95 additions and 15 deletions
+5 -2
View File
@@ -52,14 +52,17 @@ class ConvexDB(ConvexDbBase):
)
return data
async def update_file(self, file_id:str, file_name:str, note:str, expires_at:datetime|None, user_id:str, file_path:str=''):
async def update_file(self, file_id:str, file_name:str, note:str|None, expires_at:datetime|None, user_id:str, file_path:str='', preserve_missing:bool=False):
args = {
'file_id': file_id,
'file_name': file_name,
'file_path': file_path,
'note': note,
'user_id': user_id
}
if note is not None:
args['note'] = note
elif not preserve_missing:
args['note'] = ''
if expires_at:
args['expires_at'] = expires_at.isoformat()