Skip to content

File delete#56

Merged
nhardt merged 19 commits intomainfrom
file_delete
Feb 22, 2026
Merged

File delete#56
nhardt merged 19 commits intomainfrom
file_delete

Conversation

@nhardt
Copy link
Copy Markdown
Owner

@nhardt nhardt commented Feb 21, 2026

closes #24

Minimum File Delete

Overall, the idea here is that all the mechanisms in Footnote treat the user as the source of truth. When something is deleted, a tombstone file is created. the tombstone is sync'd, similar to a file, last action wins. for sharing, the target device will take on the state of the last device to share with it. if devices are eventually consistent, targets will converge on the same view of the data. Real world testing will be needed to see if this is good enough in practice.

Notes

Tombstone cleanup

There's not yet a mechanism to delete a tombstone, though with the expected number of devices to be low, it should be possible to keep track of which devices in our device group have processed a delete. once they all have, the tombstone can be deleted. (possibly you'd need to see all X devices have the tombstone marked for removal, or see that they don't have the tombstone at all)

Additional debt cleanup

There was long standing debt from misc warnings that were not fixed to ensure file_delete got filled in. Now that file_delete is a used function, all warning were cleaned. --all-features compiles clean

might be useful someday, easy to add back
rather than create new accounting that needs to be forwarded and managed
off device, for a share, delete everything not in the manifest. this has
holes but if all devices are syncing, everything should be eventually
consistent.

problems
- old device comes online
- two devices never sync with each other but sync with a remote

possible mitigations:
- designated "share" device
- ensure sync with a 1/2 + 1 devices before share
- do not process deletes more than once in a time period
this is overall a bit flaky still
to do this properly i think i need to give the sync code a channel to
post events back to something in dioxus that can reload the manifest.
@nhardt nhardt merged commit 2bef555 into main Feb 22, 2026
6 checks passed
@nhardt nhardt deleted the file_delete branch February 22, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

file delete

1 participant