Skip to content

πŸ•΅οΈ Add sharereview support#2711

Open
AndyScherzinger wants to merge 12 commits into
mainfrom
feat/noid/sharereview
Open

πŸ•΅οΈ Add sharereview support#2711
AndyScherzinger wants to merge 12 commits into
mainfrom
feat/noid/sharereview

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • πŸ”™ Backport requests are created or not needed: /backport to stableX.X
  • πŸ“… Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

πŸ€– AI (if applicable)

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

@AndyScherzinger AndyScherzinger added this to the v2.3.0 milestone Jun 7, 2026
@AndyScherzinger AndyScherzinger added enhancement New feature or request 2. developing Work in progress AI assisted labels Jun 7, 2026
@AndyScherzinger AndyScherzinger force-pushed the feat/noid/sharereview branch from a74331b to 411e1f7 Compare June 7, 2026 13:34
@AndyScherzinger AndyScherzinger marked this pull request as ready for review June 7, 2026 18:35
@AndyScherzinger AndyScherzinger changed the title Add sharereview support πŸ•΅οΈ Add sharereview support Jun 7, 2026
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 7, 2026
@AndyScherzinger AndyScherzinger force-pushed the feat/noid/sharereview branch 2 times, most recently from 569f563 to b35b188 Compare June 11, 2026 15:39
Comment thread lib/ShareReview/ShareReviewSource.php Outdated
foreach ($rawShares as $share) {
$formatted[] = [
'id' => (int)$share['id'],
'app' => $appName,

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.

We don't need this key. The consumer (ShareService::getAppShares()) already injects the app name.
Also, not required to be specified according to https://github.com/nextcloud/sharereview#3-implement-the-source

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed via cbf2ce9

Comment on lines +80 to +92
try {
$qb = $this->db->getQueryBuilder();
$qb->delete(self::SHARE_TABLE)
->where($qb->expr()->eq('id', $qb->createNamedParameter((int)$shareId, IQueryBuilder::PARAM_INT)));
$deleted = $qb->executeStatement() > 0;
} catch (Exception $e) {
$this->logger->error('Tables ShareReview: failed to delete share {id}: {message}', ['id' => $shareId, 'message' => $e->getMessage()]);
return false;
}

if ($deleted) {
$this->deleteContextNavigation((int)$shareId);
}

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.

is it possible to use Tables' ShareService::delete() instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed via 94ce853

Comment thread lib/ShareReview/ShareReviewSource.php Outdated
Comment on lines +198 to +201
self::NODE_TYPE_TABLE => ($tableNames[$nodeId] ?? "Table $nodeId") . ' (Table)',
self::NODE_TYPE_VIEW => ($viewNames[$nodeId] ?? "View $nodeId") . ' (View)',
self::NODE_TYPE_CONTEXT => ($contextNames[$nodeId] ?? "Context $nodeId") . ' (Context)',
default => "Unknown $nodeId",

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.

we should probably localize these texts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed via c73d566

Comment thread lib/ShareReview/ShareReviewSource.php Outdated
'group' => IShare::TYPE_GROUP,
'link' => IShare::TYPE_LINK,
'circle' => IShare::TYPE_CIRCLE,
default => IShare::TYPE_USER,

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.

silently mislabels bad data. Could have a warning too, if we must

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added logging via d2e8862

Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: Claude Code:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the feat/noid/sharereview branch 4 times, most recently from 1f6933e to d53e2d8 Compare June 15, 2026 21:50
…ayer

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
… shares

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the feat/noid/sharereview branch from d53e2d8 to d2e8862 Compare June 15, 2026 22:08
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 AI assisted enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants