Skip to content

feat(speakers): display unique activities count on speakers/submitters list#933

Open
mulldug wants to merge 2 commits into
masterfrom
feature/speakers-submitters-activities-count
Open

feat(speakers): display unique activities count on speakers/submitters list#933
mulldug wants to merge 2 commits into
masterfrom
feature/speakers-submitters-activities-count

Conversation

@mulldug
Copy link
Copy Markdown

@mulldug mulldug commented May 12, 2026

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

Add total filtered activities count to the page header alongside the speaker count, and selected activities count above the grid, for both the Speakers and Submitters views. Activity counts are deduplicated across accepted, alternate, and rejected presentations using a Set client-side for selections and a dedicated backend endpoint for the filtered total.

Also fix null guards in current-summit-reducer for reg-lite and print-app settings payloads, and switch dev server to http.

Summary by CodeRabbit

  • New Features

    • Added activity count tracking for speakers and submitters in summit lists.
    • Updated UI to display activities count alongside total items in selection messaging.
  • Bug Fixes

    • Added defensive checks for missing response data in summit settings handling.

Review Change Stack

mulldug added 2 commits May 7, 2026 10:16
…s list

Add total filtered activities count to the page header alongside the speaker count,
and selected activities count above the grid, for both the Speakers and Submitters views.
Activity counts are deduplicated across accepted, alternate, and rejected presentations
using a Set client-side for selections and a dedicated backend endpoint for the filtered total.

Also fix null guards in current-summit-reducer for reg-lite and
print-app settings payloads, and switch dev server to http.
…iltered results

Show "Selected N Speakers | M Activities" only when the full filtered set is selected
(selectedAll with no exclusions), where totalActivities from the backend is accurate.
Fall back to "Selected N Speakers" for partial or cross-page selections where a
correct count cannot be determined client-side.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

Redux actions and thunks fetch speaker and submitter activities counts from new API endpoints. Reducers track totalActivities state. UI components display activities alongside item counts with conditional messaging based on whether the count is accurate for the current selection.

Changes

Activities Count Tracking for Speakers and Submitters

Layer / File(s) Summary
Redux actions for activities count
src/actions/speaker-actions.js, src/actions/submitter-actions.js
Added REQUEST_SPEAKERS_ACTIVITIES_COUNT / RECEIVE_SPEAKERS_ACTIVITIES_COUNT and REQUEST_SUBMITTERS_ACTIVITIES_COUNT / RECEIVE_SUBMITTERS_ACTIVITIES_COUNT action types. Introduced getSpeakersActivitiesCount and getSubmittersActivitiesCount thunks that call /speakers/all/events/count and /submitters/all/events/count endpoints respectively, with optional filter arrays. Updated getSpeakersBySummit and getSubmittersBySummit to dispatch these thunks alongside existing list requests.
Reducer state and handlers for activities counts
src/reducers/summit_speakers/summit-speakers-list-reducer.js, src/reducers/summit_submitters/summit-submitters-list-reducer.js
Extended reducer imports to include new activities-count action types. Added totalActivities to DEFAULT_STATE initialized to 0. Added reducer cases to handle RECEIVE_SPEAKERS_ACTIVITIES_COUNT and RECEIVE_SUBMITTERS_ACTIVITIES_COUNT by setting totalActivities from payload.response.count.
Internationalization for activities messaging
src/i18n/en.json
Added general.activities translation label. Updated summit_speakers_list.items_qty and summit_submitters_list.items_qty to include {activitiesQty} placeholder. Added fallback strings summit_speakers_list.items_qty_no_activities and summit_submitters_list.items_qty_no_activities for when activities count is unavailable.
UI rendering and conditional activities display
src/pages/summit_speakers/summit-speakers-list-page.js
Updated imports to use semicolons. Extended render() destructuring to extract totalActivities and excludedItems. Computed activitiesCountAccurate from selectedAll and excludedItems length. Modified page title to display both totalItems and totalActivities with labels. Replaced single items_qty i18n call with conditional logic: uses activities-aware key when accurate, fallback key otherwise.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • martinquiroga-exo
  • smarcet

Poem

🐰 Counting all the speakers bright,
And their talks throughout the night,
Activities now in full display,
Summit insights come to stay!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding a display of unique activities counts on the speakers and submitters list pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/speakers-submitters-activities-count

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 `@webpack.dev.js`:
- Line 11: The dev server was changed to use HTTP via the server: { type: "http"
} setting in webpack.dev.js which can break HTTPS-only features and OAuth
redirect URIs; either revert to HTTPS by configuring the dev server to use TLS
(provide cert/key or use a local CA tool like mkcert) or, if you must keep HTTP,
add a checklist and guards to verify authentication/OAuth redirect URIs, secure
cookies, service worker registration, and secure-context dependent APIs work in
development; update the webpack.dev.js server configuration (the server object)
and any development docs to reflect the chosen approach so dev/prod parity is
preserved.
🪄 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: 715e5fb9-188e-445d-a67f-c7350fa98eef

📥 Commits

Reviewing files that changed from the base of the PR and between 2a07f4e and cb36a45.

📒 Files selected for processing (8)
  • src/actions/speaker-actions.js
  • src/actions/submitter-actions.js
  • src/i18n/en.json
  • src/pages/summit_speakers/summit-speakers-list-page.js
  • src/reducers/summit_speakers/summit-speakers-list-reducer.js
  • src/reducers/summit_submitters/summit-submitters-list-reducer.js
  • src/reducers/summits/current-summit-reducer.js
  • webpack.dev.js

Comment thread webpack.dev.js
devServer: {
historyApiFallback: true,
server: { type: "https" }
server: { type: "http" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for HTTPS-dependent features that may break with HTTP dev server

echo "=== Checking for Service Workers ==="
rg -n --type=js --type=ts -C2 'navigator\.serviceWorker|registerServiceWorker'

echo -e "\n=== Checking for Secure Cookie usage ==="
rg -n --type=js --type=ts -C2 'secure:\s*true|; secure'

echo -e "\n=== Checking for HTTPS-only Web APIs ==="
rg -n --type=js --type=ts -C2 'navigator\.geolocation|Notification\.requestPermission|navigator\.mediaDevices'

echo -e "\n=== Checking for OAuth/Auth configuration ==="
rg -n --type=js --type=ts -C2 'oauth|OAuth|redirect.*[Uu]ri'

Repository: fntechgit/summit-admin

Length of output: 6670


Verify HTTP development server compatibility with your application's security features.

Switching from HTTPS to HTTP in development creates a dev/prod parity gap if your production environment uses HTTPS. Before deployment, confirm that:

  • Authentication and OAuth flows work correctly with HTTP redirect URIs
  • No security-sensitive features (like service workers or secure cookies) are inadvertently broken
  • Browser compatibility is maintained for any features relying on secure contexts

If this change was made to work around local development issues, consider alternatives like mkcert for self-signed certificates to preserve HTTPS in development.

🤖 Prompt for 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.

In `@webpack.dev.js` at line 11, The dev server was changed to use HTTP via the
server: { type: "http" } setting in webpack.dev.js which can break HTTPS-only
features and OAuth redirect URIs; either revert to HTTPS by configuring the dev
server to use TLS (provide cert/key or use a local CA tool like mkcert) or, if
you must keep HTTP, add a checklist and guards to verify authentication/OAuth
redirect URIs, secure cookies, service worker registration, and secure-context
dependent APIs work in development; update the webpack.dev.js server
configuration (the server object) and any development docs to reflect the chosen
approach so dev/prod parity is preserved.

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