outline icon indicating copy to clipboard operation
outline copied to clipboard

Move document history to `revisions.list` API

Open hmacr opened this issue 1 year ago • 1 comments

Closes #8424

This doesn't fix #8403 - it needs a bit more work to consolidate local document state.

I also noticed that document restore doesn't create a documents.restore event which sometimes messes up the history - will create a separate PR.

hmacr avatar Feb 17 '25 11:02 hmacr

I also noticed that document restore doesn't create a documents.restore event which sometimes messes up the history

If the history is entirely driven from revisions then this should become a non-issue?

tommoor avatar Feb 17 '25 13:02 tommoor

If the history is entirely driven from revisions then this should become a non-issue?

Yes, the whole impl becomes a lot simpler too - no need to keep track of individual offsets between revisions and events. Should be fine to just list the revisions?

hmacr avatar Feb 17 '25 14:02 hmacr

Well not sure I want to remove them, I guess I'm just not sure how not having documents.restore is an issue here as we'll have an associated revision

tommoor avatar Feb 17 '25 14:02 tommoor

I hear you - I mean it's not a functional issue, just that the history might not have it which should be fine because data from events are nice to haves anyway with the cleanup task going in later.

hmacr avatar Feb 17 '25 14:02 hmacr

Perhaps ideally there would be a separate model here like DocumentHistory that would combine revisions and events, leave events as the audit trail it was supposed to be.

Something for the future but would need an enormous backfill

tommoor avatar Feb 17 '25 14:02 tommoor