-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix PNPM Migration, Docker Build Errors #4901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PNPM Migration, Docker Build Errors #4901
Conversation
|
No significant changes currently retry |
Our Pull Request Approval ProcessThis PR will be reviewed according to our: Your PR may be automatically closed if:
Thanks for contributing! |
WalkthroughReorders Docker installs to copy manifests before pnpm install, tightens pnpm flags, adds postinstall and coverage helper scripts, expands pnpm.overrides/peerDependencyRules, converts several dynamic imports to static imports, introduces lazy-loaded PageNotFound with Suspense+Loader, and updates tests for async/lazy behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
194-199: Version mismatch betweenresolutionsandpnpm.overridesfor@apollo/client.The
resolutionsfield (line 195) specifies3.14.0whilepnpm.overrides(line 199) specifies3.13.0. Based on learnings from PR #4743, the3.13.0pin in pnpm.overrides is intentional to avoid deprecation warnings, but theresolutionsfield (used by npm/yarn) still points to3.14.0.Consider aligning these values or adding a comment explaining the intentional discrepancy to avoid confusion for future maintainers.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (6)
docs/docs/auto-docs/App/functions/default.mdis excluded by!**/docs/docs/**docs/docs/auto-docs/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister/functions/default.mdis excluded by!**/docs/docs/**docs/docs/auto-docs/components/SecuredRoute/SecuredRoute/functions/default.mdis excluded by!**/docs/docs/**docs/docs/auto-docs/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser/functions/default.mdis excluded by!**/docs/docs/**docs/docs/auto-docs/plugin/managers/lifecycle/classes/LifecycleManager.mdis excluded by!**/docs/docs/**docs/docs/auto-docs/screens/PluginStore/hooks/usePluginActions/functions/usePluginActions.mdis excluded by!**/docs/docs/**
📒 Files selected for processing (13)
docker/Dockerfile.deploy(1 hunks)docker/Dockerfile.dev(1 hunks)docker/Dockerfile.prod(1 hunks)package.json(1 hunks)src/App.tsx(3 hunks)src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx(1 hunks)src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx(3 hunks)src/components/SecuredRoute/SecuredRoute.tsx(2 hunks)src/components/SecuredRoute/securedRoute.spec.tsx(4 hunks)src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx(2 hunks)src/plugin/managers/lifecycle.ts(1 hunks)src/screens/PluginStore/hooks/usePluginActions.spec.ts(1 hunks)src/screens/PluginStore/hooks/usePluginActions.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (48)
📓 Common learnings
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
📚 Learning: 2025-03-11T17:45:54.621Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/components/SecuredRoute/SecuredRoute.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx
📚 Learning: 2025-10-22T22:22:27.696Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-02-06T20:56:05.378Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3491
File: src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx:34-43
Timestamp: 2025-02-06T20:56:05.378Z
Learning: In SecuredRouteForUser component, token updates between role switches (e.g., user to superAdmin) are better handled using separate useEffect hooks - one for initial token setup (empty deps) and another for refetch on token changes, rather than combining them into a single effect.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/SecuredRoute/SecuredRoute.tsxsrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsxsrc/App.tsx
📚 Learning: 2024-11-11T07:47:39.266Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2425
File: src/screens/MemberDetail/MemberDetail.test.tsx:100-100
Timestamp: 2024-11-11T07:47:39.266Z
Learning: In `src/screens/MemberDetail/MemberDetail.test.tsx`, using `await wait();` is acceptable to wait for the render to complete.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-21T12:42:24.884Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4718
File: src/components/EventManagement/Dashboard/EventDashboard.mocks.ts:83-114
Timestamp: 2025-11-21T12:42:24.884Z
Learning: In talawa-admin mock files (e.g., EventDashboard.mocks.ts), mock constant names must accurately reflect what they test. Mock names suggesting role-based logic (e.g., MOCKS_WITH_ADMIN_ROLE) are misleading when the component derives role from localStorage rather than mock data. Name mocks based on their distinguishing data features (e.g., MOCKS_WITH_SINGLE_ATTENDEE) or test context (e.g., MOCKS_FOR_ADMIN_STORAGE_TEST).
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T16:02:31.790Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4882
File: src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx:69-109
Timestamp: 2025-11-28T16:02:31.790Z
Learning: In Talawa Admin test files (e.g., src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx), developers prefer keeping date/time mocks (like vi.spyOn(Date.prototype, 'toLocaleDateString')) inline within individual test cases rather than consolidating them in beforeEach blocks, to maintain clarity and keep mocks close to the tests that use them, even if it results in some duplication.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-12-22T17:58:17.818Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 2718
File: src/screens/UserPortal/Settings/Settings.spec.tsx:0-0
Timestamp: 2024-12-22T17:58:17.818Z
Learning: The matchMedia mock implementation in `Settings.spec.tsx` no longer includes the deprecated addListener and removeListener methods, opting solely for addEventListener and removeEventListener.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-10-30T12:01:40.366Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTagMockComponents/MockAddPeopleToTag.tsx:1-28
Timestamp: 2024-10-30T12:01:40.366Z
Learning: In the `MockAddPeopleToTag` component in `src/screens/ManageTag/ManageTagMockComponents/MockAddPeopleToTag.tsx`, it's acceptable to implement only the necessary props from `InterfaceAddPeopleToTagProps` and omit others like `refetchAssignedMembersData`, `t`, and `tCommon` that are tested separately.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/App.tsx
📚 Learning: 2025-04-20T06:45:57.175Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:403-421
Timestamp: 2025-04-20T06:45:57.175Z
Learning: In the talawa-admin project, the Advertisement component tests (3 files) use both ApolloProvider and MockedProvider together, though it's not a widespread pattern in the codebase. The maintainer has confirmed this approach is needed for these specific tests.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx
📚 Learning: 2025-01-26T12:32:45.867Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/Organizations/Organizations.spec.tsx:19-19
Timestamp: 2025-01-26T12:32:45.867Z
Learning: In React test files, avoid using React hooks outside component scope (including in static objects like mock data). Instead, initialize hooks inside describe blocks or extract the needed functionality without using hooks.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-01-25T15:26:50.796Z
Learnt from: NishantSinghhhhh
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/UserScreen/UserScreen.spec.tsx:25-25
Timestamp: 2025-01-25T15:26:50.796Z
Learning: In test files, use the native localStorage API (localStorage.setItem/getItem) instead of React hooks for managing localStorage, as hooks can only be used within React components or custom hooks.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx
📚 Learning: 2024-11-27T06:37:47.871Z
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2482
File: src/components/AddOn/support/components/Action/Action.spec.tsx:1-8
Timestamp: 2024-11-27T06:37:47.871Z
Learning: In the Talawa-Admin project, the `testing-library/jest-dom` package is imported globally in `vitest.setup.ts`, so individual test files do not need to import it separately.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-01-26T12:47:50.063Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx:0-0
Timestamp: 2025-01-26T12:47:50.063Z
Learning: In the talawa-admin project, tests must use the custom `useLocalStorage` hook from 'utils/useLocalstorage' instead of the native localStorage API, as the test environment doesn't have direct access to browser's localStorage.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-02-20T13:35:01.218Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3712
File: src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx:113-127
Timestamp: 2025-02-20T13:35:01.218Z
Learning: In React component tests, when testing window resize event handling, it's acceptable to only verify that the event is properly triggered without assertions if the test's focus is specifically on event handling rather than responsive behavior. Testing the actual responsive rendering would be a separate test case.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-10-28T07:52:31.982Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2362
File: src/components/TagActions/TagActions.test.tsx:30-36
Timestamp: 2024-10-28T07:52:31.982Z
Learning: In our unit tests (e.g., `TagActions.test.tsx`), we use `setTimeout` with `act` to wait for asynchronous operations, as it provides a consistent wait time and is our standard practice.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-04-27T10:40:06.736Z
Learnt from: MayankJha014
Repo: PalisadoesFoundation/talawa-admin PR: 3946
File: src/components/UserPortal/ChatRoom/ChatRoom.spec.tsx:5708-5743
Timestamp: 2025-04-27T10:40:06.736Z
Learning: For testing async React components with loading states, using manually controlled promises (via a deferred pattern with explicit resolve function) is preferred over fake timers when the code under test doesn't rely on timer-based functions. This approach allows precise control over the promise resolution timing to test different component states.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-11-17T22:18:09.680Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-17T22:18:09.680Z
Learning: Talawa Admin Phase 2A testing guideline: Allow vi.hoisted() + vi.mock() module-level mocks for shared dependencies; prefer afterEach(() => vi.clearAllMocks()) as default cleanup. Use afterEach(() => vi.restoreAllMocks()) only in suites that create vi.spyOn spies or patch real implementations. Avoid vi.resetAllMocks() globally. The generic “no module-level mocks” rule is updated to “no module-level vi.fn except vi.hoisted module mocks.”
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsxsrc/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-09-29T06:51:31.295Z
Learnt from: Doraemon012
Repo: PalisadoesFoundation/talawa-admin PR: 1988
File: src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx:282-282
Timestamp: 2024-09-29T06:51:31.295Z
Learning: In the test 'Component should be rendered properly' within 'Testing LeftDrawerOrg component for SUPERADMIN', setting 'SuperAdmin' to false is intentional.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-04-27T04:35:39.472Z
Learnt from: MayankJha014
Repo: PalisadoesFoundation/talawa-admin PR: 3946
File: src/components/UserPortal/ChatRoom/ChatRoom.spec.tsx:0-0
Timestamp: 2025-04-27T04:35:39.472Z
Learning: In the talawa-admin codebase tests, to check whether toast notifications were called, use the imported toast object directly with waitFor (e.g., `expect(toast.error).toHaveBeenCalled()`). Do not use require() style imports within test assertions.
Applied to files:
src/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-12-22T07:43:26.168Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 2680
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:528-712
Timestamp: 2024-12-22T07:43:26.168Z
Learning: You prefer to keep migrated tests even if they appear duplicated because they originated from the old AdvertisementEntry.test.tsx file.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx
📚 Learning: 2025-04-18T23:53:36.302Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/Advertisements.spec.tsx:310-525
Timestamp: 2025-04-18T23:53:36.302Z
Learning: In the Advertisements component tests, there are separate test cases for searching/filtering by advertisement name and advertisement description, both of which are necessary to ensure complete coverage of the search functionality.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx
📚 Learning: 2025-10-22T22:00:53.943Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:0-0
Timestamp: 2025-10-22T22:00:53.943Z
Learning: In src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts (and similar mock files), avoid duplicating identical Apollo MockedProvider mocks for repeated query consumption. Prefer adding `maxUsageCount` to the existing mock or using `newData` for reusable responses to keep tests deterministic and reduce drift.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-01-15T05:39:30.480Z
Learnt from: arpit-chakraborty
Repo: PalisadoesFoundation/talawa-admin PR: 3158
File: src/screens/OrganizationTags/OrganizationTagsMocks.ts:384-524
Timestamp: 2025-01-15T05:39:30.480Z
Learning: In OrganizationTagsMocks.ts, MOCKS_NULL_END_CURSOR and MOCKS_NO_MORE_PAGES are designed to test UI handling of edge cases where pagination data is inconsistent (e.g., hasNextPage is true but endCursor is null, or next page returns undefined data).
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx
📚 Learning: 2025-11-12T00:28:53.713Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:43:28.525Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:41-42
Timestamp: 2025-04-20T06:43:28.525Z
Learning: The developer has determined that explicit restoration of the global.URL.createObjectURL mock is not required in the Talawa Admin test suite, as the existing vi.restoreAllMocks() in afterEach blocks is considered sufficient for their testing needs.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-11T11:51:09.236Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-11T11:51:09.236Z
Learning: In talawa-admin PR #4664 (continuation of PR #4565 sharding work), global mock cleanup was implemented via vi.clearAllMocks() in vitest.setup.ts afterEach, along with Apollo Client warning suppression (temporary, pending follow-up PR) and test suite refactoring to per-test StaticMockLink instances. This test isolation strategy addresses mock state leakage that forced maxConcurrency: 1 in PR #4565, enabling future parallel test execution improvements and 3-4x speedup potential.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:44:34.458Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:41-42
Timestamp: 2025-04-20T06:44:34.458Z
Learning: Mock restoration of global.URL.createObjectURL is managed through the existing vi.restoreAllMocks() calls in the afterEach blocks, which is the developer's preferred approach for handling test cleanup.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx
📚 Learning: 2025-03-11T17:23:01.696Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/utils/useSession.tsx:29-30
Timestamp: 2025-03-11T17:23:01.696Z
Learning: In the useSession.tsx file, there's a commented-out session access hook that should remain in the codebase as an implementation example, but it's commented out to avoid unnecessary data fetching when the session data isn't immediately needed.
Applied to files:
src/components/SecuredRoute/SecuredRoute.tsx
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
docker/Dockerfile.proddocker/Dockerfile.devdocker/Dockerfile.deploypackage.json
📚 Learning: 2025-01-31T14:05:10.575Z
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 3496
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2025-01-31T14:05:10.575Z
Learning: The talawa-admin repository standardizes on Node.js v22.x across all workflows and documentation.
Applied to files:
docker/Dockerfile.prod
📚 Learning: 2024-11-01T12:54:20.857Z
Learnt from: GlenDsza
Repo: PalisadoesFoundation/talawa-admin PR: 2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T22:51:12.224Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T22:51:12.224Z
Learning: In talawa-admin PR #4826, mock cleanup implementation uses global vi.clearAllMocks() in vitest.setup.ts afterEach hook, combined with proper vi.hoisted() usage for module-level mocks. This strategy successfully achieved test isolation across 273 test files, passing the mock cleanup checker script with exit code 0. The implementation is ready for increasing maxConcurrency from conservative settings (CI: 1, local: 2) to higher concurrency levels (recommended gradual rollout: CI 1→2→4, local 2→4→8) to achieve Phase 2A goals of 2.3-2.5x speedup. Global cleanup strategy eliminates need for explicit afterEach blocks in every individual test file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-02-14T21:04:11.392Z
Learnt from: JaiPannu-IITI
Repo: PalisadoesFoundation/talawa-admin PR: 3592
File: src/components/UserPortal/ChatRoom/ChatRoom.tsx:23-23
Timestamp: 2025-02-14T21:04:11.392Z
Learning: The codebase is being refactored in alphabetical order, with components up to LoginPortalToggle already updated. Temporary type coexistence is maintained to prevent breaking changes until all related components are refactored.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx
📚 Learning: 2024-10-30T13:38:29.300Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTag.tsx:58-97
Timestamp: 2024-10-30T13:38:29.300Z
Learning: In the `ManageTag` component (`src/screens/ManageTag/ManageTag.tsx`), extracting modal state management to a custom hook may require additional state modifications for the `toggle` and `show` functions.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/App.tsx
📚 Learning: 2025-04-13T10:14:43.885Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx:80-105
Timestamp: 2025-04-13T10:14:43.885Z
Learning: In the Advertisement component, separate GraphQL queries with different isCompleted flags (true and false) are intentionally used to maintain separate state collections for active and completed advertisements.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-11-08T18:14:54.607Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4622
File: src/screens/OrgPost/OrgPost.tsx:109-122
Timestamp: 2025-11-08T18:14:54.607Z
Learning: In src/screens/OrgPost/OrgPost.tsx, the refetchPinnedPosts function from the ORGANIZATION_PINNED_POST_LIST query is intentionally left commented out because the entire page is set to reload when posts are deleted, unpinned, or pinned, making a separate refetch unnecessary.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-30T13:18:56.627Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/OrganizationTags/OrganizationTags.tsx:350-376
Timestamp: 2024-10-30T13:18:56.627Z
Learning: In the `src/screens/OrganizationTags/OrganizationTags.tsx` file, the `OrganizationTags` component uses chunk size with the `InfiniteScroll` component and an outer parent div for handling data loading and scrolling.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/App.tsx
📚 Learning: 2025-11-24T08:30:07.940Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Applied to files:
package.json
📚 Learning: 2025-11-13T18:07:48.621Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Applied to files:
package.json
📚 Learning: 2024-10-28T09:10:06.112Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2362
File: src/components/TagActions/TagNode.tsx:79-109
Timestamp: 2024-10-28T09:10:06.112Z
Learning: In the `TagNode` component at `src/components/TagActions/TagNode.tsx`, the infinite scroll component efficiently manages the calls to `loadMoreSubTags`, preventing multiple simultaneous requests.
Applied to files:
src/App.tsx
📚 Learning: 2024-10-30T13:29:28.310Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTag.tsx:113-147
Timestamp: 2024-10-30T13:29:28.310Z
Learning: In the `src/screens/ManageTag/ManageTag.tsx` file, the `InfiniteScroll` component uses the `loadMoreAssignedMembers` function efficiently, and additional error handling is unnecessary.
Applied to files:
src/App.tsx
📚 Learning: 2024-11-02T07:38:14.044Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2398
File: src/screens/ManageTag/ManageTag.tsx:263-0
Timestamp: 2024-11-02T07:38:14.044Z
Learning: In `src/screens/ManageTag/ManageTag.tsx`, `currentTagName` is guaranteed to be non-empty when constructing the `orgUserTagAncestors` array for breadcrumbs.
Applied to files:
src/App.tsx
📚 Learning: 2024-10-30T15:19:01.064Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTag.tsx:470-498
Timestamp: 2024-10-30T15:19:01.064Z
Learning: In `src/screens/ManageTag/ManageTag.tsx`, the `DataGrid` component uses infinite scroll via `react-infinite-scroll`, and page-based pagination provided by `DataGrid` is not used.
Applied to files:
src/App.tsx
📚 Learning: 2024-11-02T07:39:51.950Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2398
File: src/screens/ManageTag/ManageTag.tsx:108-0
Timestamp: 2024-11-02T07:39:51.950Z
Learning: In `src/screens/ManageTag/ManageTag.tsx`, when `assignedMemberSearchFirstName` or `assignedMemberSearchLastName` are empty strings, the query in the `useQuery` for `USER_TAGS_ASSIGNED_MEMBERS` intentionally includes filters with empty strings to match all entries.
Applied to files:
src/App.tsx
📚 Learning: 2024-10-30T15:46:05.784Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/components/AddPeopleToTag/AddPeopleToTag.tsx:78-104
Timestamp: 2024-10-30T15:46:05.784Z
Learning: In `src/components/AddPeopleToTag/AddPeopleToTag.tsx`, and similar components, the team prefers to keep the current implementation of the `updateQuery` logic in infinite scroll functionality consistent across all screens.
Applied to files:
src/App.tsx
📚 Learning: 2024-10-25T19:31:37.405Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2355
File: src/screens/ManageTag/ManageTagMocks.ts:187-269
Timestamp: 2024-10-25T19:31:37.405Z
Learning: In `src/screens/ManageTag/ManageTagMocks.ts`, when mocking data for `USER_TAGS_ASSIGNED_MEMBERS` and `USER_TAGS_MEMBERS_TO_ASSIGN_TO`, it's acceptable for user IDs to overlap because the queries serve different purposes and the overlapping IDs can represent realistic scenarios in tests.
Applied to files:
src/App.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (11)
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx (1)
26-34: PageNotFound mock cleanly isolates tests from lazy-loadingMocking
screens/PageNotFound/PageNotFoundwith a simple 404 layout avoids React.lazy/Suspense complexity in this suite while still asserting the correct UX text. This fits the existing testing pattern and looks good.src/plugin/managers/lifecycle.ts (1)
11-11: Static registry import maintains existing behavior and simplifies control flowUsing a top-level import for
registerPluginDynamicallyand invoking it inupdateExtensionPointspreserves the previous behavior (including error handling andplugin:loadedemission) while removing the dynamic import overhead. This is consistent with the broader move away from mixed static/dynamic imports.Also applies to: 352-371
src/screens/PluginStore/hooks/usePluginActions.ts (1)
12-15: Static AdminPluginFileService import is appropriate for uninstall workflowSwitching to a top-level
adminPluginFileServiceimport and callingremovePlugindirectly keeps the uninstall flow and error handling intact while eliminating the dynamic import, matching the rest of the plugin-related refactors.src/components/SecuredRoute/securedRoute.spec.tsx (1)
3-3: SecuredRoute test correctly adapted for lazy-loaded PageNotFoundImporting
waitFor, mockingscreens/PageNotFound/PageNotFound, and awaiting the marker text in the authenticated non-admin test makes the assertion robust against React.lazy/Suspense while keeping the authorization behavior checks intact.Also applies to: 16-25, 80-99
src/App.tsx (1)
15-15: Plugin initialization and lazy 404 route refactor are consistent and well-orderedCalling
discoverAndRegisterAllPluginsfrom the existing startup effect afterinitializePluginSystem()preserves the intended plugin bootstrap sequence while removing the earlier dynamic import. DefiningLazyPageNotFoundand using it in a Suspense-wrapped catch‑all route cleanly aligns the 404 behavior with the new lazy-loading pattern andLoaderfallback.Also applies to: 105-107, 145-162, 341-348
src/screens/PluginStore/hooks/usePluginActions.spec.ts (1)
411-422: AdminPluginFileService mock must be hoisted to affect the static import in usePluginActionsCalling
vi.mock()inside the test block cannot reliably override the static import ofadminPluginFileServicethat is already bound whenusePluginActionsis imported at module scope. This test risks calling the realremovePluginimplementation instead of your mock, defeating the failure-path test.Follow Phase 2A guidelines: hoist the mock and
vi.mock()call outside the test, then configure mock behavior per-test inside theitblock:
- Add near the top-level hoisted mocks:
const mockAdminPluginFileService = vi.hoisted(() => ({ removePlugin: vi.fn(), })); vi.mock('path/to/AdminPluginFileService', () => ({ adminPluginFileService: mockAdminPluginFileService, }));
- Update the test to configure, not re-mock:
+ mockAdminPluginFileService.removePlugin.mockResolvedValue(false);This ensures
usePluginActionsreceives the hoisted mock and the failure path is properly exercised.package.json (1)
217-235: LGTM - peer dependency rules and build dependencies configuration.The
peerDependencyRulescorrectly addresses React version mismatch warnings from form-render, rc-color-picker, virtualizedtableforantd4, and PDFMe-related packages. TheonlyBuiltDependenciesappropriately whitelists packages that require build scripts (esbuild, @parcel/watcher, core-js, cypress, sharp), resolving the pnpm warnings without disabling security features globally.src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx (2)
35-36: LGTM - Lazy loading for PageNotFound.The lazy import pattern correctly addresses the Vite static/dynamic import conflict. The comment clearly explains the reasoning.
108-116: Unnecessary fragment wrapper.The outer fragment (
<>...</>) is not needed since the ternary already returns a single element in each branch.Apply this diff:
return isLoggedIn === 'TRUE' ? ( - <> - {adminFor === null ? ( - <Outlet /> - ) : ( - <Suspense fallback={<Loader />}> - <PageNotFound /> - </Suspense> - )} - </> + adminFor === null ? ( + <Outlet /> + ) : ( + <Suspense fallback={<Loader />}> + <PageNotFound /> + </Suspense> + ) ) : ( <Navigate to="/" replace /> );⛔ Skipped due to learnings
Learnt from: PurnenduMIshra129th Repo: PalisadoesFoundation/talawa-admin PR: 3491 File: src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx:34-43 Timestamp: 2025-02-06T20:56:05.378Z Learning: In SecuredRouteForUser component, token updates between role switches (e.g., user to superAdmin) are better handled using separate useEffect hooks - one for initial token setup (empty deps) and another for refetch on token changes, rather than combining them into a single effect.Learnt from: meetulr Repo: PalisadoesFoundation/talawa-admin PR: 2398 File: src/components/TagActions/TagActions.tsx:367-0 Timestamp: 2024-11-02T07:32:43.099Z Learning: In `src/components/TagActions/TagActions.tsx`, fragments around parentheses in the ancestor tags display are acceptable and should not be flagged as unnecessary.src/components/SecuredRoute/SecuredRoute.tsx (1)
38-39: LGTM - Consistent lazy loading pattern.The lazy import for PageNotFound is consistent with the pattern applied in SecuredRouteForUser.tsx and correctly addresses the Vite static/dynamic import conflict.
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx (1)
67-68: LGTM - Lazy loading pattern.The lazy import for PageNotFound follows the same pattern as other components in this PR.
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
package.json (2)
198-257: Consolidate duplicate overrides entries—remove redundant standalone "overrides" section.The pnpm-specific overrides are defined twice: once under
pnpm.overrides(lines 198–216) and again under a top-leveloverridesobject (lines 240–257). This duplication creates maintenance burden and potential inconsistency. Since this is a pnpm-managed workspace, centralize all version overrides underpnpm.overridesand remove the redundant standaloneoverridessection.- "overrides": { - "@types/react": "^19.1.1", - "@types/react-dom": "^19.1.1", - "whatwg-url": "^14.0.0", - "core-js": "^3.40.0", - "sync-fetch": "npm:@ardatan/[email protected]", - "rc-color-picker": { - "react": "^19.1.0", - "react-dom": "^19.1.0" - }, - "virtualizedtableforantd4": { - "react": "^19.1.0", - "react-dom": "^19.1.0" - }, - "gulp-header": "^2.0.9", - "rimraf": "^6.1.2", - "glob": "^13.0.0" - },Then add the remaining entries (like
gulp-header,rimraf) topnpm.overridesif not already present, and update theresolutionsfield to reflect the final pinned versions.
8-8: Pin Apollo Client to 3.13.0 across package.json—update lines 8, 195, and 199.Apollo Client 3.14.0 reintroduces addTypename deprecation warnings that intentionally repeat in test environments and interfere with debugging. Pinning to 3.13.0 avoids this regression while the codebase prepares for Apollo 4.x. Dependency conflicts with apollo-upload-client and apollo/link-error currently block the 4.x upgrade; maintain 3.13.0 until those blockers resolve.
- "@apollo/client": "3.14.0", + "@apollo/client": "3.13.0",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
docker/Dockerfile.deploy(1 hunks)package.json(1 hunks)src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx(3 hunks)src/components/SecuredRoute/SecuredRoute.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
📚 Learning: 2025-11-24T08:30:07.940Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Applied to files:
package.json
📚 Learning: 2025-11-13T18:07:48.621Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Applied to files:
package.json
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
package.jsondocker/Dockerfile.deploy
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
package.json
📚 Learning: 2025-04-13T10:14:43.885Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.tsx:80-105
Timestamp: 2025-04-13T10:14:43.885Z
Learning: In the Advertisement component, separate GraphQL queries with different isCompleted flags (true and false) are intentionally used to maintain separate state collections for active and completed advertisements.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-02-14T21:04:11.392Z
Learnt from: JaiPannu-IITI
Repo: PalisadoesFoundation/talawa-admin PR: 3592
File: src/components/UserPortal/ChatRoom/ChatRoom.tsx:23-23
Timestamp: 2025-02-14T21:04:11.392Z
Learning: The codebase is being refactored in alphabetical order, with components up to LoginPortalToggle already updated. Temporary type coexistence is maintained to prevent breaking changes until all related components are refactored.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-30T15:46:05.784Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/components/AddPeopleToTag/AddPeopleToTag.tsx:78-104
Timestamp: 2024-10-30T15:46:05.784Z
Learning: In `src/components/AddPeopleToTag/AddPeopleToTag.tsx`, and similar components, the team prefers to keep the current implementation of the `updateQuery` logic in infinite scroll functionality consistent across all screens.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-01-26T12:32:45.867Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/Organizations/Organizations.spec.tsx:19-19
Timestamp: 2025-01-26T12:32:45.867Z
Learning: In React test files, avoid using React hooks outside component scope (including in static objects like mock data). Instead, initialize hooks inside describe blocks or extract the needed functionality without using hooks.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-02-06T20:56:05.378Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3491
File: src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx:34-43
Timestamp: 2025-02-06T20:56:05.378Z
Learning: In SecuredRouteForUser component, token updates between role switches (e.g., user to superAdmin) are better handled using separate useEffect hooks - one for initial token setup (empty deps) and another for refetch on token changes, rather than combining them into a single effect.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/components/SecuredRoute/SecuredRoute.tsx
📚 Learning: 2024-11-02T07:32:43.099Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2398
File: src/components/TagActions/TagActions.tsx:367-0
Timestamp: 2024-11-02T07:32:43.099Z
Learning: In `src/components/TagActions/TagActions.tsx`, fragments around parentheses in the ancestor tags display are acceptable and should not be flagged as unnecessary.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/components/SecuredRoute/SecuredRoute.tsx
📚 Learning: 2025-03-11T17:45:54.621Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/components/SecuredRoute/SecuredRoute.tsx
📚 Learning: 2024-10-28T08:27:38.508Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2362
File: src/components/TagActions/TagActions.tsx:248-249
Timestamp: 2024-10-28T08:27:38.508Z
Learning: In the `TagActions` component at `src/components/TagActions/TagActions.tsx`, error handling for the `assignToTags` and `removeFromTags` mutation hooks is already implemented, with errors being caught and displayed to the user via toast notifications.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-28T06:51:05.867Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2362
File: src/components/TagActions/TagActions.tsx:110-147
Timestamp: 2024-10-28T06:51:05.867Z
Learning: When handling the `useEffect` hooks for `addAncestorTagsData` and `removeAncestorTagsData` in `TagActions.tsx`, it's preferred to keep them separate to avoid confusion and enhance readability.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsxsrc/components/SecuredRoute/SecuredRoute.tsx
📚 Learning: 2025-11-25T16:00:05.134Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4815
File: src/screens/OrgPost/Posts.tsx:73-122
Timestamp: 2025-11-25T16:00:05.134Z
Learning: In the PostCard component refactoring (PR #4815), media functionality (upload/update/rendering) is currently not functional. The type safety improvements for handling InterfacePost vs PostNode in src/screens/OrgPost/Posts.tsx renderPostCard function should be implemented when media functionality is fixed.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-08-20T18:04:43.560Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4094
File: src/screens/OrgList/OrgList.tsx:81-0
Timestamp: 2025-08-20T18:04:43.560Z
Learning: In src/screens/OrgList/OrgList.tsx, the useDebounce hook implementation is kept inline rather than extracted to a utilities file because the pagination logic was directly extracted from the user's orglist page without modifications to maintain consistency between the admin and user implementations.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-30T13:38:29.300Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTag.tsx:58-97
Timestamp: 2024-10-30T13:38:29.300Z
Learning: In the `ManageTag` component (`src/screens/ManageTag/ManageTag.tsx`), extracting modal state management to a custom hook may require additional state modifications for the `toggle` and `show` functions.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-11-08T18:14:54.607Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4622
File: src/screens/OrgPost/OrgPost.tsx:109-122
Timestamp: 2025-11-08T18:14:54.607Z
Learning: In src/screens/OrgPost/OrgPost.tsx, the refetchPinnedPosts function from the ORGANIZATION_PINNED_POST_LIST query is intentionally left commented out because the entire page is set to reload when posts are deleted, unpinned, or pinned, making a separate refetch unnecessary.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-10-30T13:18:56.627Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/OrganizationTags/OrganizationTags.tsx:350-376
Timestamp: 2024-10-30T13:18:56.627Z
Learning: In the `src/screens/OrganizationTags/OrganizationTags.tsx` file, the `OrganizationTags` component uses chunk size with the `InfiniteScroll` component and an outer parent div for handling data loading and scrolling.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2025-08-20T18:04:34.194Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4094
File: src/screens/OrgList/OrgList.tsx:409-0
Timestamp: 2025-08-20T18:04:34.194Z
Learning: In PR #4094, the pagination logic in src/screens/OrgList/OrgList.tsx was directly extracted from the user's orglist page without modification for initial implementation, with plans to refactor for consistency later.
Applied to files:
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
📚 Learning: 2024-11-20T11:32:56.672Z
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Applied to files:
docker/Dockerfile.deploy
📚 Learning: 2025-03-11T17:23:01.696Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/utils/useSession.tsx:29-30
Timestamp: 2025-03-11T17:23:01.696Z
Learning: In the useSession.tsx file, there's a commented-out session access hook that should remain in the codebase as an implementation example, but it's commented out to avoid unnecessary data fetching when the session data isn't immediately needed.
Applied to files:
src/components/SecuredRoute/SecuredRoute.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Performs linting, formatting, type-checking, unused file detection, checking for different source...
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (4)
docker/Dockerfile.deploy (1)
15-19: ✓ Docker layer optimization is appropriate.The separation of
COPY(line 15) andRUN(lines 17-19) is optimal for Docker layer caching—changes to source code don't invalidate the dependency layer. The combined corepack and pnpm install in a singleRUNis correct; further combining withCOPYwould harm cacheability on code changes.Regarding the past review's suggestion to combine lines into one RUN: that feedback prioritized reducing total layers, but your current structure prioritizes rebuild performance via layer reuse, which is the preferable tradeoff for this Dockerfile.
package.json (2)
229-235: Confirm onlyBuiltDependencies aligns with Dockerfile build settings.The
onlyBuiltDependencieswhitelist should match the intent of the.npmrcand.pnpm-workspace.yamlupdates mentioned in the PR summary. Verify that--frozen-lockfileand--reporter=append-onlyin the Dockerfiles (dev, prod, deploy) are not suppressed by this configuration, and that the build succeeds in CI without warnings.
217-235: Consider whether platform-specific binary dependencies like Rollup should be inoptionalDependenciesinstead.The current
onlyBuiltDependencieslist (esbuild, @parcel/watcher, core-js, cypress, sharp) may be appropriate for those packages, but platform-specific native binaries—particularly Rollup variants likerollup-win32-x64-msvc—should typically be managed asoptionalDependenciesto prevent EBADPLATFORM errors on CI runners that don't match the target platform. Verify that Rollup and any other platform-specific binaries are not indevDependenciesand are properly declared as optional if used selectively.src/components/SecuredRoute/SecuredRoute.tsx (1)
34-35: LazyPageNotFound+Loaderwiring looks correct and keeps auth behavior intact.The new
Loaderimport,React.lazydefinition forPageNotFound, and the Suspense-wrapped unauthorized branch preserve the existingisLoggedIn/role === 'administrator'logic while deferring the not-found bundle and showing a spinner during load. No issues spotted with the updated control flow or JSX structure.Please rerun the existing SecuredRoute tests (e.g.,
SecuredRoute.spec.tsx) to confirm unauthorized-role navigation and redirect behavior remain unchanged with the lazy-loadedPageNotFound.Also applies to: 38-39, 106-113
src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/plugin/tests/managers/lifecycle.spec.ts (2)
420-443: LGTM: standardized registration error mock in toggle status testUsing a shared
registrationErrorinstance and throwing it fromregisterExtensionPointswhile asserting the same object in the console error keeps this test deterministic and easier to reason about, without changing behavior. You might optionally rename the test description to mentionregisterExtensionPoints(or activation failure) to better reflect what’s being exercised, but that’s purely cosmetic.
1167-1197: LGTM: static registry mock for dynamic registration pathsSwitching to
registryMocks.registerPluginDynamicallyfor both success and failure cases correctly mirrors the new static import inlifecycle.ts, and resetting the mock to a resolved state after the failure test avoids subtle cross-test coupling. For even tighter coverage, you could also assert thatregisterPluginDynamicallyis called with the expected plugin ID (and manifest) in the success test, but the current expectations are functionally sound.src/screens/PluginStore/hooks/usePluginActions.spec.ts (1)
106-106: Consider removing redundantvi.restoreAllMocks().Per Phase 2A guidelines,
vi.restoreAllMocks()should only be used when the suite createsvi.spyOnspies or patches real implementations. This file uses module-level mocks controlled viavi.hoisted()andmockReturnValue, which are properly cleaned up by the globalvi.clearAllMocks()invitest.setup.ts.The
window.locationmock is already restored inafterAll(line 55-59), so this cleanup is redundant:afterEach(() => { - vi.restoreAllMocks(); });Note: Keeping it is not harmful and may be defensive for future changes.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
cypress.config.ts(1 hunks)src/App.spec.tsx(3 hunks)src/components/SecuredRoute/securedRoute.spec.tsx(4 hunks)src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx(10 hunks)src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx(2 hunks)src/plugin/tests/managers/lifecycle.spec.ts(4 hunks)src/screens/PluginStore/hooks/usePluginActions.spec.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (38)
📓 Common learnings
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-11T11:51:09.236Z
Learning: In talawa-admin PR #4664 (continuation of PR #4565 sharding work), global mock cleanup was implemented via vi.clearAllMocks() in vitest.setup.ts afterEach, along with Apollo Client warning suppression (temporary, pending follow-up PR) and test suite refactoring to per-test StaticMockLink instances. This test isolation strategy addresses mock state leakage that forced maxConcurrency: 1 in PR #4565, enabling future parallel test execution improvements and 3-4x speedup potential.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-06T05:15:51.829Z
Learning: In talawa-admin PR #4565, test sharding implementation achieved 2x speedup (8min → 4min) with conservative settings (maxConcurrency: 1, concurrent: false, maxThreads: 2 in CI) due to test isolation issues across 269 test files. These settings prevent OOM and race conditions. Higher speedup (3-4x) is achievable but requires systematic test isolation improvements. Apollo Client addTypename={false} deprecation warnings (142 files) are suppressed with TODO for follow-up fixes.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
📚 Learning: 2025-02-06T20:56:05.378Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3491
File: src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx:34-43
Timestamp: 2025-02-06T20:56:05.378Z
Learning: In SecuredRouteForUser component, token updates between role switches (e.g., user to superAdmin) are better handled using separate useEffect hooks - one for initial token setup (empty deps) and another for refetch on token changes, rather than combining them into a single effect.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsxsrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-03-11T17:45:54.621Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsxsrc/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-01-25T15:26:50.796Z
Learnt from: NishantSinghhhhh
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/UserScreen/UserScreen.spec.tsx:25-25
Timestamp: 2025-01-25T15:26:50.796Z
Learning: In test files, use the native localStorage API (localStorage.setItem/getItem) instead of React hooks for managing localStorage, as hooks can only be used within React components or custom hooks.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxcypress.config.tssrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-11-01T12:54:20.857Z
Learnt from: GlenDsza
Repo: PalisadoesFoundation/talawa-admin PR: 2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-12-22T17:58:17.818Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 2718
File: src/screens/UserPortal/Settings/Settings.spec.tsx:0-0
Timestamp: 2024-12-22T17:58:17.818Z
Learning: The matchMedia mock implementation in `Settings.spec.tsx` no longer includes the deprecated addListener and removeListener methods, opting solely for addEventListener and removeEventListener.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsx
📚 Learning: 2025-11-17T22:18:09.680Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-17T22:18:09.680Z
Learning: Talawa Admin Phase 2A testing guideline: Allow vi.hoisted() + vi.mock() module-level mocks for shared dependencies; prefer afterEach(() => vi.clearAllMocks()) as default cleanup. Use afterEach(() => vi.restoreAllMocks()) only in suites that create vi.spyOn spies or patch real implementations. Avoid vi.resetAllMocks() globally. The generic “no module-level mocks” rule is updated to “no module-level vi.fn except vi.hoisted module mocks.”
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/plugin/tests/managers/lifecycle.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-11-28T22:51:12.224Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T22:51:12.224Z
Learning: In talawa-admin PR #4826, mock cleanup implementation uses global vi.clearAllMocks() in vitest.setup.ts afterEach hook, combined with proper vi.hoisted() usage for module-level mocks. This strategy successfully achieved test isolation across 273 test files, passing the mock cleanup checker script with exit code 0. The implementation is ready for increasing maxConcurrency from conservative settings (CI: 1, local: 2) to higher concurrency levels (recommended gradual rollout: CI 1→2→4, local 2→4→8) to achieve Phase 2A goals of 2.3-2.5x speedup. Global cleanup strategy eliminates need for explicit afterEach blocks in every individual test file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/plugin/tests/managers/lifecycle.spec.tssrc/App.spec.tsx
📚 Learning: 2025-11-28T16:02:31.790Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4882
File: src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx:69-109
Timestamp: 2025-11-28T16:02:31.790Z
Learning: In Talawa Admin test files (e.g., src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx), developers prefer keeping date/time mocks (like vi.spyOn(Date.prototype, 'toLocaleDateString')) inline within individual test cases rather than consolidating them in beforeEach blocks, to maintain clarity and keep mocks close to the tests that use them, even if it results in some duplication.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-11-12T00:28:53.713Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/plugin/tests/managers/lifecycle.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-11-11T11:51:09.236Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-11T11:51:09.236Z
Learning: In talawa-admin PR #4664 (continuation of PR #4565 sharding work), global mock cleanup was implemented via vi.clearAllMocks() in vitest.setup.ts afterEach, along with Apollo Client warning suppression (temporary, pending follow-up PR) and test suite refactoring to per-test StaticMockLink instances. This test isolation strategy addresses mock state leakage that forced maxConcurrency: 1 in PR #4565, enabling future parallel test execution improvements and 3-4x speedup potential.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/plugin/tests/managers/lifecycle.spec.tssrc/App.spec.tsx
📚 Learning: 2025-11-21T12:42:24.884Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4718
File: src/components/EventManagement/Dashboard/EventDashboard.mocks.ts:83-114
Timestamp: 2025-11-21T12:42:24.884Z
Learning: In talawa-admin mock files (e.g., EventDashboard.mocks.ts), mock constant names must accurately reflect what they test. Mock names suggesting role-based logic (e.g., MOCKS_WITH_ADMIN_ROLE) are misleading when the component derives role from localStorage rather than mock data. Name mocks based on their distinguishing data features (e.g., MOCKS_WITH_SINGLE_ATTENDEE) or test context (e.g., MOCKS_FOR_ADMIN_STORAGE_TEST).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-10-30T12:01:40.366Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2387
File: src/screens/ManageTag/ManageTagMockComponents/MockAddPeopleToTag.tsx:1-28
Timestamp: 2024-10-30T12:01:40.366Z
Learning: In the `MockAddPeopleToTag` component in `src/screens/ManageTag/ManageTagMockComponents/MockAddPeopleToTag.tsx`, it's acceptable to implement only the necessary props from `InterfaceAddPeopleToTagProps` and omit others like `refetchAssignedMembersData`, `t`, and `tCommon` that are tested separately.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-01-26T12:32:45.867Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/Organizations/Organizations.spec.tsx:19-19
Timestamp: 2025-01-26T12:32:45.867Z
Learning: In React test files, avoid using React hooks outside component scope (including in static objects like mock data). Instead, initialize hooks inside describe blocks or extract the needed functionality without using hooks.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tssrc/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-10-22T22:22:27.696Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-10-28T07:52:31.982Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2362
File: src/components/TagActions/TagActions.test.tsx:30-36
Timestamp: 2024-10-28T07:52:31.982Z
Learning: In our unit tests (e.g., `TagActions.test.tsx`), we use `setTimeout` with `act` to wait for asynchronous operations, as it provides a consistent wait time and is our standard practice.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-11-11T07:47:39.266Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2425
File: src/screens/MemberDetail/MemberDetail.test.tsx:100-100
Timestamp: 2024-11-11T07:47:39.266Z
Learning: In `src/screens/MemberDetail/MemberDetail.test.tsx`, using `await wait();` is acceptable to wait for the render to complete.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-11-28T18:25:57.398Z
Learnt from: krikera
Repo: PalisadoesFoundation/talawa-admin PR: 4887
File: src/components/LoginPortalToggle/LoginPortalToggle.spec.tsx:57-59
Timestamp: 2025-11-28T18:25:57.398Z
Learning: In talawa-admin tests, when testing CSS module class names (imported as `styles from '*.module.css'`), prefer importing the styles module and using `toHaveClass(styles.className)` over `className.toContain('className')`. Vite hashes CSS module class names (e.g., activeLink → _activeLink_d8535b), so `toHaveClass('activeLink')` with plain strings will fail. The styles import approach is semantic, type-safe, and matches patterns in SideToggle.spec.tsx. Alternatively, `className.toContain()` is acceptable for substring matching without imports.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
📚 Learning: 2025-08-17T07:39:34.255Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4077
File: package.json:189-213
Timestamp: 2025-08-17T07:39:34.255Z
Learning: The Talawa Admin codebase primarily uses .spec.tsx/.spec.ts naming convention for unit tests, with Cypress tests using .cy.ts pattern. However, there is at least one .test.tsx file in the codebase, so NYC exclude patterns should include both .spec and .test patterns.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxcypress.config.ts
📚 Learning: 2025-04-27T04:35:39.472Z
Learnt from: MayankJha014
Repo: PalisadoesFoundation/talawa-admin PR: 3946
File: src/components/UserPortal/ChatRoom/ChatRoom.spec.tsx:0-0
Timestamp: 2025-04-27T04:35:39.472Z
Learning: In the talawa-admin codebase tests, to check whether toast notifications were called, use the imported toast object directly with waitFor (e.g., `expect(toast.error).toHaveBeenCalled()`). Do not use require() style imports within test assertions.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-11-27T06:37:47.871Z
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2482
File: src/components/AddOn/support/components/Action/Action.spec.tsx:1-8
Timestamp: 2024-11-27T06:37:47.871Z
Learning: In the Talawa-Admin project, the `testing-library/jest-dom` package is imported globally in `vitest.setup.ts`, so individual test files do not need to import it separately.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-04-27T10:40:06.736Z
Learnt from: MayankJha014
Repo: PalisadoesFoundation/talawa-admin PR: 3946
File: src/components/UserPortal/ChatRoom/ChatRoom.spec.tsx:5708-5743
Timestamp: 2025-04-27T10:40:06.736Z
Learning: For testing async React components with loading states, using manually controlled promises (via a deferred pattern with explicit resolve function) is preferred over fake timers when the code under test doesn't rely on timer-based functions. This approach allows precise control over the promise resolution timing to test different component states.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
📚 Learning: 2025-04-20T06:41:55.660Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/Advertisements.spec.tsx:316-327
Timestamp: 2025-04-20T06:41:55.660Z
Learning: In the Talawa Admin project's test files, button click events may trigger asynchronous operations that require awaiting the act() call, even when using fireEvent.click() which is typically synchronous.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
📚 Learning: 2025-02-02T14:28:38.521Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3526
File: src/setupTests.ts:35-36
Timestamp: 2025-02-02T14:28:38.521Z
Learning: In talawa-admin project, global timer setup using `vi.useFakeTimers()` and `vi.advanceTimersByTime(18000)` in `setupTests.ts` is the accepted approach for test files, as it works well with their test suite requirements.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsx
📚 Learning: 2025-02-20T13:35:01.218Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3712
File: src/components/EventCalender/Yearly/YearlyEventCalender.spec.tsx:113-127
Timestamp: 2025-02-20T13:35:01.218Z
Learning: In React component tests, when testing window resize event handling, it's acceptable to only verify that the event is properly triggered without assertions if the test's focus is specifically on event handling rather than responsive behavior. Testing the actual responsive rendering would be a separate test case.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-01-26T12:47:50.063Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/components/SuperAdminScreen/SuperAdminScreen.spec.tsx:0-0
Timestamp: 2025-01-26T12:47:50.063Z
Learning: In the talawa-admin project, tests must use the custom `useLocalStorage` hook from 'utils/useLocalstorage' instead of the native localStorage API, as the test environment doesn't have direct access to browser's localStorage.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-11-02T07:18:39.563Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2398
File: src/screens/OrganizationTags/OrganizationTags.test.tsx:184-0
Timestamp: 2024-11-02T07:18:39.563Z
Learning: In the `talawa-admin` project, it's acceptable for test cases in `src/screens/OrganizationTags/OrganizationTags.test.tsx` to test multiple behaviors within a single test function without needing to split them into smaller, focused tests.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
📚 Learning: 2025-04-20T06:45:57.175Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:403-421
Timestamp: 2025-04-20T06:45:57.175Z
Learning: In the talawa-admin project, the Advertisement component tests (3 files) use both ApolloProvider and MockedProvider together, though it's not a widespread pattern in the codebase. The maintainer has confirmed this approach is needed for these specific tests.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2024-09-29T06:51:31.295Z
Learnt from: Doraemon012
Repo: PalisadoesFoundation/talawa-admin PR: 1988
File: src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx:282-282
Timestamp: 2024-09-29T06:51:31.295Z
Learning: In the test 'Component should be rendered properly' within 'Testing LeftDrawerOrg component for SUPERADMIN', setting 'SuperAdmin' to false is intentional.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/components/SecuredRoute/securedRoute.spec.tsx
📚 Learning: 2025-04-20T06:43:28.525Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:41-42
Timestamp: 2025-04-20T06:43:28.525Z
Learning: The developer has determined that explicit restoration of the global.URL.createObjectURL mock is not required in the Talawa Admin test suite, as the existing vi.restoreAllMocks() in afterEach blocks is considered sufficient for their testing needs.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsxsrc/App.spec.tsx
📚 Learning: 2025-08-13T06:52:48.055Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4040
File: cypress/pageObjects/AdminPortal/PeoplePage.ts:30-34
Timestamp: 2025-08-13T06:52:48.055Z
Learning: In the talawa-admin project's Cypress tests, specifically in cypress/pageObjects/AdminPortal/PeoplePage.ts, the element '[data-testid="existingUser"]' is a toggle control that requires .trigger('click') instead of .click() because it's not a standard button but a custom UI component that needs direct event triggering.
Applied to files:
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
📚 Learning: 2025-10-22T22:00:53.943Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:0-0
Timestamp: 2025-10-22T22:00:53.943Z
Learning: In src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts (and similar mock files), avoid duplicating identical Apollo MockedProvider mocks for repeated query consumption. Prefer adding `maxUsageCount` to the existing mock or using `newData` for reusable responses to keep tests deterministic and reduce drift.
Applied to files:
src/App.spec.tsx
📚 Learning: 2025-04-20T06:44:34.458Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:41-42
Timestamp: 2025-04-20T06:44:34.458Z
Learning: Mock restoration of global.URL.createObjectURL is managed through the existing vi.restoreAllMocks() calls in the afterEach blocks, which is the developer's preferred approach for handling test cleanup.
Applied to files:
src/App.spec.tsx
📚 Learning: 2025-04-20T06:45:57.175Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:403-421
Timestamp: 2025-04-20T06:45:57.175Z
Learning: Using both ApolloProvider and MockedProvider together in tests is an established pattern in this codebase, even though it's technically redundant from Apollo Client's best practices perspective.
Applied to files:
src/App.spec.tsx
📚 Learning: 2024-10-25T19:31:37.405Z
Learnt from: meetulr
Repo: PalisadoesFoundation/talawa-admin PR: 2355
File: src/screens/ManageTag/ManageTagMocks.ts:187-269
Timestamp: 2024-10-25T19:31:37.405Z
Learning: In `src/screens/ManageTag/ManageTagMocks.ts`, when mocking data for `USER_TAGS_ASSIGNED_MEMBERS` and `USER_TAGS_MEMBERS_TO_ASSIGN_TO`, it's acceptable for user IDs to overlap because the queries serve different purposes and the overlapping IDs can represent realistic scenarios in tests.
Applied to files:
src/App.spec.tsx
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
cypress.config.ts
📚 Learning: 2025-09-14T11:56:58.706Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4193
File: cypress.config.ts:20-22
Timestamp: 2025-09-14T11:56:58.706Z
Learning: In the talawa-admin project, syedali237 prefers using testIsolation: false in Cypress configuration to enable interdependent workflow tests that follow real user journeys (create → update → delete sequences). This approach is intentionally used for end-to-end testing of complete workflows, similar to the pattern used in people.cy.ts.
Applied to files:
cypress.config.ts
🧬 Code graph analysis (1)
src/components/SecuredRoute/securedRoute.spec.tsx (1)
src/utils/useLocalstorage.ts (1)
setItem(41-44)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Generate and Validate Documentation
- GitHub Check: Check Python Code Style
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (7)
cypress.config.ts (1)
39-42: Good clarification on code coverage task initialization order.The added comments effectively document why
codeCoverageTaskmust run before subsequent task registrations, improving maintainability. This aligns well with the PR's broader emphasis on ordered initialization for the test/config lifecycle, and the testIsolation: false setting (line 24) ensures tests follow real user journeys as intended.src/App.spec.tsx (2)
28-48: Excellent hoisted mock implementation!The hoisted mock pattern for the plugin system correctly follows Phase 2A testing guidelines. The
vi.hoisted()block at lines 28-40 properly exports mocks that are then used in module-levelvi.mock()calls, enabling per-test control while maintaining proper test isolation.Based on learnings, this pattern supports the test parallelization improvements being rolled out across the codebase.
450-467: LGTM: Proper mock error handling and cleanup!The test correctly uses
mockRejectedValueOnceto simulate a registry import error for a single test (line 454), then explicitly resets the mock to its default resolved state (line 466) to prevent test pollution.This pattern ensures test isolation while using the hoisted mock strategy.
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx (2)
31-36: Lazy-loading PageNotFound is consistent with the routing goalsUsing
React.lazyplus a top-level constant and keeping the comment about avoiding mixed static/dynamic imports is appropriate here; the Loader fallback is wired up later and doesn’t change behavior for non-admin users.
108-116: Suspense boundary around PageNotFound keeps behavior while enabling lazy loadingThe
adminFor == undefined ? <Outlet /> : <Suspense><PageNotFound/></Suspense>branch preserves the previous role-based behavior while safely handling the lazy component with a Loader fallback.src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx (1)
9-9: Async PageNotFound test correctly adapted for lazy loadingImporting
waitFor, switching to real timers within the “logged-in admin role” test, and awaiting the mockedPageNotFoundviawaitForgives a stable way to exercise the lazy-loaded/Suspense path without impacting other tests (you restore fake timers at the end and the suite-level cleanup still runs).Also applies to: 134-157
src/components/SecuredRoute/securedRoute.spec.tsx (1)
3-3: Test adjustments cleanly support lazy-loaded PageNotFoundBringing in
waitFor, mockingscreens/PageNotFound/PageNotFound, and making the non-admin test async with a real-timer window aroundrender/waitForgives a robust way to assert the lazy 404 path while keeping the rest of the suite on fake timers.Also applies to: 16-25, 80-113
src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.spec.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 10
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
cypress.config.ts(2 hunks)package.json(2 hunks)scripts/fix-nyc-compatibility.js(1 hunks)scripts/generate-lcov.js(1 hunks)scripts/merge-coverage.js(1 hunks)src/screens/PluginStore/hooks/usePluginActions.spec.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (26)
📓 Common learnings
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-06T05:15:51.829Z
Learning: In talawa-admin PR #4565, test sharding implementation achieved 2x speedup (8min → 4min) with conservative settings (maxConcurrency: 1, concurrent: false, maxThreads: 2 in CI) due to test isolation issues across 269 test files. These settings prevent OOM and race conditions. Higher speedup (3-4x) is achievable but requires systematic test isolation improvements. Apollo Client addTypename={false} deprecation warnings (142 files) are suppressed with TODO for follow-up fixes.
📚 Learning: 2025-11-17T22:18:09.680Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-17T22:18:09.680Z
Learning: Talawa Admin Phase 2A testing guideline: Allow vi.hoisted() + vi.mock() module-level mocks for shared dependencies; prefer afterEach(() => vi.clearAllMocks()) as default cleanup. Use afterEach(() => vi.restoreAllMocks()) only in suites that create vi.spyOn spies or patch real implementations. Avoid vi.resetAllMocks() globally. The generic “no module-level mocks” rule is updated to “no module-level vi.fn except vi.hoisted module mocks.”
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T22:51:12.224Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T22:51:12.224Z
Learning: In talawa-admin PR #4826, mock cleanup implementation uses global vi.clearAllMocks() in vitest.setup.ts afterEach hook, combined with proper vi.hoisted() usage for module-level mocks. This strategy successfully achieved test isolation across 273 test files, passing the mock cleanup checker script with exit code 0. The implementation is ready for increasing maxConcurrency from conservative settings (CI: 1, local: 2) to higher concurrency levels (recommended gradual rollout: CI 1→2→4, local 2→4→8) to achieve Phase 2A goals of 2.3-2.5x speedup. Global cleanup strategy eliminates need for explicit afterEach blocks in every individual test file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-11T11:51:09.236Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-11T11:51:09.236Z
Learning: In talawa-admin PR #4664 (continuation of PR #4565 sharding work), global mock cleanup was implemented via vi.clearAllMocks() in vitest.setup.ts afterEach, along with Apollo Client warning suppression (temporary, pending follow-up PR) and test suite refactoring to per-test StaticMockLink instances. This test isolation strategy addresses mock state leakage that forced maxConcurrency: 1 in PR #4565, enabling future parallel test execution improvements and 3-4x speedup potential.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-12-22T17:58:17.818Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 2718
File: src/screens/UserPortal/Settings/Settings.spec.tsx:0-0
Timestamp: 2024-12-22T17:58:17.818Z
Learning: The matchMedia mock implementation in `Settings.spec.tsx` no longer includes the deprecated addListener and removeListener methods, opting solely for addEventListener and removeEventListener.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-12T00:28:53.713Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T16:02:31.790Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4882
File: src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx:69-109
Timestamp: 2025-11-28T16:02:31.790Z
Learning: In Talawa Admin test files (e.g., src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx), developers prefer keeping date/time mocks (like vi.spyOn(Date.prototype, 'toLocaleDateString')) inline within individual test cases rather than consolidating them in beforeEach blocks, to maintain clarity and keep mocks close to the tests that use them, even if it results in some duplication.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tscypress.config.ts
📚 Learning: 2025-10-22T22:00:53.943Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:0-0
Timestamp: 2025-10-22T22:00:53.943Z
Learning: In src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts (and similar mock files), avoid duplicating identical Apollo MockedProvider mocks for repeated query consumption. Prefer adding `maxUsageCount` to the existing mock or using `newData` for reusable responses to keep tests deterministic and reduce drift.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-21T12:42:24.884Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4718
File: src/components/EventManagement/Dashboard/EventDashboard.mocks.ts:83-114
Timestamp: 2025-11-21T12:42:24.884Z
Learning: In talawa-admin mock files (e.g., EventDashboard.mocks.ts), mock constant names must accurately reflect what they test. Mock names suggesting role-based logic (e.g., MOCKS_WITH_ADMIN_ROLE) are misleading when the component derives role from localStorage rather than mock data. Name mocks based on their distinguishing data features (e.g., MOCKS_WITH_SINGLE_ATTENDEE) or test context (e.g., MOCKS_FOR_ADMIN_STORAGE_TEST).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-11-01T12:54:20.857Z
Learnt from: GlenDsza
Repo: PalisadoesFoundation/talawa-admin PR: 2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-03-11T17:45:54.621Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-01-26T12:32:45.867Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/Organizations/Organizations.spec.tsx:19-19
Timestamp: 2025-01-26T12:32:45.867Z
Learning: In React test files, avoid using React hooks outside component scope (including in static objects like mock data). Instead, initialize hooks inside describe blocks or extract the needed functionality without using hooks.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:43:28.525Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:41-42
Timestamp: 2025-04-20T06:43:28.525Z
Learning: The developer has determined that explicit restoration of the global.URL.createObjectURL mock is not required in the Talawa Admin test suite, as the existing vi.restoreAllMocks() in afterEach blocks is considered sufficient for their testing needs.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:44:34.458Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:41-42
Timestamp: 2025-04-20T06:44:34.458Z
Learning: Mock restoration of global.URL.createObjectURL is managed through the existing vi.restoreAllMocks() calls in the afterEach blocks, which is the developer's preferred approach for handling test cleanup.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-02-02T14:28:38.521Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3526
File: src/setupTests.ts:35-36
Timestamp: 2025-02-02T14:28:38.521Z
Learning: In talawa-admin project, global timer setup using `vi.useFakeTimers()` and `vi.advanceTimersByTime(18000)` in `setupTests.ts` is the accepted approach for test files, as it works well with their test suite requirements.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-11-26T07:19:31.226Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T07:19:31.226Z
Learning: When merging coverage reports from Jest and Vitest, ensure both testing frameworks output coverage in the same format (e.g., 'lcov') and use a compatible tool like 'lcov-result-merger' to combine the reports, as 'nyc merge' may not handle the different coverage formats correctly.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.jscypress.config.tsscripts/generate-lcov.js
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
scripts/merge-coverage.jscypress.config.ts
📚 Learning: 2024-11-26T06:57:38.639Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T06:57:38.639Z
Learning: When using `nyc merge` in GitHub Actions workflows, ensure that the input directory is specified as an argument, since it is required.
Applied to files:
scripts/merge-coverage.js
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
scripts/fix-nyc-compatibility.jspackage.json
📚 Learning: 2025-08-17T07:39:34.255Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4077
File: package.json:189-213
Timestamp: 2025-08-17T07:39:34.255Z
Learning: The Talawa Admin codebase primarily uses .spec.tsx/.spec.ts naming convention for unit tests, with Cypress tests using .cy.ts pattern. However, there is at least one .test.tsx file in the codebase, so NYC exclude patterns should include both .spec and .test patterns.
Applied to files:
cypress.config.ts
📚 Learning: 2025-09-14T11:56:58.706Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4193
File: cypress.config.ts:20-22
Timestamp: 2025-09-14T11:56:58.706Z
Learning: In the talawa-admin project, syedali237 prefers using testIsolation: false in Cypress configuration to enable interdependent workflow tests that follow real user journeys (create → update → delete sequences). This approach is intentionally used for end-to-end testing of complete workflows, similar to the pattern used in people.cy.ts.
Applied to files:
cypress.config.ts
📚 Learning: 2025-07-11T20:39:54.613Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3988
File: cypress.config.ts:6-6
Timestamp: 2025-07-11T20:39:54.613Z
Learning: In the talawa-admin project, the baseUrl in cypress.config.ts is intentionally hardcoded to 'http://localhost:4321' because the development frontend is always hosted on port 4321, making environment variable configuration unnecessary for this setting.
Applied to files:
cypress.config.ts
📚 Learning: 2025-11-24T08:30:07.940Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Applied to files:
package.json
📚 Learning: 2025-07-23T22:29:25.082Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4022
File: .github/workflows/cypress.yml:95-103
Timestamp: 2025-07-23T22:29:25.082Z
Learning: In the talawa-admin project, the npm script used to start the development server for Cypress testing is "npm run serve", not the more common "npm run dev" or "npm start".
Applied to files:
package.json
📚 Learning: 2025-11-13T18:07:48.621Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Applied to files:
package.json
🧬 Code graph analysis (2)
scripts/fix-nyc-compatibility.js (1)
scripts/merge-coverage.js (2)
__filename(11-11)__dirname(12-12)
cypress.config.ts (1)
scripts/generate-lcov.js (1)
require(11-11)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (6)
src/screens/PluginStore/hooks/usePluginActions.spec.ts (1)
421-444: Per-test override ofmockRemovePlugincleanly scopes the failure scenario.Setting
mockRemovePlugin.mockResolvedValueOnce(false)inside this test is a good way to simulate a one‑off failure while keeping the default hoisted behavior (true) for all other tests. It avoids per‑testvi.mockcalls and keeps the failure path exercised without leaking state.cypress.config.ts (1)
3-7: LGTM - ESM/CommonJS interop setup is correct.Using
createRequireto load CommonJS modules (@cypress/code-coverage/task) from an ESM context is the standard approach.package.json (2)
87-87: LGTM - Postinstall hook for NYC compatibility.This hook runs the compatibility script after install, addressing Node.js v24 issues with NYC as described in the PR objectives.
198-236: pnpm configuration looks correct for the migration.The
peerDependencyRulesaddress the peer dependency warnings forrc-color-picker,virtualizedtableforantd4, and PDFme packages. TheonlyBuiltDependencieswhitelist appropriately includes packages that require native builds (esbuild, cypress, sharp, etc.).Verify the
nycversion in pnpm.overrides (17.1.0) matches the hardcoded path inscripts/fix-nyc-compatibility.jsto ensure the compatibility fix script references the correct version.scripts/fix-nyc-compatibility.js (1)
153-161: LGTM - Backup and permission handling.Creating a backup before overwriting and setting executable permissions (755) is good practice for this kind of monkey-patching approach.
scripts/generate-lcov.js (1)
155-176: LGTM - CLI handling and file operations.Good error handling with appropriate exit codes, directory creation with
recursive: true, and informative logging.
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/screens/PluginStore/hooks/usePluginActions.spec.ts (2)
421-444: Strengthen failure test with state and call verification.The test correctly configures the mock to simulate failure, but doesn't verify the final state or mock invocation. Other failure tests in this suite (lines 372-395, 254-269) consistently check
loading,showUninstallModal, andpluginToUninstallstates after error handling.Add these assertions after line 443:
expect(mockPluginManager.uninstallPlugin).toHaveBeenCalledWith( 'test-plugin', ); + expect(mockRemovePlugin).toHaveBeenCalledWith('test-plugin'); + expect(result.current.loading).toBe(false); + expect(result.current.showUninstallModal).toBe(false); + expect(result.current.pluginToUninstall).toBe(null);
103-103: Consider simplifying mock cleanup (optional).The suite uses both
vi.clearAllMocks()andvi.restoreAllMocks(), but novi.spyOnspies are detected. Based on learnings, Phase 2A guidelines recommendvi.clearAllMocks()as default cleanup, withvi.restoreAllMocks()only when spies are created.Since this suite doesn't use spies, you could simplify to:
afterEach(() => { - vi.restoreAllMocks(); + // vi.clearAllMocks() in beforeEach is sufficient for this suite });This aligns with the global cleanup strategy while keeping the code minimal. However, keeping both is harmless and provides extra safety.
Also applies to: 116-116
♻️ Duplicate comments (1)
scripts/merge-coverage.js (1)
9-9: Unused import:fileURLToPath.The
fileURLToPathimport is no longer used after removing__filenameand__dirnamedeclarations.Apply this diff:
import fs from 'node:fs'; import path from 'node:path'; -import { fileURLToPath } from 'node:url';
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
cypress.config.ts(2 hunks)scripts/generate-lcov.js(1 hunks)scripts/merge-coverage.js(1 hunks)src/screens/PluginStore/hooks/usePluginActions.spec.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (33)
📓 Common learnings
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
📚 Learning: 2025-11-17T22:18:09.680Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-17T22:18:09.680Z
Learning: Talawa Admin Phase 2A testing guideline: Allow vi.hoisted() + vi.mock() module-level mocks for shared dependencies; prefer afterEach(() => vi.clearAllMocks()) as default cleanup. Use afterEach(() => vi.restoreAllMocks()) only in suites that create vi.spyOn spies or patch real implementations. Avoid vi.resetAllMocks() globally. The generic “no module-level mocks” rule is updated to “no module-level vi.fn except vi.hoisted module mocks.”
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T22:51:12.224Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T22:51:12.224Z
Learning: In talawa-admin PR #4826, mock cleanup implementation uses global vi.clearAllMocks() in vitest.setup.ts afterEach hook, combined with proper vi.hoisted() usage for module-level mocks. This strategy successfully achieved test isolation across 273 test files, passing the mock cleanup checker script with exit code 0. The implementation is ready for increasing maxConcurrency from conservative settings (CI: 1, local: 2) to higher concurrency levels (recommended gradual rollout: CI 1→2→4, local 2→4→8) to achieve Phase 2A goals of 2.3-2.5x speedup. Global cleanup strategy eliminates need for explicit afterEach blocks in every individual test file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-11T11:51:09.236Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-11T11:51:09.236Z
Learning: In talawa-admin PR #4664 (continuation of PR #4565 sharding work), global mock cleanup was implemented via vi.clearAllMocks() in vitest.setup.ts afterEach, along with Apollo Client warning suppression (temporary, pending follow-up PR) and test suite refactoring to per-test StaticMockLink instances. This test isolation strategy addresses mock state leakage that forced maxConcurrency: 1 in PR #4565, enabling future parallel test execution improvements and 3-4x speedup potential.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-12T00:28:53.713Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-12T00:28:53.713Z
Learning: In talawa-admin PR #4565 continuation (PR #4664 planned), Phase 2A mock isolation strategy uses global vi.clearAllMocks() in afterEach (vitest.setup.ts) plus refactoring module-level vi.fn() into per-test beforeEach blocks across 6 parallelizable issues (2A.0 foundation, 2A.1-2A.4 directory-based fixes, 2A.5 validation). This approach addresses mock call history accumulation enabling maxConcurrency: 2 and 2.3-2.5x speedup. vi.restoreAllMocks() alternative considered for spy restoration during validation phase. Phase 2A (mocks) correctly separated from Phase 2B (DOM/Apollo).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-12-22T17:58:17.818Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 2718
File: src/screens/UserPortal/Settings/Settings.spec.tsx:0-0
Timestamp: 2024-12-22T17:58:17.818Z
Learning: The matchMedia mock implementation in `Settings.spec.tsx` no longer includes the deprecated addListener and removeListener methods, opting solely for addEventListener and removeEventListener.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-10-22T22:00:53.943Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:0-0
Timestamp: 2025-10-22T22:00:53.943Z
Learning: In src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts (and similar mock files), avoid duplicating identical Apollo MockedProvider mocks for repeated query consumption. Prefer adding `maxUsageCount` to the existing mock or using `newData` for reusable responses to keep tests deterministic and reduce drift.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-28T16:02:31.790Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4882
File: src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx:69-109
Timestamp: 2025-11-28T16:02:31.790Z
Learning: In Talawa Admin test files (e.g., src/screens/UserPortal/Volunteer/UpcomingEvents/RecurringEventVolunteerModal.spec.tsx), developers prefer keeping date/time mocks (like vi.spyOn(Date.prototype, 'toLocaleDateString')) inline within individual test cases rather than consolidating them in beforeEach blocks, to maintain clarity and keep mocks close to the tests that use them, even if it results in some duplication.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.tsscripts/generate-lcov.jscypress.config.ts
📚 Learning: 2025-11-21T12:42:24.884Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4718
File: src/components/EventManagement/Dashboard/EventDashboard.mocks.ts:83-114
Timestamp: 2025-11-21T12:42:24.884Z
Learning: In talawa-admin mock files (e.g., EventDashboard.mocks.ts), mock constant names must accurately reflect what they test. Mock names suggesting role-based logic (e.g., MOCKS_WITH_ADMIN_ROLE) are misleading when the component derives role from localStorage rather than mock data. Name mocks based on their distinguishing data features (e.g., MOCKS_WITH_SINGLE_ATTENDEE) or test context (e.g., MOCKS_FOR_ADMIN_STORAGE_TEST).
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-11-01T12:54:20.857Z
Learnt from: GlenDsza
Repo: PalisadoesFoundation/talawa-admin PR: 2397
File: src/screens/OrganizationActionItems/testObject.mocks.ts:184-402
Timestamp: 2024-11-01T12:54:20.857Z
Learning: In `src/screens/OrganizationActionItems/testObject.mocks.ts`, test failures are not dependent on the `createdAt` fields; hardcoded dates in `createdAt` fields do not cause test failures in this file.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-03-11T17:45:54.621Z
Learnt from: PurnenduMIshra129th
Repo: PalisadoesFoundation/talawa-admin PR: 3814
File: src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.spec.tsx:137-146
Timestamp: 2025-03-11T17:45:54.621Z
Learning: In OrganizationNavbar.spec.tsx, separate vi.mock implementations for react-router-dom are needed to avoid errors - one for useNavigate and another for useParams.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-01-26T12:32:45.867Z
Learnt from: IITI-tushar
Repo: PalisadoesFoundation/talawa-admin PR: 3400
File: src/screens/UserPortal/Organizations/Organizations.spec.tsx:19-19
Timestamp: 2025-01-26T12:32:45.867Z
Learning: In React test files, avoid using React hooks outside component scope (including in static objects like mock data). Instead, initialize hooks inside describe blocks or extract the needed functionality without using hooks.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:43:28.525Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementRegister/AdvertisementRegister.spec.tsx:41-42
Timestamp: 2025-04-20T06:43:28.525Z
Learning: The developer has determined that explicit restoration of the global.URL.createObjectURL mock is not required in the Talawa Admin test suite, as the existing vi.restoreAllMocks() in afterEach blocks is considered sufficient for their testing needs.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-02-02T14:28:38.521Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3526
File: src/setupTests.ts:35-36
Timestamp: 2025-02-02T14:28:38.521Z
Learning: In talawa-admin project, global timer setup using `vi.useFakeTimers()` and `vi.advanceTimersByTime(18000)` in `setupTests.ts` is the accepted approach for test files, as it works well with their test suite requirements.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-11-13T18:07:48.621Z
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-13T18:07:48.621Z
Learning: In talawa-admin, Apollo Client pinned to 3.11.10 (not 3.14.0) to avoid deprecation warnings during test isolation work (PR #4565 Phase 2A-2B). Apollo 3.14.0's MockedProvider internally uses deprecated options causing console noise that interferes with debugging. Upgrade to 4.x blocked by dependency conflicts with apollo-upload-client and apollo/link-error. All addTypename props removed from 115+ test files for future compatibility. Will upgrade when dependencies support Apollo 4.x.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2025-04-20T06:44:34.458Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:41-42
Timestamp: 2025-04-20T06:44:34.458Z
Learning: Mock restoration of global.URL.createObjectURL is managed through the existing vi.restoreAllMocks() calls in the afterEach blocks, which is the developer's preferred approach for handling test cleanup.
Applied to files:
src/screens/PluginStore/hooks/usePluginActions.spec.ts
📚 Learning: 2024-11-26T07:19:31.226Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T07:19:31.226Z
Learning: When merging coverage reports from Jest and Vitest, ensure both testing frameworks output coverage in the same format (e.g., 'lcov') and use a compatible tool like 'lcov-result-merger' to combine the reports, as 'nyc merge' may not handle the different coverage formats correctly.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jscypress.config.ts
📚 Learning: 2025-11-30T15:34:04.178Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/fix-nyc-compatibility.js:145-149
Timestamp: 2025-11-30T15:34:04.178Z
Learning: In the talawa-admin repository, the nyc compatibility wrapper in scripts/fix-nyc-compatibility.js is intentionally limited to only "merge" and "report" commands because other nyc commands are not used in the project and are currently incompatible with Node.js v24. This is a deliberate design decision, not an oversight.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jscypress.config.ts
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jscypress.config.ts
📚 Learning: 2025-11-30T15:55:29.352Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/generate-lcov.js:64-64
Timestamp: 2025-11-30T15:55:29.352Z
Learning: In the talawa-admin repository, the LCOV BRDA format in scripts/generate-lcov.js uses a 5-field format (line, column, block, branch, taken) instead of the standard 4-field format. This is intentional to preserve branch disambiguation by column for Istanbul-generated coverage data and avoid potential coverage regressions.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.js
📚 Learning: 2024-11-26T06:57:38.639Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T06:57:38.639Z
Learning: When using `nyc merge` in GitHub Actions workflows, ensure that the input directory is specified as an argument, since it is required.
Applied to files:
scripts/merge-coverage.js
📚 Learning: 2025-11-27T15:33:20.491Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-11-28T23:56:12.212Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-10-29T04:36:50.503Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-10-22T18:08:21.451Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2024-12-02T04:20:11.745Z
Learnt from: bitbard3
Repo: PalisadoesFoundation/talawa-admin PR: 2588
File: src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.spec.tsx:145-155
Timestamp: 2024-12-02T04:20:11.745Z
Learning: In PRs focused solely on refactoring test cases from Jest to Vitest, avoid suggesting optimizations or changes outside the migration scope.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-01-30T10:03:22.905Z
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-04-13T10:05:41.802Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/style/app-fixed.module.css:8456-8463
Timestamp: 2025-04-13T10:05:41.802Z
Learning: For the Talawa Admin repository, focus feedback on substantive issues rather than minor styling suggestions, especially when the code follows established patterns in the codebase.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-08-17T07:39:34.255Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4077
File: package.json:189-213
Timestamp: 2025-08-17T07:39:34.255Z
Learning: The Talawa Admin codebase primarily uses .spec.tsx/.spec.ts naming convention for unit tests, with Cypress tests using .cy.ts pattern. However, there is at least one .test.tsx file in the codebase, so NYC exclude patterns should include both .spec and .test patterns.
Applied to files:
cypress.config.ts
📚 Learning: 2025-09-14T11:56:58.706Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4193
File: cypress.config.ts:20-22
Timestamp: 2025-09-14T11:56:58.706Z
Learning: In the talawa-admin project, syedali237 prefers using testIsolation: false in Cypress configuration to enable interdependent workflow tests that follow real user journeys (create → update → delete sequences). This approach is intentionally used for end-to-end testing of complete workflows, similar to the pattern used in people.cy.ts.
Applied to files:
cypress.config.ts
📚 Learning: 2025-07-11T20:39:54.613Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 3988
File: cypress.config.ts:6-6
Timestamp: 2025-07-11T20:39:54.613Z
Learning: In the talawa-admin project, the baseUrl in cypress.config.ts is intentionally hardcoded to 'http://localhost:4321' because the development frontend is always hosted on port 4321, making environment variable configuration unnecessary for this setting.
Applied to files:
cypress.config.ts
🧬 Code graph analysis (2)
scripts/merge-coverage.js (2)
scripts/generate-lcov.js (4)
coverageData(169-169)args(150-150)outputFile(160-160)outputDir(175-175)scripts/run-shard.js (2)
count(16-16)idx(15-15)
scripts/generate-lcov.js (3)
scripts/merge-coverage.js (2)
coverageData(26-26)fileCount(137-137).github/workflows/check-tsdoc.js (1)
filePath(19-19)scripts/run-shard.js (2)
count(16-16)idx(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (8)
src/screens/PluginStore/hooks/usePluginActions.spec.ts (1)
43-51: LGTM! Hoisted mock follows Phase 2A pattern.The hoisted
mockRemovePluginwith module-levelvi.mockcorrectly implements the Phase 2A testing guideline. Argument forwarding ensures the mock remains resilient ifremovePluginlater uses parameters.Based on learnings, this approach enables proper test isolation and per-test mock configuration.
scripts/merge-coverage.js (2)
16-90: LGTM!The coverage merging logic correctly handles statements, branches, functions, and lines. The previous issues (variable shadowing and branch array length mismatch) have been addressed.
92-141: LGTM!The CLI interface has appropriate argument validation, error handling, and informative logging.
scripts/generate-lcov.js (3)
36-55: LGTM!The function coverage logic correctly emits FN, FNDA, FNF, and FNH records. The use of
funcIdas the line number is understood to be intentional based on prior discussion.
57-81: LGTM!The branch coverage logic correctly processes branch arrays and emits BRDA, BRF, and BRH records. The 5-field BRDA format is understood to be intentional for branch disambiguation. Based on learnings.
149-190: LGTM!The CLI interface has appropriate argument validation, error handling with try-catch, and informative logging. Output directory creation is handled correctly.
cypress.config.ts (2)
3-7: ESM–CJS interop viacreateRequirelooks correct.Using
createRequire(import.meta.url)to load@cypress/code-coverage/taskfrom an ESM-style config is a solid approach, and scopingrequireto this file avoids leaking globals.Please confirm that your Cypress runs (local and CI) execute without config-module errors after this change, especially if your
tsconfigor Node setup previously treated this file as CommonJS rather than ESM.
40-65: Coverage plugin initialization and fallback now cover all required tasks.The try/catch around
@cypress/code-coverage/taskis wired correctly, and the fallback now registersresetCoverage,combineCoverage, andcoverageReport, addressing the earlier incomplete-task issue. Note that under the fallback path these are pure no-ops, so tests will pass but coverage data will not be collected or merged.Please verify that:
- In the normal (non-fallback) path, coverage reports are still produced as before; and
- In environments where the plugin fails to load, you’re comfortable with tests succeeding but producing zero/empty coverage so CI doesn’t silently regress coverage expectations.
|
@coderabbitai I checked everything still CI test Please guide me evaluating the PR and suggest what should I do to pass the checks successfully. |
🧩 Analysis chain🏁 Script executed: Length of output: 6197 🏁 Script executed: Length of output: 262337 @rawadhossain Thanks for pulling the logs. Here’s the quickest path to green checks: What’s failing right now
Do this in order
Optional local preflight (to avoid surprises)
Would you like me to:
I’ve marked this review as “changes requested” per repository policy so the gate reflects that fixes are needed. After you push the Prettier fix and add the label, I’ll flip to approval on request. 🧠 Learnings used✅ Actions performedReview triggered.
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 9457 🏁 Script executed: Length of output: 3099 🏁 Script executed: Length of output: 3949 🏁 Script executed: Length of output: 41217 🏁 Script executed: Length of output: 739 🏁 Script executed: Length of output: 270326 🏁 Script executed: Length of output: 265565 🏁 Script executed: Length of output: 46379 🏁 Script executed: Length of output: 1330 @rawadhossain Thanks for the details. I pulled the logs you shared and found three concrete blockers. Here’s the shortest path to green. What failed and why
Do these two things and push once
After you do the above, CI will re-run and these jobs should proceed:
About your earlier E2E and Merge Coverage failures
Optional: I can add the label for you via CLI if you prefer—just say “add the label” and I’ll run it. If anything else fails after you push, I’ll grab those new logs and pinpoint the next fix immediately. 🧠 Learnings used |
|
@coderabbitai Add label ignore-sensitive-files-pr to this PR (Fix PNPM Migration, Docker Build Errors #4901) |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 62 @rawadhossain Done! ✅ I've added the Next step to unblock CI: You still need to commit and push the Prettier formatting fix: pnpm format:fix
git add .github/workflows/pull-request-target.yml
git commit -m "chore: format workflow file to satisfy CI Prettier check"
git pushOnce you push, the CI will re-run with both blockers resolved, and the downstream jobs (Check-AutoDocs, Test-Application, Test-Application-E2E, Merge-Coverage, etc.) will execute instead of being skipped. After the Code-Quality-Checks job passes, ping me with "Approve now" and I'll approve the PR to satisfy the CodeRabbit approval gate. 🚀 🧠 Learnings used |
There was a problem hiding this 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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
scripts/generate-lcov.js(1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: CodeRabbit does not have permissions to add labels to PRs in the talawa-admin repository. Labels need to be added manually by users with appropriate permissions.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
📚 Learning: 2025-11-30T15:55:29.352Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/generate-lcov.js:64-64
Timestamp: 2025-11-30T15:55:29.352Z
Learning: In the talawa-admin repository, the LCOV BRDA format in scripts/generate-lcov.js uses a 5-field format (line, column, block, branch, taken) instead of the standard 4-field format. This is intentional to preserve branch disambiguation by column for Istanbul-generated coverage data and avoid potential coverage regressions.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2024-11-26T07:19:31.226Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T07:19:31.226Z
Learning: When merging coverage reports from Jest and Vitest, ensure both testing frameworks output coverage in the same format (e.g., 'lcov') and use a compatible tool like 'lcov-result-merger' to combine the reports, as 'nyc merge' may not handle the different coverage formats correctly.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-11-30T15:34:04.178Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/fix-nyc-compatibility.js:145-149
Timestamp: 2025-11-30T15:34:04.178Z
Learning: In the talawa-admin repository, the nyc compatibility wrapper in scripts/fix-nyc-compatibility.js is intentionally limited to only "merge" and "report" commands because other nyc commands are not used in the project and are currently incompatible with Node.js v24. This is a deliberate design decision, not an oversight.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-11-27T15:33:20.491Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.491Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-11-28T23:56:12.212Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.212Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-10-29T04:36:50.503Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-10-22T18:08:21.451Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2024-12-02T04:20:11.745Z
Learnt from: bitbard3
Repo: PalisadoesFoundation/talawa-admin PR: 2588
File: src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.spec.tsx:145-155
Timestamp: 2024-12-02T04:20:11.745Z
Learning: In PRs focused solely on refactoring test cases from Jest to Vitest, avoid suggesting optimizations or changes outside the migration scope.
Applied to files:
scripts/generate-lcov.js
📚 Learning: 2025-01-30T10:03:22.905Z
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Applied to files:
scripts/generate-lcov.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (1)
scripts/generate-lcov.js (1)
83-141: Line coverage generation is robust and aligns well with Istanbul data.Using
statementMapas the primary source, aggregating per-line hits, and falling back tofileCoverage.lgives accurate line coverage even with multiple statements on the same line. TheNumber.isNaNcheck aroundparseIntforlineIdalso correctly avoids the earlier"0"/non-numeric edge case. Not re-opening FN/BRDA layout discussions here since those semantics are already intentionally defined for this repo.Based on learnings, this matches the established coverage tooling design in talawa-admin.
|
@coderabbitai The CI failure is happening in |
|
Tip For best results, initiate chat on the files or code changes. @rawadhossain You're absolutely right to be cautious! Let me clarify what's happening and why it's okay to fix this: Why Prettier is failing on a file you didn't touchThe CI Prettier check runs on all files in the repository, not just the ones you changed. The Formatting fixes vs. functional changesThe maintainer's guidance about not changing workflow files refers to functional/logical changes (modifying jobs, steps, conditions, etc.). Formatting fixes to satisfy CI are different and necessary — they don't change what the workflow does, only how it's formatted. In fact, repository policy requires all files to pass Prettier checks, including workflows. You must fix this to merge your PR. What to do (step-by-step)
This is standard procedure✅ Formatting fixes to pass CI checks are expected and acceptable After you push, the Code-Quality-Checks job should pass, and we can proceed with approval. Let me know if you see anything in the diff that looks like more than formatting! 🚀 🧠 Learnings used |
|
We are going to add new automation to our PRs If you haven't correctly linked your PR to an issue, then it will be automatically closed. Please update this PR accordingly |
palisadoes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This seems like too much effort.
- Focus on the packages the code base directly used by the codebase that are not deprecated versus their dependencies.
- The effort will current effort will bring too much instability to the code base in the long run.
- What do you propose as the most pragmatic solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
cypress.config.ts(0 hunks)scripts/fix-nyc-compatibility.js(1 hunks)scripts/generate-lcov.js(1 hunks)scripts/merge-coverage.js(1 hunks)
💤 Files with no reviewable changes (1)
- cypress.config.ts
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.511Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: CodeRabbit does not have permissions to add labels to PRs in the talawa-admin repository. Labels need to be added manually by users with appropriate permissions.
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2607
File: Dockerfile:4-12
Timestamp: 2024-12-06T03:20:57.597Z
Learning: The project uses npm instead of yarn.
📚 Learning: 2024-11-26T07:19:31.226Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T07:19:31.226Z
Learning: When merging coverage reports from Jest and Vitest, ensure both testing frameworks output coverage in the same format (e.g., 'lcov') and use a compatible tool like 'lcov-result-merger' to combine the reports, as 'nyc merge' may not handle the different coverage formats correctly.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-30T15:34:04.189Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/fix-nyc-compatibility.js:145-149
Timestamp: 2025-11-30T15:34:04.189Z
Learning: In the talawa-admin repository, the nyc compatibility wrapper in scripts/fix-nyc-compatibility.js is intentionally limited to only "merge" and "report" commands because other nyc commands are not used in the project and are currently incompatible with Node.js v24. This is a deliberate design decision, not an oversight.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-30T15:55:29.379Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/generate-lcov.js:64-64
Timestamp: 2025-11-30T15:55:29.379Z
Learning: In the talawa-admin repository, the LCOV BRDA format in scripts/generate-lcov.js uses a 5-field format (line, column, block, branch, taken) instead of the standard 4-field format. This is intentional to preserve branch disambiguation by column for Istanbul-generated coverage data and avoid potential coverage regressions.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.js
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
scripts/merge-coverage.jsscripts/generate-lcov.js
📚 Learning: 2024-11-26T06:57:38.639Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T06:57:38.639Z
Learning: When using `nyc merge` in GitHub Actions workflows, ensure that the input directory is specified as an argument, since it is required.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-27T15:33:20.511Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.511Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-28T23:56:12.253Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-29T04:36:50.503Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-22T18:08:21.451Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2024-12-02T04:20:11.745Z
Learnt from: bitbard3
Repo: PalisadoesFoundation/talawa-admin PR: 2588
File: src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.spec.tsx:145-155
Timestamp: 2024-12-02T04:20:11.745Z
Learning: In PRs focused solely on refactoring test cases from Jest to Vitest, avoid suggesting optimizations or changes outside the migration scope.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-01-30T10:03:22.905Z
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Applied to files:
scripts/generate-lcov.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-08-17T07:39:34.255Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4077
File: package.json:189-213
Timestamp: 2025-08-17T07:39:34.255Z
Learning: The Talawa Admin codebase primarily uses .spec.tsx/.spec.ts naming convention for unit tests, with Cypress tests using .cy.ts pattern. However, there is at least one .test.tsx file in the codebase, so NYC exclude patterns should include both .spec and .test patterns.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2024-11-20T11:32:56.672Z
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-04-13T10:05:41.802Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/style/app-fixed.module.css:8456-8463
Timestamp: 2025-04-13T10:05:41.802Z
Learning: For the Talawa Admin repository, focus feedback on substantive issues rather than minor styling suggestions, especially when the code follows established patterns in the codebase.
Applied to files:
scripts/fix-nyc-compatibility.js
🧬 Code graph analysis (1)
scripts/merge-coverage.js (3)
.github/workflows/check-tsdoc.js (1)
filePath(19-19)scripts/generate-lcov.js (6)
coverageData(171-171)args(151-151)outputFile(162-162)outputDir(183-183)fileCount(203-203)fileSize(197-197)scripts/run-shard.js (2)
count(16-16)idx(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Generate and Validate Documentation
- GitHub Check: Check Python Code Style
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (10)
scripts/merge-coverage.js (2)
16-96: LGTM!The
mergeCoverageFilesfunction correctly handles merging coverage data across shards. The branch array merge usingMath.maxto handle different array lengths and the statement/function/line accumulation logic are well-implemented.
140-179: Solid validation and error handling.The multi-step validation (non-empty coverage, file existence, non-zero size, JSON re-parse verification) provides robust guarantees that the merge operation completed successfully. Good defensive programming.
scripts/generate-lcov.js (4)
35-55: Function coverage handling is acceptable.The FN record uses
funcIdas the line number (rather thanfnMap[funcId]?.loc?.start?.line) per the previous discussion - this is a pragmatic choice given Istanbul's inconsistentloc.start.linedata for arrow functions.
57-81: Branch coverage format preserved as discussed.The BRDA 5-field format (line, column, branchId, idx, count) is intentionally non-standard to preserve branch disambiguation by column for Istanbul-generated coverage data. Based on learnings from previous review discussion.
83-114: Well-designed line coverage derivation.Using
statementMapto aggregate statement coverage by line number (with max-count semantics for multiple statements on the same line) is a reliable approach. The fallback to directlmap (lines 115-141) ensures compatibility with different coverage formats.
150-213: CLI handling is robust and well-validated.The script properly validates inputs, creates output directories, verifies successful writes, and uses appropriate exit codes. The dynamic script name in usage text (per previous suggestion) improves clarity.
scripts/fix-nyc-compatibility.js (4)
16-43: nyc path discovery handles both npm and pnpm layouts.The dual-path approach correctly supports both standard npm
node_modules/nycand pnpm's isolated structure. The hardcoded[email protected]version is acknowledged as a known limitation per previous discussion.
177-234: Report command handling with fallback is well-designed.The wrapper correctly handles the
lcovreporter via the customgenerate-lcov.jsscript while delegating other reporters to the original nyc backup. The argument parsing for--reporterand--report-diris correct.
241-254: Backup and installation logic is correct.The script correctly preserves the original nyc by creating a
.backupfile (only if one doesn't exist), writes the wrapper, and sets executable permissions. Error handling catches and logs failures appropriately.
122-153: Cypress coverage call handling prevents test hangs with standard nyc output path.The Cypress detection heuristic identifies coverage plugin calls and short-circuits with a minimal summary to prevent timeouts. The
.nyc_output/out.jsonpath follows standard nyc conventions, with defensive directory creation to ensure the output location exists.
There was a problem hiding this 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
♻️ Duplicate comments (1)
scripts/fix-nyc-compatibility.js (1)
233-263: Log spawn errors for report/delegate paths as wellIn the
mergepath you now logSpawn erroronchild.on("error"), but thereportLCOV and “delegate to original nyc” paths still exit with code 1 without logging the underlying error. This makes debugging failures in those flows harder.Consider mirroring the same error logging used in the merge path:
- child.on("exit", (code) => process.exit(code || 0)); - child.on("error", () => process.exit(1)); + child.on("exit", (code) => process.exit(code || 0)); + child.on("error", (err) => { + console.error("Spawn error:", err.message); + process.exit(1); + });and similarly for the delegate-to-original block.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
scripts/fix-nyc-compatibility.js(1 hunks)scripts/merge-coverage.js(1 hunks)
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.511Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: CodeRabbit does not have permissions to add labels to PRs in the talawa-admin repository. Labels need to be added manually by users with appropriate permissions.
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Learnt from: Ansingh0305
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-24T08:30:07.940Z
Learning: In talawa-admin PR #4743, Apollo Client is pinned to 3.13.0 (stable version) in package.json resolutions and pnpm overrides. The addTypename deprecation warnings from Apollo Client will be addressed in a future upgrade to Apollo 4.x once it becomes stable and dependency conflicts with apollo-upload-client and apollo/link-error are resolved. All addTypename props have already been removed from 115+ test files in preparation for this future upgrade.
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 4524
File: src/screens/Requests/Requests.spec.tsx:0-0
Timestamp: 2025-10-22T22:22:27.696Z
Learning: In talawa-admin tests using react-infinite-scroll-component (e.g., src/screens/Requests/Requests.spec.tsx), jsdom scroll is flaky. Prefer a resilient approach: try querying the container via document.querySelector('[data-testid="infinite-scroll-component"]') and fall back to window scroll if missing. Strengthen assertions by checking for page-2 items (e.g., "User9 Test") to ensure fetchMore actually ran instead of relying only on row counts.
📚 Learning: 2024-11-26T07:19:31.226Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T07:19:31.226Z
Learning: When merging coverage reports from Jest and Vitest, ensure both testing frameworks output coverage in the same format (e.g., 'lcov') and use a compatible tool like 'lcov-result-merger' to combine the reports, as 'nyc merge' may not handle the different coverage formats correctly.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-30T15:34:04.189Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/fix-nyc-compatibility.js:145-149
Timestamp: 2025-11-30T15:34:04.189Z
Learning: In the talawa-admin repository, the nyc compatibility wrapper in scripts/fix-nyc-compatibility.js is intentionally limited to only "merge" and "report" commands because other nyc commands are not used in the project and are currently incompatible with Node.js v24. This is a deliberate design decision, not an oversight.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-10T11:01:34.075Z
Learnt from: swastikCommits
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-10-10T11:01:34.075Z
Learning: For PRs that only update dependency versions in package.json and package-lock.json without modifying source code files, test coverage warnings are not applicable. The coverage requirements from linked issues apply to "affected files" which means source code files, not configuration/dependency files.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-30T15:55:29.379Z
Learnt from: rawadhossain
Repo: PalisadoesFoundation/talawa-admin PR: 4901
File: scripts/generate-lcov.js:64-64
Timestamp: 2025-11-30T15:55:29.379Z
Learning: In the talawa-admin repository, the LCOV BRDA format in scripts/generate-lcov.js uses a 5-field format (line, column, block, branch, taken) instead of the standard 4-field format. This is intentional to preserve branch disambiguation by column for Istanbul-generated coverage data and avoid potential coverage regressions.
Applied to files:
scripts/merge-coverage.js
📚 Learning: 2024-10-08T16:13:41.996Z
Learnt from: Chaitanya1672
Repo: PalisadoesFoundation/talawa-admin PR: 2049
File: src/screens/OrganizationActionItems/ActionItemUpdateModal.tsx:112-138
Timestamp: 2024-10-08T16:13:41.996Z
Learning: The `istanbul ignore next` comments in the `ActionItemUpdateModal.tsx` file were added as part of a commit that introduced tests for the `ActionItemUpdateModal` component. Removing these comments and writing tests to cover the previously ignored lines is recommended to ensure code integrity and improve test coverage.
Applied to files:
scripts/merge-coverage.js
📚 Learning: 2024-11-26T06:57:38.639Z
Learnt from: prayanshchh
Repo: PalisadoesFoundation/talawa-admin PR: 2457
File: .github/workflows/pull-request.yml:0-0
Timestamp: 2024-11-26T06:57:38.639Z
Learning: When using `nyc merge` in GitHub Actions workflows, ensure that the input directory is specified as an argument, since it is required.
Applied to files:
scripts/merge-coverage.jsscripts/fix-nyc-compatibility.js
📚 Learning: 2025-08-17T07:39:34.255Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4077
File: package.json:189-213
Timestamp: 2025-08-17T07:39:34.255Z
Learning: The Talawa Admin codebase primarily uses .spec.tsx/.spec.ts naming convention for unit tests, with Cypress tests using .cy.ts pattern. However, there is at least one .test.tsx file in the codebase, so NYC exclude patterns should include both .spec and .test patterns.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-09-23T04:50:51.081Z
Learnt from: BharathC0
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-09-23T04:50:51.081Z
Learning: In PalisadoesFoundation/talawa-admin, Rollup platform-specific binaries must be listed under optionalDependencies (not devDependencies) to avoid EBADPLATFORM on Linux CI runners. To satisfy rollup bump issues (e.g., #4148), set rollup/rollup-win32-x64-msvc to ^4.50.0 in optionalDependencies and keep the 'ignore-sensitive-files-pr' label when package-lock.json changes.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2024-12-02T04:20:11.745Z
Learnt from: bitbard3
Repo: PalisadoesFoundation/talawa-admin PR: 2588
File: src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.spec.tsx:145-155
Timestamp: 2024-12-02T04:20:11.745Z
Learning: In PRs focused solely on refactoring test cases from Jest to Vitest, avoid suggesting optimizations or changes outside the migration scope.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-28T23:56:12.253Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-11-28T23:56:12.253Z
Learning: In the talawa-admin repository, when CodeRabbit identifies issues that require fixes in a PR review, the review status must be explicitly changed to "changes required" using GitHub CLI (gh pr review --request-changes), not just mentioned in the response text.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-11-27T15:33:20.511Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4866
File: .github/workflows/pull-request-target.yml:28-30
Timestamp: 2025-11-27T15:33:20.511Z
Learning: In the talawa-admin repository, the PR greeting message in .github/workflows/pull-request-target.yml is intentionally simplified to only reference the centralized Palisadoes Contributing Guidelines (https://developer.palisadoes.org/docs/contributor-guide/contributing). This simplification is part of a strategic decision to centralize PR guidance and reporting across multiple Palisadoes repositories, rather than maintaining separate detailed documentation in each repository's workflow files.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-29T04:36:50.503Z
Learnt from: palisadoes
Repo: PalisadoesFoundation/talawa-admin PR: 4550
File: .github/workflows/pull-request.yml:377-382
Timestamp: 2025-10-29T04:36:50.503Z
Learning: In the talawa-admin repository's .github/workflows/pull-request.yml, the Check-AutoDocs job is intentionally added as a dependency of Test-Application to create a sequential chain (Code-Quality-Checks → Check-AutoDocs → Test-Application), ensuring documentation validation must complete before tests run. This design is approved and should not be flagged as a CI latency concern.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2024-11-20T11:32:56.672Z
Learnt from: adithyanotfound
Repo: PalisadoesFoundation/talawa-admin PR: 2452
File: .github/workflows/pull-request.yml:312-334
Timestamp: 2024-11-20T11:32:56.672Z
Learning: In the GitHub Actions workflow (`.github/workflows/pull-request.yml`) for the Talawa Admin app, using the same port (4321) for both the production and development apps is acceptable, and running them sequentially avoids port conflicts. Duplicate health check logic is acceptable in this context.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-10-22T18:08:21.451Z
Learnt from: syedali237
Repo: PalisadoesFoundation/talawa-admin PR: 4522
File: .github/workflows/pull-request.yml:768-775
Timestamp: 2025-10-22T18:08:21.451Z
Learning: In the talawa-admin repository, the ZAP security scan job in .github/workflows/pull-request.yml should depend on Code-Quality-Checks, Test-Application, Run-Cypress-Tests, Start-App-Without-Docker, and Docker-Start-Check to ensure security scanning only runs on stable code that passes all prerequisite checks, optimizing CI resource usage.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-01-30T10:03:22.905Z
Learnt from: Priyanshuthapliyal2005
Repo: PalisadoesFoundation/talawa-admin PR: 0
File: :0-0
Timestamp: 2025-01-30T10:03:22.905Z
Learning: The 'ignore-sensitive-files-pr' label is required when making changes to sensitive files like package.json, package-lock.json, and workflow files in the talawa-admin repository.
Applied to files:
scripts/fix-nyc-compatibility.js
📚 Learning: 2025-04-13T10:05:41.802Z
Learnt from: bandhan-majumder
Repo: PalisadoesFoundation/talawa-admin PR: 3926
File: src/style/app-fixed.module.css:8456-8463
Timestamp: 2025-04-13T10:05:41.802Z
Learning: For the Talawa Admin repository, focus feedback on substantive issues rather than minor styling suggestions, especially when the code follows established patterns in the codebase.
Applied to files:
scripts/fix-nyc-compatibility.js
🧬 Code graph analysis (1)
scripts/merge-coverage.js (3)
.github/workflows/check-tsdoc.js (1)
filePath(19-19)scripts/generate-lcov.js (6)
coverageData(171-171)args(151-151)outputFile(162-162)outputDir(183-183)fileCount(203-203)fileSize(197-197)scripts/run-shard.js (2)
count(16-16)idx(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (3)
scripts/merge-coverage.js (1)
15-94: Coverage merge and CLI flow look correct and robustThe merge logic for
s,b,f, andlcorrectly accumulates counts, and the updated branch merge usingmaxLenavoids dropping extra branch entries. CLI handling (argument validation, input directory checks, non-empty merged result, and JSON verification) is appropriate for CI usage and should be a safe drop‑in replacement fornyc merge.Also applies to: 97-187
scripts/fix-nyc-compatibility.js (2)
122-181: Cypress coverage short‑circuiting aligns with objectivesThe two Cypress handling branches (json-summary detection and
isCypressCall) correctly short‑circuit problematic coverage invocations by writing a minimal.nyc_output/out.jsonand exiting cleanly, which should prevent test hangs without affecting the main nyc merge/report flow.
72-105: CLI detection approach is working as intended in practiceThe concern about
require.main === modulenot capturing CLI invocations is theoretically sound. However, empirical evidence from prior PRs confirms this wrapper is functioning correctly: PR 2457 documents active use ofnyc mergein GitHub Actions workflows, and PR 4901 confirms the wrapper design (limited to merge/report) is intentional and working. If CLI detection were broken, these commands would fail. The implementation either correctly preservesrequire.mainthrough the bin/nyc.js→index.js chain, or the repo's workflows invoke index.js directly in a way that sets it correctly. No action needed.Likely an incorrect or invalid review comment.
| if (command === "report") { | ||
| const reporterIndex = args.indexOf("--reporter"); | ||
| const reportDirIndex = args.indexOf("--report-dir"); | ||
| let reporter = "lcov"; | ||
| let reportDir = "./coverage/vitest"; | ||
| if (reporterIndex !== -1 && args[reporterIndex + 1]) { | ||
| reporter = args[reporterIndex + 1]; | ||
| } | ||
| if (reportDirIndex !== -1 && args[reportDirIndex + 1]) { | ||
| reportDir = args[reportDirIndex + 1]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for nyc report invocations in workflows and configuration files
echo "=== Searching for 'nyc report' usage ==="
rg -n "nyc report" --type yaml --type json --type javascript --type shell 2>/dev/null || echo "No matches with restricted types"
echo ""
echo "=== Broader search for nyc report ==="
rg "nyc report" -B2 -A2 2>/dev/null || echo "No matches found"
echo ""
echo "=== Searching for --reporter= form ==="
rg -- "--reporter=" -B1 -A1 2>/dev/null || echo "No --reporter= matches found"
echo ""
echo "=== Searching for --report-dir= form ==="
rg -- "--report-dir=" -B1 -A1 2>/dev/null || echo "No --report-dir= matches found"Repository: PalisadoesFoundation/talawa-admin
Length of output: 210
Consider supporting --reporter= and --report-dir= flag forms for consistency
The current code only parses space-separated flags like --reporter lcov. If workflows switch to the --reporter=lcov or --report-dir=coverage/vitest forms in the future, they'll be ignored and defaults will be used instead. For robustness, you could also check for these combined forms in args before falling back to defaults.
🤖 Prompt for AI Agents
In scripts/fix-nyc-compatibility.js around lines 209 to 221, the reporter and
reportDir parsing only handles space-separated flags (e.g. "--reporter lcov")
and ignores combined forms ("--reporter=lcov" / "--report-dir=coverage/...").
Update the parsing to also check args entries for strings that start with
"--reporter=" and "--report-dir=" and extract the value after the '='; keep the
existing index-based checks so space-separated flags still work, and ensure the
combined-form value overrides the default (and follows the same precedence as
the current checks).
|
Thanks for the feedback. I agree with your concerns. The original issue was straightforward to fix, but attempting to patch nyc's internal files ended up introducing unnecessary complexity and instability. I will remove the custom wrapper and focus on packages directly used.
Solution: |
|
There must be a drop-in replacement for NYC that can be used. Please research it. |
|
Hi @palisadoes, I’ve put a lot of effort into exploring different approaches for this issue, but I wasn’t able to reach a clean, stable fix for the CI coverage setup. To avoid blocking progress and to focus on issues where I can contribute more effectively, I believe it may be best for someone else to take over this task. Thanks for your understanding. I’ll continue contributing to other issues in the project. |
What kind of change does this PR introduce?
Bugfix - resolves multiple Docker build errors after migrating from npm → pnpm. Ensures clean and error-free builds for dev, prod, and deploy environments, without altering any application functionality.
Issue Number:
Fixes #4753
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
1. Fix: Dependencies That Must Be Allowed to Run Build Scripts
dev, prod, deploy) to safely install dependencies without triggering script-blocked warnings.2. Fix PDFme and form-render Dependencies
form-render,rc-color-picker, andvirtualizedtableforantd4no longer show peer mismatch warnings3. Fix Dynamic / Static Importations
AdminPluginFileServiceregistry.tsx) is never dynamically imported anywhere except where intended.Note:
ESLint errors appearing during commit originate from existing code and are unrelated to the Docker/pnpm migration issue.
Therefore, no ESLint refactors were made to avoid unnecessary scope expansion or risk.
The ESLint failures stem from pre existing code in unrelated files.
The PR does not introduce new lint issues, only touches files required to fix the Docker build errors.
Does this PR introduce a breaking change?
No
Checklist
CodeRabbit AI Review
Test Coverage
Other information
Have you read the contributing guide?
Summary by CodeRabbit
Refactor
New Features
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.