Skip to content

Add activity focused selector api - #63026

Open
come-nc wants to merge 3 commits into
masterfrom
feat/add-activity-focused-selector-api
Open

Add activity focused selector api#63026
come-nc wants to merge 3 commits into
masterfrom
feat/add-activity-focused-selector-api

Conversation

@come-nc

@come-nc come-nc commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

Adds an API for application to register an activity focused selector to extend the DB query for "focused" activity filter.
Implements the API in dav for calendar events as an example.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@come-nc come-nc added this to the Nextcloud 35 milestone Aug 7, 2026
@come-nc come-nc self-assigned this Aug 7, 2026
@come-nc come-nc added the 2. developing Work in progress label Aug 7, 2026
@come-nc
come-nc requested a review from artonge August 7, 2026 13:56
Comment thread lib/public/Activity/IActivityFocusedSelector.php Outdated
…ty selector

This allows applications to register a class to extend the query for
 focused activity. Focused activity events should directly concern the
 logged-in user.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
come-nc force-pushed the feat/add-activity-focused-selector-api branch from ee18089 to e66e033 Compare August 10, 2026 08:35
It will show any event linked to a calendar directly owned by the
 logged-in user.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
come-nc force-pushed the feat/add-activity-focused-selector-api branch from e66e033 to fbb2244 Compare August 10, 2026 08:36
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 10, 2026
@come-nc
come-nc marked this pull request as ready for review August 10, 2026 09:47
@come-nc
come-nc requested review from icewind1991, leftybournes, provokateurin and sorbaugh and removed request for a team August 10, 2026 09:47

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe I don't get the full picture. Where would that be used?

Comment thread lib/public/Activity/IManager.php

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

forgot to save this comment in my review yesterday

$query->expr()->andX(
$query->expr()->eq('a.object_type', $query->createNamedParameter('calendar')),
$query->expr()->eq('a.object_id', 'calendars.id'),
));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so a is the oc_activities table?

This feels a bit like we are leaking schema internals of the db layer into the public API for other apps. That's hard to understand (for me) and changes of the base query/schema could be painful in the future.

@SebastianKrupinski SebastianKrupinski Aug 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So if I am reading this correctly, you want to build a SQL statement from bits of SQL statements collected from separately maintained apps with a type enforcement of list"string" and no way to control the join statements?

Respectfully: I think this is a bad idea

@nextcloud-bot nextcloud-bot mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants