Skip to content

Conversation

@AishDani
Copy link
Contributor

No description provided.

@AishDani AishDani requested a review from a team as a code owner June 25, 2025 09:50
@sauravraw sauravraw requested a review from Copilot June 25, 2025 09:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request addresses the bugfix for CMG-616 by updating UI components, API service calls, and data mapping logic to ensure proper project creation, migration flow, and improved state management. Key changes include:

  • Adding navigation and Redux dispatch calls in the Projects page to trigger project creation and start migration.
  • Refactoring locale mapping and field mapping logic across multiple components (Modal, DestinationStack, ContentMapper, AdvancePropertise, etc.) to consistently use new identifiers such as backupFieldUid.
  • Updating API service methods (WordPress and migration services) to properly handle asynchronous updates and log messaging.

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ui/src/pages/Projects/index.tsx Introduces new hooks (useNavigate, useDispatch) and calls to the createProject API with subsequent state updates and navigation.
ui/src/pages/Migration/index.tsx Refines locale mapping logic using Object.entries and explicit label trimming.
ui/src/components/Modal/modal.interface.ts and index.tsx Adds new interface definitions and simplifies the modal submit handler.
ui/src/components/DestinationStack & Actions/LoadLanguageMapper.tsx Updates language mapper functionality for consistent handling of locales and renames parameters (e.g., uid, isStackChanged).
ui/src/components/ContentMapper/index.tsx Refactors field mapping logic to use backupFieldUid and adjusts condition checks accordingly.
ui/src/components/AuditLogs/index.tsx Replaces the table key with tableUid to clarify its purpose.
ui/src/components/AdvancePropertise Updates function calls with an additional parameter to leverage contentstackFieldUid for enhanced mapping.
api/src/services/wordpress.service.ts and migration.service.ts Implements asynchronous handling improvements and additional logging in project migration.
.talismanrc Updates file ignore configuration for migration and audit log related files.
Comments suppressed due to low confidence (3)

ui/src/components/DestinationStack/Actions/LoadLanguageMapper.tsx:277

  • Consider renaming 'handleLanguageDeletaion' to 'handleLanguageDeletion' to correct the spelling and improve clarity.
  const handleLanguageDeletaion = async (index: number, locale: { label: string; value: string }) => {

ui/src/components/ContentMapper/index.tsx:1481

  • Verify that the use of 'backupFieldUid' accurately differentiates entries and ensure that it is consistently initialized throughout the data model.
        if (!existingField[data?.backupFieldUid] && OptionsForRow?.[0]) {         

ui/src/components/AuditLogs/index.tsx:146

  • [nitpick] The change from 'tableKey' to 'tableUid' improves clarity; ensure this name consistently represents its purpose across the component.
            setTableUid((prevUid) => prevUid + 1);

.value();
if (index > -1) {
ProjectModelLowdb.update((data: any) => {
await ProjectModelLowdb.update((data: any) => {
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

The addition of 'await' ensures that the project update completes before proceeding, which aligns with proper asynchronous handling practices.

Suggested change
await ProjectModelLowdb.update((data: any) => {
await await ProjectModelLowdb.update((data: any) => {

Copilot uses AI. Check for mistakes.
@sayalijoshi27 sayalijoshi27 merged commit cff90bb into pre-dev Jun 25, 2025
7 checks passed
@sayalijoshi27 sayalijoshi27 deleted the bugfix/cmg-616 branch June 25, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants