Skip to content

fix(next): display deleted relations and uploads in version diff views #12955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

akhrarovsaid
Copy link
Contributor

@akhrarovsaid akhrarovsaid commented Jun 26, 2025

What?

This PR fixes an issue where relationship and upload fields that had their document-counterpart deleted would cause a runtime error. This happens because the version diff components expected a populated document instead of an id.

Two e2e tests were also added to the existing suite to test that the diff view is reachable even after deletions.

Why?

To prevent a runtime error when viewing diffs for documents that have relationships to deleted documents.

How?

Adjusting the diff view to accommodate deleted document relations.

Fixes #12915

Before:

2025-06-24.14-01-44.mp4

After:

versions-collections-after-Posts---Payload.webm

Notes:

  • I renamed PopulatedRelationshipValue to RelationshipValue as we don't actually know if the value is populated. Such as in the case of when the doc was deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant