Skip to content

Conversation

@pauliyobo
Copy link
Collaborator

Link to issue number:

closes #229

Summary of the issue:

Up until now, annotations for a document were associated only through the document's title and storage URI.
While this has worked for most cases, changing the location of the original document would consequently invalidate the association, even though the annotations and the document in question would not have any modification.

Description of how this pull request fixes the issue:

This PR allows documents to be found also through their content hash.
This will cover cases in which the storage location has changed, however, it will not cover the cases in which the content of a document has been modified, though if the storage location remains the same, there shouldn't be any changes i nthe behaviour.

Testing performed:

Manual and unit testing

Known issues with pull request:

While this isn't really an issue, I fear that the migration may take a significant amount of time for large collections. It would need to be tested.

PS: Sorry for the horrible review experience, ruff format touched way more than I'd have expected.

@cary-rowen I believe you were particularly affected by this issue. Any thoughts?
Also, I wonder if the user should be prompted whenever the storage location of the document differs from the actual path stored in the database.

@pauliyobo pauliyobo marked this pull request as draft November 15, 2025 00:40
@cary-rowen
Copy link
Collaborator

Hello @pauliyobo
Great work! I like this.

You wrote:

Sorry for the horrible review experience, ruff format touched way more than I'd have expected.

Is it possible for you to put the ruff lintting changes in a separate PR?

Also, I wonder if the user should be prompted whenever the storage location of the document differs from the actual path stored in the database.

I think giving dialog might be better, but I haven't tested this yet, I hope to test this soon, it's so cool.

@pauliyobo
Copy link
Collaborator Author

Is it possible for you to put the ruff lintting changes in a separate PR?

probably, though I accidentally ran format before committing the prior change, which makes things a bit complicated.

@cary-rowen cary-rowen marked this pull request as ready for review November 20, 2025 13:38
@cary-rowen cary-rowen marked this pull request as draft November 20, 2025 13:38
@cary-rowen cary-rowen self-assigned this Nov 20, 2025
@cary-rowen cary-rowen assigned pauliyobo and unassigned cary-rowen Nov 20, 2025
@cary-rowen cary-rowen closed this Nov 20, 2025
@cary-rowen cary-rowen reopened this Nov 20, 2025
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.

Comments and notes are lost after changing the save location of the document

3 participants