Conversation
36747a6 to
31b37dd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36747a6fd3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Implement first working write path for Deck CalDAV objects. - allow DAV write privilege on Deck calendars - handle PUT on existing card/stack ICS objects and map VTODO fields to Deck services - add NC32 compatibility fixes in BoardMapper for empty orX() usage - add unit tests for calendar update mapping Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Follow-up fixes after real-world macOS Reminders tests. - convert COMPLETED timestamps to DateTime expected by Deck entities - provide calendar object owner/group to avoid DELETE scheduling crashes - add backend tests for delete path and COMPLETED-without-STATUS mapping Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
…bility Stabilize bidirectional task sync for Apple Reminders and Thunderbird. - implement createFile support with stack resolution and alias normalization - support delete and robust completed mapping (STATUS/COMPLETED/PERCENT-COMPLETE) - add UID/resource-name upsert logic to avoid duplicates on move-back - handle board-to-board moves by updating existing deck-card IDs - export richer VTODO metadata (DTSTAMP/CREATED/LAST-MODIFIED/PERCENT-COMPLETE) - add extensive unit tests for update/create/delete and fallback paths Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
…Labels" This reverts commit 3d0af5c. Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
- fix Deck settings CalDAV mode selector rendering - make ETag/last-modified depend on selected list mapping mode - map list priority as left=9, right=1 for Thunderbird/Apple Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
…ateFile Signed-off-by: Jaggob <37583151+Jaggob@users.noreply.github.com>
584dcf5 to
8f1393f
Compare
grnd-alt
left a comment
There was a problem hiding this comment.
Hey, thanks for your contribution, would be nice to get this feature in. I have some smaller code-style remarks, that are partly up for discussion.
The most important remark is that one though: https://github.com/nextcloud/deck/pull/7655/changes#r2840797696
I think this should be oriented to work with tasks as much as possible before merging.
| * @throws \OCP\AppFramework\Db\DoesNotExistException | ||
| * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException | ||
| */ | ||
| public function findIncludingDeletedLite(int $cardId): Card { |
There was a problem hiding this comment.
As this function and findIncludingDeleted have basically the same logic as the existing find I would rather drop these and add 2 parameters to find:
bool includeDeleted = false
bool fullDetails = true
that way existing behavior stays the same and we have less duplicate code
| // register unused client for the sidebar to have access to its parser methods | ||
| const filesApi = window.OC && window.OC.Files | ||
| if (filesApi && typeof filesApi.getClient === 'function') { | ||
| Object.assign(window.OCA.Files, { App: { fileList: { filesClient: filesApi.getClient() } } }, window.OCA.Files) |
There was a problem hiding this comment.
this entire section is removed on main no need to re-add
| $lastModified->setTimestamp($lastModifiedTs); | ||
| $event->DTSTAMP = $lastModified; | ||
| $event->{'LAST-MODIFIED'} = $lastModified; | ||
| $event->STATUS = 'NEEDS-ACTION'; |
There was a problem hiding this comment.
why is it always needs-action? Isn't it fine to have no status as the default?
| */ | ||
| public function findAllForStacks(array $stackIds, ?int $limit = null, int $offset = 0, int $since = -1): array { | ||
| public function findAllForStacks(array $stackIds, ?int $limit = null, ?int $offset = 0, int $since = -1): array { | ||
| $offset ??= 0; |
| */ | ||
| public function findAll($stackId, ?int $limit = null, int $offset = 0, int $since = -1) { | ||
| public function findAll($stackId, ?int $limit = null, ?int $offset = 0, int $since = -1) { | ||
| $offset ??= 0; |
There was a problem hiding this comment.
why make $offset nullable and then set it back to non-null?
| return $this->boardService->findAll(-1, false, false); | ||
| } | ||
|
|
||
| /** @psalm-suppress InvalidThrow */ |
| $card = null; | ||
| try { | ||
| $card = $includeDeleted | ||
| ? $this->findCardByIdIncludingDeleted($cardId) |
There was a problem hiding this comment.
as said on the definition of findCardByIdIncludingDeleted this should just call find($cardId, $includeDeleted) imo
| return $this->stackService->find($stackId)->getCards() ?? []; | ||
| } | ||
|
|
||
| public function getCalDavListMode(): string { |
|
|
||
| /** @return Card[] */ | ||
| public function getChildrenForStack(int $stackId): array { | ||
| return $this->stackService->find($stackId)->getCards() ?? []; |
There was a problem hiding this comment.
I don't think we need this function
Especially as the only time this function is called $stack is already defined, so $stack->getCards() ?? [] in calendar.php works faster than retreiving the stack by id first
| @@ -95,45 +115,82 @@ protected function validateFilterForObject($object, array $filters) { | |||
| } | |||
|
|
|||
| public function createFile($name, $data = null) { | |||
There was a problem hiding this comment.
I am not entirely fluent with the webdav protocol, but when testing this with nextcloud tasks and thunderbird the behavior was not as I would've expected it.
I could not investigate thunderbirds requests, but for nc tasks the createFile was called with a filename and after creation the same file was re-requested to display the task, the name seems not to be respected so it is not served again under that name leading to a 404.
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
This PR adds CalDAV write support for Deck, enabling CalDAV clients to create, update, complete/uncomplete, and delete Deck cards.
It also introduces per-user CalDAV list mapping modes in Deck settings, so each user can choose how Deck lists are represented in CalDAV clients:
RELATED-TO)CATEGORIESPRIORITYAdditional changes include DAV hardening and compatibility improvements (notably for Thunderbird and Apple clients), plus backend cleanup/performance improvements in the CalDAV handling path.
Done in this PR
CATEGORIES) including Thunderbird interoperabilityFuture TODO
Checklist