Skip to content

feat(speakers): add has_pending_presentations filter for speakers and submitters#562

Open
romanetar wants to merge 1 commit into
mainfrom
feature/speakers-grid-new-filter
Open

feat(speakers): add has_pending_presentations filter for speakers and submitters#562
romanetar wants to merge 1 commit into
mainfrom
feature/speakers-grid-new-filter

Conversation

@romanetar

@romanetar romanetar commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

ref https://app.clickup.com/t/86badvupk

Summary by CodeRabbit

  • New Features

    • Added filtering capability to filter speakers and submitters by pending presentation status across all relevant endpoints, including speakers list, submitters list, CSV exports, activity counts, and bulk email operations.
  • Tests

    • Added test coverage for pending presentation filtering functionality for both speakers and submitters.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@romanetar, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 30 minutes and 1 second. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5056be20-4852-4fba-8b0e-a0127bc1338d

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce716b and 1dc2b14.

📒 Files selected for processing (10)
  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSpeakersApiController.php
  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSubmittersApiController.php
  • app/Jobs/Emails/PresentationSubmissions/ProcessSpeakersEmailRequestJob.php
  • app/Jobs/Emails/PresentationSubmissions/ProcessSubmittersEmailRequestJob.php
  • app/Repositories/Summit/DoctrineMemberRepository.php
  • app/Repositories/Summit/DoctrineSpeakerRepository.php
  • app/Services/Model/Imp/SpeakerService.php
  • app/Services/Model/Imp/SubmitterService.php
  • tests/oauth2/OAuth2SummitSpeakersApiTest.php
  • tests/oauth2/OAuth2SummitSubmittersApiTest.php
📝 Walkthrough

Walkthrough

The PR adds a has_pending_presentations boolean filter to speaker and submitter API endpoints (getSpeakers, getSpeakersActivitiesCount, getSpeakersCSV, getAllBySummit, getAllBySummitCSV, send, getSubmittersActivitiesCount). Repositories implement the filter via EXISTS/NOT EXISTS Doctrine SQL subqueries checking for unpublished, unselected presentations. Integration tests verify both paths.

Changes

has_pending_presentations filter

Layer / File(s) Summary
Repository EXISTS/NOT EXISTS predicate logic
app/Repositories/Summit/DoctrineSpeakerRepository.php, app/Repositories/Summit/DoctrineMemberRepository.php
Both repositories add a DoctrineSwitchFilterMapping for has_pending_presentations. For "true", EXISTS subqueries match unpublished presentations linked to speaker/member that are absent from SummitSelectedPresentation Group/Session lists; "false" inverts with NOT EXISTS. Both splice in $extraSelectionStatusFilter when available. The speaker variant handles both direct speaker links and moderator links.
Speaker controller filter parsing and validation
app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSpeakersApiController.php
Adds has_pending_presentations with == operator to filter parser configs and in:true,false validation rules across getSpeakers, getSpeakersActivitiesCount, and getSpeakersCSV. OpenAPI filter descriptions are updated for all three endpoints.
Submitter controller filter parsing and validation
app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSubmittersApiController.php
Adds has_pending_presentations with == operator and in:true,false validation across getAllBySummit, getAllBySummitCSV, send, and getSubmittersActivitiesCount. The getSubmittersActivitiesCount OpenAPI description is also updated.
Integration tests
tests/oauth2/OAuth2SummitSpeakersApiTest.php, tests/oauth2/OAuth2SummitSubmittersApiTest.php
New test methods create an unpublished, unselected presentation, call the list endpoint with has_pending_presentations==true, and assert HTTP 200 with non-empty data.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • OpenStackweb/summit-api#543: Adds the getSpeakersActivitiesCount / getSubmittersActivitiesCount endpoints and underlying repository logic that this PR extends with the has_pending_presentations filter.

Suggested reviewers

  • smarcet

Poem

🐰 A pending talk needs a filter, you see,
So speakers with drafts can be found easily!
EXISTS and NOT EXISTS — the queries do hop,
Through groups and through sessions that haven't yet stopped.
The bunny approves: no stray talks shall hide! 🎤

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and concisely describes the main change: adding a new filter field has_pending_presentations to speakers and submitters endpoints, which is directly reflected in the changeset across controllers, repositories, and tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/speakers-grid-new-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-562/

This page is automatically updated on each push to this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSpeakersApiController.php`:
- Line 254: The protected route's OpenAPI parameter description for the speakers
endpoint needs to be updated to match the filter options added on line 254.
Locate the description field for the protected speakers route (the authenticated
`/api/v1/summits/{id}/speakers` endpoint) and add `has_pending_presentations` to
the list of supported filters in the same format as the public route, ensuring
both routes advertise the same available filter parameters.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fdcf26d7-1680-4902-b468-48a4e28f67df

📥 Commits

Reviewing files that changed from the base of the PR and between 5a64bc5 and 7ce716b.

📒 Files selected for processing (6)
  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSpeakersApiController.php
  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSubmittersApiController.php
  • app/Repositories/Summit/DoctrineMemberRepository.php
  • app/Repositories/Summit/DoctrineSpeakerRepository.php
  • tests/oauth2/OAuth2SummitSpeakersApiTest.php
  • tests/oauth2/OAuth2SummitSubmittersApiTest.php

… submitters

Signed-off-by: romanetar <roman_ag@hotmail.com>
@romanetar romanetar force-pushed the feature/speakers-grid-new-filter branch from 7ce716b to 1dc2b14 Compare June 22, 2026 14:13
@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-562/

This page is automatically updated on each push to this PR.

@romanetar romanetar requested a review from smarcet June 22, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant