Skip to content

Conversation

edward-ly
Copy link

No description provided.

Copy link

welcome bot commented May 15, 2025

Thanks for opening your first pull request in this repository! ✌️

@ChristophWurst
Copy link
Member

It was decided that we should move on with this without nextcloud/server#52852.

I'll look for a way to make Psalm understand the foreign code.

@edward-ly edward-ly force-pushed the feat/context-chat branch 2 times, most recently from 16633b0 to a359dd7 Compare June 18, 2025 23:46
@ChristophWurst
Copy link
Member

It was decided that we should move on with this without nextcloud/server#52852.

I'll look for a way to make Psalm understand the foreign code.

Since we have to do workarounds to get Psalm working with stubs, have a stub update mechanism, and additionally need the actual classes to be able to write tests, we decided that nextcloud/server#52852 should be pursued again. It's also an investment of time, but we'll have our standard setup for app communication through the OCP public API. That setup works for Psalm and PHPUnit.

@edward-ly edward-ly force-pushed the feat/context-chat branch 2 times, most recently from c2efb0b to 6a236d3 Compare July 9, 2025 22:04
@edward-ly edward-ly force-pushed the feat/context-chat branch 3 times, most recently from dd566f9 to a7bc7ba Compare July 15, 2025 23:43
@edward-ly edward-ly force-pushed the feat/context-chat branch 8 times, most recently from 52dcdfc to 9077fa6 Compare July 24, 2025 06:41
Copy link
Member

@marcelklehr marcelklehr left a comment

Choose a reason for hiding this comment

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

Looks really good to me! If we can finish the tests, I'd look forward to a review from the groupware team 💙

if ($nextMessage !== false) {
$this->jobsService->updateOrCreate($job->getUserId(), $job->getAccountId(), $job->getMailboxId(), $nextMessage->getId());
try {
$this->jobsService->updateOrCreate($task->getMailboxId(), $message?->getId() ?? $messageIds[0]);
Copy link
Author

Choose a reason for hiding this comment

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

Is there any situation where $message would not have an ID? And even then, why should we loop back to the start of the list?

Copy link
Member

Choose a reason for hiding this comment

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

This is about $message being null and mainly to appease static analysis, I think. Feel free to improve this.

@edward-ly edward-ly force-pushed the feat/context-chat branch 4 times, most recently from 80ad78c to 8b6b446 Compare September 9, 2025 23:16
@ChristophWurst
Copy link
Member

@edward-ly is this ready for review?

@edward-ly
Copy link
Author

@edward-ly is this ready for review?

Not yet, still more unit tests to complete, but feel free to suggest more performance/other improvements if you think they're needed.

edward-ly and others added 15 commits October 1, 2025 17:56
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
… chat import jobs

Signed-off-by: Edward Ly <contact@edward.ly>
… import jobs

Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
- rename Job to Task to make it easier to differentiate it from bg jobs
- simplify db schema
- change contentItem id to include mailbox id
- move message filtering into DB queries
- add lots of error handling

Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

4 participants