Skip to content

Comments

feat(server): SyncAssetEditV1#26446

Open
bwees wants to merge 4 commits intomainfrom
feat/mobile-edit-2-server-sync-entity
Open

feat(server): SyncAssetEditV1#26446
bwees wants to merge 4 commits intomainfrom
feat/mobile-edit-2-server-sync-entity

Conversation

@bwees
Copy link
Member

@bwees bwees commented Feb 22, 2026

Description

Adds edit sync entity to server

Comment on lines 137 to 142
await assetEditRepo.replaceAll(asset.id, [
{
action: AssetEditAction.Crop,
parameters: { x: 50, y: 60, width: 150, height: 250 },
},
]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually an update. I think you should do a db.update(...) type query that updates the existing record and verify that the update comes across. What you are doing here is technically a delete & re-create, which will make a new record with a new uuid. It's fine for the service to always do a replace, but we should test and verify that updating a record will still be detected and synced.

{
ack: expect.any(String),
data: {
assetId: asset.id,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you haven't updated this to include editId yet

await ctx.assertSyncIsComplete(auth, [SyncRequestType.AssetEditsV1]);
});

it('should detect and sync deleted asset edits', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this, can you add at least one test in test/.../audit.database.spec.ts that verifies that when an asset is deleted (which should cascade delete the asset edits) that no audit records are created?

@bwees bwees force-pushed the feat/mobile-edit-2-server-sync-entity branch 3 times, most recently from 60b39f5 to 7fc55f9 Compare February 23, 2026 20:50
@bwees bwees changed the base branch from main to feat/mobiel-edit-1-id-response February 23, 2026 20:50
Base automatically changed from feat/mobiel-edit-1-id-response to main February 23, 2026 20:57
@bwees bwees force-pushed the feat/mobile-edit-2-server-sync-entity branch from 7fc55f9 to 68ca7cd Compare February 23, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants