Feature/new grid filter event list poc#984
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRebuilds the Summit event list page into new helpers, import modals, and a connected page component. Event filtering now passes prebuilt arrays through action creators. Supporting tests, translations, Redux wiring, and utility formatting are updated. ChangesSummit event list rebuild and filter API simplification
Estimated code review effort🎯 5 (Critical) | ⏱️ ~95 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (1)
src/components/filters/select-filter-criteria/index.js (1)
1-12: 💤 Low valueConsider restoring JSDoc comment format.
The comment header was changed from JSDoc format (
/**...*/) to a regular block comment (/* *...* */). JSDoc comments are recognized by documentation tools and IDEs for auto-documentation and hover tooltips. This change appears unintentional.📝 Restore JSDoc format
-/* * +/** * Copyright 2019 OpenStack Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ + */🤖 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 `@src/components/filters/select-filter-criteria/index.js` around lines 1 - 12, The file header comment at the beginning of index.js has been unintentionally changed from JSDoc format to a regular block comment. Restore the proper JSDoc format by changing the opening from `/* *` to `/**` so that documentation tools and IDEs can properly recognize and display auto-documentation and hover tooltips for the file.
🤖 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 `@src/components/filters/select-filter-criteria/index.js`:
- Line 97: The AsyncSelect component at line 97 has an unnecessary isLoading
prop that is not used by react-select 2.x since it manages loading state
internally based on pending loadOptions requests. Remove the isLoading prop from
the AsyncSelect component invocation to eliminate this dead code.
In `@src/pages/events/summit-event-list-page/components/ImportModal/index.jsx`:
- Around line 25-26: The Modal component on line 25 uses onHide={onClose}, but
the handleClose function is responsible for clearing local state. When users
close the modal via the close button or backdrop, onClose is called instead of
handleClose, causing the modal to reopen with stale values. Change the onHide
prop to call handleClose instead of onClose to ensure local state is reset on
all modal close paths.
In `@src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx`:
- Around line 61-66: The Input component with id "mux_token_secret" is
displaying the token secret as plain text, exposing sensitive credentials. Add a
type="password" attribute to the Input component to mask the input characters,
preventing the sensitive token secret from being visible on screen or in shared
sessions.
- Around line 26-27: The Modal component on line 26 has onHide={onClose} which
doesn't clear the form state when the modal is dismissed via the close button or
backdrop click. Create a new handler function that resets the tokenId,
tokenSecret, and emailTo state variables before calling onClose, then pass this
new handler to the Modal's onHide prop instead of onClose directly. This ensures
stale form data is cleared whenever the modal is closed.
In `@src/pages/events/summit-event-list-page/index.js`:
- Around line 842-844: The filter configuration object with key
"submission_status" has an incorrect label "Submitter Company" that doesn't
match what the filter actually does. Find the filter object with key
"submission_status" and change its label property to accurate text that
correctly describes the submission status field being filtered, such as
"Submission Status" or similar descriptive text that matches the actual
filtering behavior.
- Around line 958-968: The handleFilterCriteriaChange function builds
newEventFilters but does not apply or persist this value, so when the useEffect
at line 958 refetches with parsedFilter, it still uses the old filter state
instead of the newly selected saved criteria. To fix this, ensure that
handleFilterCriteriaChange actually sets or applies the newEventFilters (likely
by updating filter state or calling a state setter) so that the subsequent
getEvents call in the useEffect uses the updated filter criteria. The same issue
applies at the other affected location around lines 1111-1121 where the filter
change is similarly not being persisted before the fetch occurs.
- Around line 1441-1448: The mapStateToProps function is attempting to access
the media_uploads property of mediaUploadListState without checking if
mediaUploadListState exists first, causing a TypeError when it is undefined. Add
a guard condition to safely access mediaUploadListState.media_uploads by either
using optional chaining or a conditional check to provide a fallback value (such
as an empty array) when mediaUploadListState is not defined.
- Around line 1291-1296: The editable flag assignment uses the wrong property to
check against the editableColumns array. In the object creation where columnKey,
value, sortable, and customStyle are assigned from f2, the editable property is
being set by checking if f2.editable is included in editableColumns. However, f2
entries are keyed by columnKey, not editable. Replace the reference to
f2.editable with f2.columnKey when calling editableColumns.includes() so that
the editability check correctly matches against the column identifiers rather
than the editable property value.
---
Nitpick comments:
In `@src/components/filters/select-filter-criteria/index.js`:
- Around line 1-12: The file header comment at the beginning of index.js has
been unintentionally changed from JSDoc format to a regular block comment.
Restore the proper JSDoc format by changing the opening from `/* *` to `/**` so
that documentation tools and IDEs can properly recognize and display
auto-documentation and hover tooltips for the file.
🪄 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: 1210b4c2-fd6f-43c2-87ce-9b4e3e20809b
📒 Files selected for processing (6)
src/components/filters/select-filter-criteria/index.jssrc/components/filters/select-filter-criteria/index.module.lesssrc/pages/events/summit-event-list-page.jssrc/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsxsrc/pages/events/summit-event-list-page/components/ImportModal/index.jsxsrc/pages/events/summit-event-list-page/index.js
💤 Files with no reviewable changes (2)
- src/components/filters/select-filter-criteria/index.module.less
- src/pages/events/summit-event-list-page.js
There was a problem hiding this comment.
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 `@src/actions/event-actions.js`:
- Around line 889-901: The dispatch(startLoading()) function is called twice in
the same code block - once at the beginning and again after initializing the
filter variable. Remove the duplicate dispatch(startLoading()) call that appears
after the filter initialization to prevent redundant loading state updates,
keeping only the first call at the start of the function.
🪄 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: 30eaaa34-83c6-4df4-9adc-35216db93d1f
📒 Files selected for processing (5)
src/actions/__tests__/event-actions.test.jssrc/actions/event-actions.jssrc/i18n/en.jsonsrc/pages/events/__tests__/summit-event-list-page.test.jssrc/pages/events/summit-event-list-page/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
- src/pages/events/summit-event-list-page/index.js
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@package.json`:
- Line 95: Before merging the openstack-uicore-foundation version bump to
5.0.36-beta.1, verify that the beta version still exports the `.filters-row` and
`.event-list-date-picker` CSS classes. If the beta version does not include
these styles, add local CSS definitions for both classes to ensure layout
doesn't break in the files that depend on them: summit-attendees-list-page.js,
ticket-type-list-page.js, purchase-order-list-page.js, email-log-list-page.js,
and audit-logs/index.js. Alternatively, consider using a stable version of the
dependency if the beta introduces breaking changes to these styles.
In `@src/pages/events/summit-event-list-page/index.js`:
- Around line 956-979: In the _getEvents function, replace the extraColumns
parameter being passed to the getEvents call with selectedColumns instead. This
ensures that when users change field selections, those selections persist
through pagination, sorting, and search operations, rather than reverting to
stale Redux prop values that could reset the column selector.
- Around line 981-994: The two useEffect hooks need guards to prevent stale API
calls during summit switches and filter changes. In the first useEffect
(triggered by currentSummit?.id), verify that currentSummit has a valid id
before calling getMediaUploads and getEvents, and ensure resetFilters completes
before these calls execute. In the second useEffect (triggered by
parsedFilter.join(",")), add a guard to skip the initial _getEvents call that
fires immediately after resetFilters in the first effect, and only call
_getEvents when filters genuinely change after a summit is fully loaded.
Additionally, when filters do change, ensure the pagination resets to page 1 by
passing 1 as the page parameter to the data fetch function in _getEvents.
🪄 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: 7b97854d-e004-409f-a67b-ef8f62f7c270
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (5)
package.jsonsrc/actions/event-actions.jssrc/pages/events/__tests__/summit-event-list-page.test.jssrc/pages/events/summit-event-list-page/index.jssrc/styles/summit-event-list-page.less
💤 Files with no reviewable changes (2)
- src/styles/summit-event-list-page.less
- src/pages/events/tests/summit-event-list-page.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
- src/actions/event-actions.js
8491aae to
f287f19
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@package.json`:
- Line 95: The openstack-uicore-foundation dependency is pinned to beta version
5.0.36-beta.1 in package.json, which is unsuitable for production as it may
break CSS classes used across the application. Multiple files including
ticket-type-list-page.js, purchase-order-list-page.js, email-log-list-page.js,
summit-attendees-list-page.js, and audit-logs/index.js depend on the
.filters-row and .event-list-date-picker CSS classes exported by this package.
Downgrade the openstack-uicore-foundation dependency from the beta version to
the stable version 5.0.34 in the package.json file to ensure stability and
prevent filtering and date picker functionality from breaking.
In `@src/pages/events/summit-event-list-page/index.js`:
- Around line 310-337: The Dropdown component in the editableField function for
the allow_feedback column is receiving the entire extraProps object for its
value prop instead of extracting the actual boolean value. Change the value prop
in the Dropdown from value={extraProps} to value={extraProps.value} to pass the
correct boolean value. Apply the same fix to the to_record column's
editableField function as well to ensure both boolean dropdown fields work
correctly.
- Around line 915-925: The filter with key "submission_source" has an inaccurate
label of "Submitter Status" that doesn't reflect what it actually filters on
(the source or origin of the submission, such as Admin vs Submission). Update
the label property to accurately describe that the filter is for submission
source, such as "Submission Source" or similar terminology that clearly
indicates it filters by where the submission came from.
🪄 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: 1e3042f0-b69e-4064-8fd8-92fc9734cc86
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (12)
package.jsonsrc/actions/__tests__/event-actions.test.jssrc/actions/event-actions.jssrc/components/filters/select-filter-criteria/index.jssrc/components/filters/select-filter-criteria/index.module.lesssrc/i18n/en.jsonsrc/pages/events/__tests__/summit-event-list-page.test.jssrc/pages/events/summit-event-list-page.jssrc/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsxsrc/pages/events/summit-event-list-page/components/ImportModal/index.jsxsrc/pages/events/summit-event-list-page/index.jssrc/styles/summit-event-list-page.less
💤 Files with no reviewable changes (3)
- src/components/filters/select-filter-criteria/index.module.less
- src/styles/summit-event-list-page.less
- src/pages/events/summit-event-list-page.js
✅ Files skipped from review due to trivial changes (1)
- src/actions/tests/event-actions.test.js
🚧 Files skipped from review as they are similar to previous changes (4)
- src/pages/events/tests/summit-event-list-page.test.js
- src/components/filters/select-filter-criteria/index.js
- src/i18n/en.json
- src/actions/event-actions.js
There was a problem hiding this comment.
Pull request overview
This PR refactors the Summit “Activity/Event List” page to a new GridFilter-based implementation (PoC), adds dedicated import dialogs (CSV + MUX), and updates the event list request/export flow to use pre-built filter strings instead of locally parsing a filter object.
Changes:
- Replaced the legacy
summit-event-list-page.jswith a newpages/events/summit-event-list-page/index.jsusingGridFilter/useGridFilter. - Added separate CSV import and MUX MP4 import modal components.
- Updated event list actions (and tests) to accept an array of request filter strings; added GridFilter reducer to the Redux store; updated dependencies (uicore, redux, react-redux).
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for dependency version bumps (uicore, redux/react-redux). |
| package.json | Bumps openstack-uicore-foundation, react-redux, and redux. |
| src/store.js | Adds GridFilter reducer state (allGridFiltersState). |
| src/actions/event-actions.js | Refactors event list fetch/export to accept pre-built filter strings; removes legacy filter parsing. |
| src/actions/tests/event-actions.test.js | Updates tests to reflect “pass-through filter strings” behavior. |
| src/pages/events/summit-event-list-page.js | Removes legacy class-based event list page implementation. |
| src/pages/events/summit-event-list-page/index.js | Adds new functional event list page using GridFilter, saved criteria, and new import modals. |
| src/pages/events/summit-event-list-page/components/ImportModal/index.jsx | Adds CSV import modal. |
| src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx | Adds MUX MP4 import modal. |
| src/pages/events/tests/summit-event-list-page.test.js | Adjusts tests/mocks for the new event list page wiring and state shape. |
| src/i18n/en.json | Updates event_list strings (labels/placeholders). |
| src/styles/summit-event-list-page.less | Removes page-specific LESS (legacy layout). |
| src/components/filters/select-filter-criteria/index.js | Tweaks SelectFilterCriteria UI and delete confirmation text; removes CSS module usage. |
| src/components/filters/select-filter-criteria/index.module.less | Removes CSS module file used by SelectFilterCriteria. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ba1c419 to
69829c8
Compare
There was a problem hiding this comment.
Actionable comments posted: 8
♻️ Duplicate comments (4)
src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx (3)
61-66: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winMask the MUX token secret input.
The secret renders as plain text, exposing credentials on screen. Add
type="password".🔒 Suggested fix
<Input id="mux_token_secret" + type="password" value={tokenSecret} onChange={(ev) => setTokenSecret(ev.target.value)} className="form-control" />🤖 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 `@src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx` around lines 61 - 66, The MUX token secret field in ImportMUXModal is rendering as plain text, so update the Input used for tokenSecret to use a password-style input. Keep the existing tokenSecret state and onChange handling, and add the appropriate type setting on the Input component so the secret is masked when entered.
26-26: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse the reset-aware close handler for
onHide.Dismissing via the close button or backdrop routes to
onClosedirectly, leavingtokenId/tokenSecret/emailTopopulated when the modal reopens. UsehandleClose.Suggested fix
- <Modal show={show} onHide={onClose}> + <Modal show={show} onHide={handleClose}>🤖 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 `@src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx` at line 26, The ImportMUXModal dismiss flow is bypassing the reset logic because Modal’s onHide is wired to onClose instead of handleClose. Update the modal in ImportMUXModal to use handleClose for onHide so closing via backdrop or close button clears tokenId, tokenSecret, and emailTo before the modal reopens.
18-23: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winUnhandled rejection and no empty-field guard on import.
If
onImportrejects (invalid/empty MUX credentials), the rejection is swallowed and the user gets no feedback; the modal also stays open without state cleanup. Add a.catchand guard against submitting whentokenId/tokenSecretare empty.🤖 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 `@src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx` around lines 18 - 23, The handleImport flow in ImportMUXModal currently calls onImport without handling failures and allows submission with empty tokenId or tokenSecret. Update handleImport to validate those fields before calling onImport, and add a rejection handler so failed imports surface feedback and do not silently fail while leaving the modal in an inconsistent state. Use the existing handleImport, onImport, handleClose, tokenId, and tokenSecret symbols to locate and adjust the import submission logic.src/pages/events/summit-event-list-page/index.js (1)
466-474: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
mediaUploadListStateis still dereferenced without a guard.Line 472 reads
mediaUploadListState.media_uploadsdirectly. Duringredux-persistrehydration this slice can beundefined, throwingTypeError: Cannot read properties of undefined (reading 'media_uploads')(the same failure CI reported earlier). The test fixtures insummit-event-list-page.test.jsnow injectmediaUploadListState.media_uploads, which makes tests pass but masks this runtime gap rather than fixing it.🛡️ Suggested fix
- mediaUploadTypes: mediaUploadListState.media_uploads, + mediaUploadTypes: mediaUploadListState?.media_uploads ?? [],🤖 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 `@src/pages/events/summit-event-list-page/index.js` around lines 466 - 474, `mapStateToProps` in `summit-event-list-page` still assumes `mediaUploadListState` exists, so update the selector to safely handle an undefined slice during redux-persist rehydration. Use a guarded access or fallback when reading `mediaUploadListState.media_uploads`, and keep the existing `currentSummitState` and `currentEventListState` behavior unchanged. Reference the `mapStateToProps` function and the `mediaUploadTypes` mapping when making the fix.
🤖 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 `@src/actions/event-actions.js`:
- Line 929: The exportEvents thunk is ignoring the selected columns passed from
SummitEventListPage because its signature only accepts four arguments. Update
exportEvents in event-actions.js to accept the fifth selectedColumns argument
and forward it through the CSV export request/contract, or otherwise remove the
extra argument from the SummitEventListPage caller so both sides match. Use the
exportEvents and SummitEventListPage call site to locate the mismatch.
- Around line 305-358: The bulk update flow in event-actions.js starts the
global loading state but never clears it on failure; update the catch path in
the bulk events update handler so it dispatches stopLoading() just like the
success path does. Keep the fix localized around the putRequest chain that uses
normalizeBulkEvents, showSuccessMessage, and getEvents, and ensure loading is
always stopped even when the request rejects.
- Around line 197-202: Preserve primitive relation IDs in the bulk-edit payload
by normalizing both object and primitive shapes before building the update data.
In the event bulk update mapping in event-actions.js, adjust the relation fields
used by the bulk edit path so values like track: 5 or type: 2 are converted to
their IDs instead of falling through to undefined; keep the existing object
handling (e.g. e.track?.id) but add primitive fallback logic for each relation
field such as track_id and type_id.
In `@src/pages/events/summit-event-list-page/components/ImportModal/index.jsx`:
- Around line 32-49: The CSV format help text in ImportModal is still hardcoded
English while the rest of the modal uses T.translate, so it needs to be
localized. Update the instructional lines in the ImportModal component to use
T.translate (or the same translation helper used elsewhere in this modal), and
move any static labels like title, description, type_id, track_id, and speaker_*
into translatable keys so the help content renders correctly in all locales.
In `@src/pages/events/summit-event-list-page/helpers.js`:
- Around line 399-401: The new-tab navigation in the material link opens a
window without preventing access to window.opener, so update the window.open
call in the event materials flow to use noopener,noreferrer. Locate the link
creation logic around the row/material handling in helpers.js and ensure the
target remains a new tab while explicitly disabling opener/referrer exposure.
- Around line 763-771: The published-status filter is using the wrong field key,
so the GridFilter output targets published instead of the event payload’s
is_published. Update the published criterion in helpers.js to use the
is_published key, and ensure any related filter parsing/lookup in the event list
filter config stays aligned with that field so OPERATORS.IS resolves correctly.
In `@src/pages/events/summit-event-list-page/index.js`:
- Around line 137-139: The `useEffect` that syncs `extraColumns` into
`selectedColumns` in `SummitEventListPage` should guard against `undefined` so
`selectedColumns` never becomes invalid. Update the effect to only store a safe
array value (for example, fall back to an empty list when `extraColumns` is not
set), and keep `handleColumnsChange` plus the `optionalColumns.filter` logic
working against an array. Reference the `useEffect`, `handleColumnsChange`, and
`optionalColumns` usages to ensure the state shape stays consistent.
In `@src/utils/methods.js`:
- Around line 648-651: The formatDuration helper is formatting the same moment
duration twice and checking the wrong zero value. Update formatDuration to call
d.format("mm:ss", { trim: false }) once, store the formatted string in a local
variable, and use that cached value for both the return and the zero check. Also
change the fallback comparison to "00:00" so the fixed-width mm:ss output is
handled correctly.
---
Duplicate comments:
In `@src/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsx`:
- Around line 61-66: The MUX token secret field in ImportMUXModal is rendering
as plain text, so update the Input used for tokenSecret to use a password-style
input. Keep the existing tokenSecret state and onChange handling, and add the
appropriate type setting on the Input component so the secret is masked when
entered.
- Line 26: The ImportMUXModal dismiss flow is bypassing the reset logic because
Modal’s onHide is wired to onClose instead of handleClose. Update the modal in
ImportMUXModal to use handleClose for onHide so closing via backdrop or close
button clears tokenId, tokenSecret, and emailTo before the modal reopens.
- Around line 18-23: The handleImport flow in ImportMUXModal currently calls
onImport without handling failures and allows submission with empty tokenId or
tokenSecret. Update handleImport to validate those fields before calling
onImport, and add a rejection handler so failed imports surface feedback and do
not silently fail while leaving the modal in an inconsistent state. Use the
existing handleImport, onImport, handleClose, tokenId, and tokenSecret symbols
to locate and adjust the import submission logic.
In `@src/pages/events/summit-event-list-page/index.js`:
- Around line 466-474: `mapStateToProps` in `summit-event-list-page` still
assumes `mediaUploadListState` exists, so update the selector to safely handle
an undefined slice during redux-persist rehydration. Use a guarded access or
fallback when reading `mediaUploadListState.media_uploads`, and keep the
existing `currentSummitState` and `currentEventListState` behavior unchanged.
Reference the `mapStateToProps` function and the `mediaUploadTypes` mapping when
making the fix.
🪄 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: a364fb8f-4122-4866-9c5f-03e83177f587
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (24)
package.jsonsrc/actions/__tests__/event-actions.test.jssrc/actions/event-actions.jssrc/components/filters/select-filter-criteria/index.jssrc/components/filters/select-filter-criteria/index.module.lesssrc/components/tables/editable-table/EditableTable.jssrc/components/tables/editable-table/EditableTableHeading.jssrc/components/tables/editable-table/EditableTableRow.jssrc/components/tables/editable-table/__tests__/EditableTable.test.jssrc/components/tables/editable-table/index.module.lesssrc/i18n/en.jsonsrc/pages/events/__tests__/format-event-data.test.jssrc/pages/events/__tests__/summit-event-list-page.test.jssrc/pages/events/summit-event-list-page.jssrc/pages/events/summit-event-list-page/components/ImportMUXModal/index.jsxsrc/pages/events/summit-event-list-page/components/ImportModal/index.jsxsrc/pages/events/summit-event-list-page/helpers.jssrc/pages/events/summit-event-list-page/index.jssrc/reducers/events/event-list-reducer.jssrc/store.jssrc/styles/summit-event-list-page.lesssrc/utils/__tests__/summitUtils.test.jssrc/utils/methods.jssrc/utils/summitUtils.js
💤 Files with no reviewable changes (10)
- src/components/filters/select-filter-criteria/index.module.less
- src/components/tables/editable-table/EditableTable.js
- src/styles/summit-event-list-page.less
- src/components/tables/editable-table/EditableTableHeading.js
- src/utils/tests/summitUtils.test.js
- src/components/tables/editable-table/index.module.less
- src/utils/summitUtils.js
- src/components/tables/editable-table/tests/EditableTable.test.js
- src/components/tables/editable-table/EditableTableRow.js
- src/pages/events/summit-event-list-page.js
🚧 Files skipped from review as they are similar to previous changes (3)
- src/actions/tests/event-actions.test.js
- package.json
- src/components/filters/select-filter-criteria/index.js
* chore: update table * chore: few tweaks * fix: align BulkEditTable with existing actions/sort conventions and fix bulk-save data corruption - Use actions.edit.onClick/actions.delete.onClick (passing the full row) instead of a separate handleDeleteRow prop and a hardcoded history.push, matching the convention used by every other list page in this codebase. - Drop the SORT_ASCENDING/SORT_DESCENDING constants in favor of literal 1/-1, matching openstack-uicore-foundation's own MUI table. - Remove the unused afterUpdate mechanism (dead since media_uploads editing was removed pre-migration). - Rework formatEventData to spread the raw event instead of overwriting real API fields with display strings under the same key. Since BulkEditTable now sends formatEventData's output straight to bulkUpdateEvents, the previous behavior corrupted start_date, end_date, duration, level, streaming_url/meeting_url/etherpad_link, streaming_type, and location on every bulk save, and could crash on tags. Display-only values now live under new keys (speaker_names, track_name, *_display) wired up via column render functions. - Move formatEventData out of summitUtils.js into summit-event-list-page (its only consumer) and relocate its tests accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: removing dead code/features * chore: more fixes and refactors * chore: move BulkEditTable to uicore * fix: update BulkEditTable mock path after move to uicore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0177194 to
7d3a3b2
Compare
ref:https://app.clickup.com/t/86baf0qnm
Summary by CodeRabbit
Summary by CodeRabbit