Skip to content

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Jan 14, 2026

  • Introduced new schema property wasTrashedLocally on SendableItemMetadata.
  • Added corresponding schema version and migration.
  • Extended related data models accordingly.
  • Updated Enumerator to no longer enumerate remote trash items based on wasTrashedLocally.

@i2h3 i2h3 self-assigned this Jan 14, 2026
Copilot AI review requested due to automatic review settings January 14, 2026 13:20
@i2h3 i2h3 added the bug Something isn't working label Jan 14, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Jan 14, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Jan 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new wasTrashedLocally boolean property to track whether items were trashed on the local device versus on the server or another client. The intent is to exclude remote trash items from trash container enumeration, showing only locally trashed items to users.

Changes:

  • Added wasTrashedLocally property to ItemMetadata protocol, RealmItemMetadata, and SendableItemMetadata with schema migration
  • Updated extension methods to accept and pass through the wasTrashedLocally parameter
  • Modified Item+Trash.swift to set wasTrashedLocally: true when trashing items locally and wasTrashedLocally: false when restoring items
  • Changed Enumerator+Trash.swift to skip enumerating remote trash items

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Sources/NextcloudFileProviderKit/Metadata/ItemMetadata.swift Added wasTrashedLocally property to protocol
Sources/NextcloudFileProviderKit/Metadata/RealmItemMetadata.swift Added persisted wasTrashedLocally property with default value false
Sources/NextcloudFileProviderKit/Metadata/SendableItemMetadata.swift Added wasTrashedLocally property with documentation and updated initializers
Sources/NextcloudFileProviderKit/Database/SchemaVersion.swift Added new schema version for wasTrashedLocally
Sources/NextcloudFileProviderKit/Database/FilesDatabaseManager.swift Added migration logic, updated schema version, fixed logging inconsistency
Sources/NextcloudFileProviderKit/Extensions/NKTrash+Extensions.swift Added wasTrashedLocally parameter to toItemMetadata with documentation
Sources/NextcloudFileProviderKit/Extensions/NKFile+Extensions.swift Added wasTrashedLocally parameter to toItemMetadata
Sources/NextcloudFileProviderKit/Item/Item.swift Updated placeholder item creation to include wasTrashedLocally: false
Sources/NextcloudFileProviderKit/Item/Item+Trash.swift Set wasTrashedLocally: true for locally trashed items, false for restored items, improved logging
Sources/NextcloudFileProviderKit/Item/Item+Create.swift Updated item creation to include wasTrashedLocally: false
Sources/NextcloudFileProviderKit/Item/Item+LockFile.swift Updated lock file creation to include wasTrashedLocally: false
Sources/NextcloudFileProviderKit/Item/Item+Ignored.swift Updated ignored file creation to include wasTrashedLocally: false
Sources/NextcloudFileProviderKit/Item/Item+Modify.swift Formatting improvements and code cleanup
Sources/NextcloudFileProviderKit/Enumeration/Enumerator+Trash.swift Modified to skip enumerating remote trash items, added documentation and debug logging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@i2h3 i2h3 force-pushed the i2h3/fix/trash branch 3 times, most recently from fd6a502 to be059e4 Compare January 15, 2026 11:40
- Introduced new schema property wasTrashedLocally on SendableItemMetadata.
- Added corresponding schema version and migration.
- Extended related data models accordingly.
- Updated Enumerator to no longer enumerate remote trash items based on wasTrashedLocally.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 merged commit 2d9135a into main Jan 15, 2026
5 checks passed
@i2h3 i2h3 deleted the i2h3/fix/trash branch January 15, 2026 12:28
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants