Skip to content

Conversation

brayn003
Copy link
Contributor

@brayn003 brayn003 commented Apr 28, 2025

Description

  • Adds override feature when importing artifacts

EE PR https://github.com/appsmithorg/appsmith-ee/pull/7251

Automation

/ok-to-test tags="@tag.Git"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14727350382
Commit: 79ceda0
Cypress dashboard.
Tags: @tag.Git
Spec:


Tue, 29 Apr 2025 09:54:34 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced an import override modal for handling duplicate artifact imports from Git, allowing users to override existing artifacts with new ones.
    • Enhanced user messaging with detailed prompts and localized strings for import override scenarios.
  • Bug Fixes

    • Improved error handling during artifact import, specifically distinguishing duplicate key errors and providing clearer feedback.
  • Improvements

    • Streamlined artifact import flow, including better state management and more robust error reporting.
    • Refined backend service interfaces and reduced unnecessary dependencies for improved maintainability.

Copy link
Contributor

coderabbitai bot commented Apr 28, 2025

Walkthrough

This update introduces a comprehensive Git artifact import override feature across both client and server codebases. On the client side, new Redux state, selectors, actions, and React components handle the display and logic for an import override modal when a duplicate artifact is detected. The import modal and saga workflows are updated to support override flows, with new error codes and messaging. On the server, new error types, DTO fields, and error handling logic are added to distinguish duplicate artifact import errors. Several service interfaces and implementations are refactored for modularity, improved error handling, and support for the new override behavior.

Changes

File(s) / Path(s) Change Summary
app/client/src/ce/pages/Applications/index.tsx
app/client/src/git/index.ts
Import and export of new GitImportOverrideModal component; inclusion in UI when Git modals are enabled.
app/client/src/git/components/ImportOverrideModal/index.tsx
ImportOverrideModalView.tsx
New React components for the import override modal, with state, callbacks, and UI for confirming artifact overrides.
app/client/src/git/ce/constants/messages.tsx Added localized message constants for the import override modal UI.
app/client/src/git/hooks/useImport.ts
useMessage.ts
Enhanced hook to manage import override state and actions; new hook for message interpolation with placeholders.
app/client/src/git/requests/gitImportRequest.ts
gitImportRequest.types.ts
Import request now supports an override parameter; interface extended accordingly.
app/client/src/git/store/actions/uiActions.ts
gitGlobalSlice.ts
helpers/initialState.ts
types.ts
Redux state, actions, and reducers extended to manage import override details and reset logic. Initial state and types updated.
app/client/src/git/store/selectors/gitGlobalSelectors.ts New selectors for import override modal open state and details.
app/client/src/git/components/ImportModal/index.tsx Updated to always call import with override: false and reset both SSH key and import state on reset.
app/client/src/git/constants/enums.ts Added new error code for duplicate artifact override.
app/client/src/git/sagas/gitImportSaga.ts Saga updated to handle duplicate artifact errors, trigger override modal, and reset override details on success.
app/client/src/git/store/actions/gitImportActions.ts Added action to reset import loading and error state.
app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java
appsmith-interfaces/src/main/java/com/appsmith/external/git/FileInterface.java
Added method for reconstructing package.json from Git repository; field visibility changes for extensibility.
appsmith-interfaces/src/main/java/com/appsmith/external/models/ErrorType.java Added new error type for artifact import errors.
appsmith-server/src/main/java/com/appsmith/server/dtos/GitConnectDTO.java Added override field to DTO for artifact import override support.
appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java
AppsmithErrorCode.java
Added new error and error code for duplicate key write during artifact import.
appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCE.java
CentralGitServiceCEImpl.java
Refactored import logic: removed overloaded method, improved modularity, error handling, and artifact creation flow.
appsmith-server/src/main/java/com/appsmith/server/git/central/GitHandlingServiceCE.java
fs/GitFSServiceCEImpl.java
Added methods to obtain artifact type and identifier from Git and to remove repository with artifact type context.
appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCECompatibleImpl.java
GitFSServiceImpl.java
Constructors simplified: removed unused dependencies and parameters for leaner instantiation.
appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java Changed field visibility and improved error logging for repository movement.
appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java Added specific error handling for duplicate key exceptions during artifact import, mapping to new error code.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as ImportModal/OverrideModal
    participant Redux
    participant Saga
    participant Server

    User->>UI: Initiate Git Import
    UI->>Redux: Dispatch import action
    Redux->>Saga: Saga observes import action
    Saga->>Server: Send import request (override: false)
    Server-->>Saga: Error (Duplicate key)
    Saga->>Redux: Set import override details
    Redux->>UI: Show ImportOverrideModal
    User->>UI: Confirm override
    UI->>Redux: Dispatch import with override: true
    Redux->>Saga: Saga observes import action
    Saga->>Server: Send import request (override: true)
    Server-->>Saga: Success
    Saga->>Redux: Reset import override details
    Redux->>UI: Close modal and update UI
Loading

Suggested reviewers

  • sondermanish

Poem

🎉
When artifacts clash and keys collide,
A modal appears, with choices to guide.
Override or cancel, the user decides,
Redux and sagas, working side by side.
New errors, new hooks, and fields in the flow—
Git imports are smarter, just so you know!
🚀


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 19e7e98 and 79ceda0.

📒 Files selected for processing (1)
  • app/client/src/git/constants/enums.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/git/constants/enums.ts
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: server-spotless / spotless-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@brayn003 brayn003 changed the title chore: added overriding feature CE chore: added import override CE Apr 28, 2025
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Apr 28, 2025
@brayn003 brayn003 self-assigned this Apr 28, 2025
@brayn003 brayn003 added the Git Product Issues related to version control product label Apr 28, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 114dcbb and 44c644e.

📒 Files selected for processing (3)
  • app/client/src/ce/pages/Applications/index.tsx (2 hunks)
  • app/client/src/git/components/ImportOverrideModal/index.tsx (1 hunks)
  • app/client/src/git/index.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
app/client/src/ce/pages/Applications/index.tsx (1)
Learnt from: brayn003
PR: appsmithorg/appsmith#38171
File: app/client/src/git/ce/components/GitModals/index.tsx:1-7
Timestamp: 2024-12-16T19:45:00.807Z
Learning: The imports in `GitModals` for `ConnectModal`, `DisableAutocommitModal`, `DisconnectModal`, and `SettingsModal` are correct and should not be flagged.
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-lint / client-lint
🔇 Additional comments (4)
app/client/src/git/index.ts (1)

9-9: Export looks good.

The new export statement follows the existing pattern for Git-related exports.

app/client/src/ce/pages/Applications/index.tsx (2)

138-138: Import looks good.

The import statement is correctly added to the existing Git imports.


149-149:

❓ Verification inconclusive

Missing props for GitImportOverrideModal.

The component is rendered without any props. While artifactType has a default value, consider whether a specific artifact type should be provided for better user experience.


🏁 Script executed:

#!/bin/bash
# Check usage patterns of similar Git modals in the codebase
rg -A 2 -B 2 "GitImportModal|GitRepoLimitErrorModal" --type tsx

Length of output: 93


🏁 Script executed:

#!/bin/bash
# Locate the file defining GitImportOverrideModal
file=$(rg -l "GitImportOverrideModal" -g "*.tsx" | head -n1)
echo "Found component in: $file"

# Show the component declaration/signature
rg -nE "function GitImportOverrideModal|const GitImportOverrideModal" "$file" -A 5

# Show the props interface for the modal
rg -n "interface.*Props" "$file" -A 5

# Show where artifactType default is set (if any)
rg -n "artifactType" "$file" -A 2

Length of output: 1081


#!/bin/bash
# 1. Show import line for GitImportOverrideModal in index.tsx
rg -n "import .*GitImportOverrideModal" -n "from" app/client/src/ce/pages/Applications/index.tsx

# 2. Search across the repo for the component definition
rg -nE "export (function|const) GitImportOverrideModal" -g "*.tsx"

# 3. If not found, search by filename
rg -l "GitImportOverrideModal" -g "*.tsx" -g "*.ts"

Please confirm GitImportOverrideModal’s required props

I don’t see any props passed to <GitImportOverrideModal />. While artifactType may have a default, it’s worth verifying whether we should supply a specific value (or any other props) here for clarity and improved UX.

  • Check the GitImportOverrideModal signature/props interface to confirm which props are required or recommended.
  • If artifactType should differ from the default, pass it explicitly:
         {/* before */}
  •  <GitImportOverrideModal />
    
  •  <GitImportOverrideModal artifactType="YourDesiredType" /* …other props… */ />
    
    
    
app/client/src/git/components/ImportOverrideModal/index.tsx (1)

18-20: Interface looks good, but may need expansion.

The interface is properly defined with an optional artifact type, but consider if additional props are needed for full functionality.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 44c644e and 2b05ddf.

📒 Files selected for processing (12)
  • app/client/src/git/ce/constants/messages.tsx (1 hunks)
  • app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (1 hunks)
  • app/client/src/git/components/ImportOverrideModal/index.tsx (1 hunks)
  • app/client/src/git/hooks/useImport.ts (2 hunks)
  • app/client/src/git/hooks/useMessage.ts (1 hunks)
  • app/client/src/git/requests/gitImportRequest.ts (1 hunks)
  • app/client/src/git/requests/gitImportRequest.types.ts (1 hunks)
  • app/client/src/git/store/actions/uiActions.ts (3 hunks)
  • app/client/src/git/store/gitGlobalSlice.ts (2 hunks)
  • app/client/src/git/store/helpers/initialState.ts (1 hunks)
  • app/client/src/git/store/selectors/gitGlobalSelectors.ts (1 hunks)
  • app/client/src/git/store/types.ts (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/client/src/git/ce/constants/messages.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/git/components/ImportOverrideModal/index.tsx
🧰 Additional context used
🧬 Code Graph Analysis (6)
app/client/src/git/store/types.ts (1)
app/client/src/git/requests/gitImportRequest.types.ts (1)
  • GitImportRequestParams (5-13)
app/client/src/git/store/actions/uiActions.ts (2)
app/client/src/git/store/types.ts (1)
  • GitGlobalReduxState (95-104)
app/client/src/git/requests/gitImportRequest.types.ts (1)
  • GitImportRequestParams (5-13)
app/client/src/git/hooks/useImport.ts (3)
app/client/src/git/store/selectors/gitGlobalSelectors.ts (2)
  • selectImportOverrideModalOpen (17-18)
  • selectImportOverrideParams (20-21)
app/client/src/git/requests/gitImportRequest.types.ts (1)
  • GitImportRequestParams (5-13)
app/client/src/git/store/gitGlobalSlice.ts (1)
  • gitGlobalActions (55-55)
app/client/src/git/store/gitGlobalSlice.ts (1)
app/client/src/git/store/actions/uiActions.ts (2)
  • resetImportOverrideParamsAction (51-55)
  • setImportOverrideParamsAction (57-64)
app/client/src/git/store/selectors/gitGlobalSelectors.ts (1)
app/client/src/git/store/types.ts (1)
  • GitRootState (116-118)
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (2)
app/client/src/git/hooks/useMessage.ts (1)
  • useMessage (3-12)
app/client/src/git/ce/constants/messages.tsx (1)
  • IMPORT_OVERRIDE_MODAL (7-13)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
🔇 Additional comments (18)
app/client/src/git/hooks/useMessage.ts (1)

3-12: LGTM - A clean utility hook for message interpolation.

The hook implementation is efficient and properly memoized. It correctly replaces placeholders using regex with their corresponding values from the args object.

Consider adding null/undefined checks for the msg parameter to make the hook more robust.

export default function useMessage(msg: string, args: Record<string, string>) {
  return useMemo(() => {
+   if (!msg) return "";
    const msgWithArgs = msg.replace(/\{\{([^}]+)\}\}/g, (match, p1) => {
      // p1 is the key from {{key}} in the message
      return args[p1] || match;
    });

    return msgWithArgs;
  }, [msg, args]);
}
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (2)

50-68: Modal implementation looks good.

The modal structure is well-organized with appropriate components for header, body, and footer. The callbacks are properly memoized.


11-11:

❌ Incorrect review comment

Import path inconsistency detected.

The import statement references "git/ee/constants/messages" but based on the AI summary, messages are defined in "git/ce/constants/messages.tsx".


🏁 Script executed:

#!/bin/bash
# Check if both paths exist and their content
echo "Checking for CE constants path..."
[ -f "app/client/src/git/ce/constants/messages.tsx" ] && echo "CE path exists" || echo "CE path doesn't exist"
echo "Checking for EE constants path..."
[ -f "app/client/src/git/ee/constants/messages.tsx" ] && echo "EE path exists" || echo "EE path doesn't exist"

echo "Content comparison if both exist:"
if [ -f "app/client/src/git/ce/constants/messages.tsx" ] && [ -f "app/client/src/git/ee/constants/messages.tsx" ]; then
  echo "Diffing files:"
  diff "app/client/src/git/ce/constants/messages.tsx" "app/client/src/git/ee/constants/messages.tsx" | head -n 20
fi

Length of output: 1372


Import path for EE constants is correct.

Both

  • app/client/src/git/ce/constants/messages.tsx
  • app/client/src/git/ee/constants/messages.tsx

define IMPORT_OVERRIDE_MODAL. Importing from "git/ee/constants/messages" is intentional for the Enterprise Edition build. No changes required.

Likely an incorrect or invalid review comment.

app/client/src/git/store/helpers/initialState.ts (1)

171-171: Proper initialization of the new Redux state property.

Adding importOverrideParams: null follows the established pattern for the Git module's state management.

app/client/src/git/requests/gitImportRequest.types.ts (1)

12-12: Clean addition of override flag.

The optional boolean property maintains backward compatibility while enabling the new override functionality.

app/client/src/git/store/types.ts (2)

23-23: Added import for GitImportRequestParams type.

The import is correctly added to support the new state property.


102-102: New state property added for import override parameters.

The importOverrideParams property is properly typed as GitImportRequestParams | null to store parameters related to Git import override requests. This aligns with the PR objective of adding import override functionality.

app/client/src/git/requests/gitImportRequest.ts (1)

20-23: Added override parameter handling to import request.

The implementation correctly:

  1. Extracts the override parameter with a default value of false
  2. Reconstructs the request body to include this parameter
  3. Maintains backward compatibility

This change enables the backend to know when an override is intended during import operations.

app/client/src/git/store/gitGlobalSlice.ts (2)

13-17: Updated imports to include new action creators.

The import statement is properly refactored to include the new actions for managing import override parameters.


49-50: Added reducers for managing import override parameters.

Two new reducers are correctly added:

  • resetImportOverrideParams: To clear the override parameters state
  • setImportOverrideParams: To set the override parameters

This follows the established Redux pattern in the codebase and completes the state management for the import override feature.

app/client/src/git/store/selectors/gitGlobalSelectors.ts (1)

17-22: Added selectors for import override modal state.

Two well-implemented selectors:

  1. selectImportOverrideModalOpen: Correctly uses double negation to derive modal open state from the existence of parameters
  2. selectImportOverrideParams: Properly retrieves parameters with null fallback

These selectors follow the established pattern and provide a clean interface for components to access the import override state.

app/client/src/git/hooks/useImport.ts (4)

6-7: Import statements correctly added

These imports are necessary for the new import override functionality.


33-36: Selectors implemented properly

Good addition of selectors for the import override modal state and parameters.


37-46: Callbacks implemented with best practices

Both callbacks are properly implemented with useCallback for performance optimization and have the correct dependency array.


54-57: Return values properly structured

The new properties are well-named and consistent with the existing pattern in the hook.

app/client/src/git/store/actions/uiActions.ts (3)

6-6: Import statement correctly added

The GitImportRequestParams type import is necessary for the new action creators.


51-55: Reset action implemented correctly

This action follows the established pattern for reset actions and properly sets the state to null.


57-64: Set action implemented correctly

The action creates a shallow copy of the payload, which is appropriate for this use case since the parameters are stored as-is.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (2)

34-35: Simplify null handling with default empty strings

The component sets default values to null but then converts them to empty strings in the useMessage call. This adds unnecessary complexity.

-  newArtifactName = null,
-  oldArtifactName = null,
+  newArtifactName = "",
+  oldArtifactName = "",

And then:

  const modalDescription = useMessage(IMPORT_OVERRIDE_MODAL.DESCRIPTION, {
-    newArtifactName: newArtifactName ?? "",
-    oldArtifactName: oldArtifactName ?? "",
+    newArtifactName,
+    oldArtifactName,
    artifactType,
  });

Also applies to: 41-43


72-79: Consider disabling the button during loading state

While the component prevents multiple submissions by checking isImportLoading, also disabling the button would provide better visual feedback to users.

  <Button
    isLoading={isImportLoading}
+   disabled={isImportLoading}
    onClick={handleImport}
    size="md"
    type="submit"
  >
    {ctaBtnText}
  </Button>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 6c53a10 and 73ac3d7.

📒 Files selected for processing (3)
  • app/client/src/git/ce/constants/messages.tsx (1 hunks)
  • app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (1 hunks)
  • app/client/src/git/components/ImportOverrideModal/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/client/src/git/ce/constants/messages.tsx
  • app/client/src/git/components/ImportOverrideModal/index.tsx
🧰 Additional context used
🧠 Learnings (1)
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (1)
Learnt from: brayn003
PR: appsmithorg/appsmith#40462
File: app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx:34-40
Timestamp: 2025-04-28T16:16:02.133Z
Learning: The Appsmith team prefers not to include HTML markup in string constants. Text styling or emphasis should be handled through proper React components rather than HTML tags in strings.
🧬 Code Graph Analysis (1)
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (2)
app/client/src/git/hooks/useMessage.ts (1)
  • useMessage (3-12)
app/client/src/git/ce/constants/messages.tsx (1)
  • IMPORT_OVERRIDE_MODAL (7-13)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (2)
app/client/src/git/components/ImportOverrideModal/ImportOverrideModalView.tsx (2)

64-66: Use consistent text styling approach

Per the learnings from previous reviews, the team prefers to avoid HTML markup in string constants. The current implementation correctly uses the Text component for plain text rendering.


59-82: Modal implementation looks good

The modal structure and implementation follow good practices using the component library. The callbacks are properly memoized and the component handles loading states appropriately.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
app/client/src/git/store/actions/gitImportActions.ts (2)

52-57: Consider adding a docstring for maintainability.

While the function is self-explanatory, adding a brief comment would help developers understand the intended use case for this reset action.

+/**
+ * Action to reset the Git import state, clearing any loading state and errors.
+ * Used when cleaning up after import operations or when closing import-related UI.
+ */
export const resetGitImportAction = (state: GitGlobalReduxState) => {
  state.gitImport.loading = false;
  state.gitImport.error = null;

  return state;
};

52-57: Consider consistency with other action creators.

Other action creators in this file use a PayloadAction parameter (even when unused) for consistency. Consider following the same pattern for this new action.

-export const resetGitImportAction = (state: GitGlobalReduxState) => {
+export const resetGitImportAction = (
+  state: GitGlobalReduxState,
+  // need this here to preserve interface
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
+  action: PayloadAction<void>,
+) => {
  state.gitImport.loading = false;
  state.gitImport.error = null;

  return state;
};
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 73ac3d7 and 11abd6b.

📒 Files selected for processing (6)
  • app/client/src/git/ce/constants/messages.tsx (1 hunks)
  • app/client/src/git/components/ImportModal/index.tsx (3 hunks)
  • app/client/src/git/components/ImportOverrideModal/index.tsx (1 hunks)
  • app/client/src/git/hooks/useImport.ts (3 hunks)
  • app/client/src/git/store/actions/gitImportActions.ts (1 hunks)
  • app/client/src/git/store/gitGlobalSlice.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • app/client/src/git/ce/constants/messages.tsx
  • app/client/src/git/hooks/useImport.ts
  • app/client/src/git/components/ImportModal/index.tsx
  • app/client/src/git/store/gitGlobalSlice.ts
  • app/client/src/git/components/ImportOverrideModal/index.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/client/src/git/store/actions/gitImportActions.ts (1)
app/client/src/git/store/types.ts (1)
  • GitGlobalReduxState (95-104)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
🔇 Additional comments (1)
app/client/src/git/store/actions/gitImportActions.ts (1)

52-57: Clean implementation of action for resetting import state.

The added resetGitImportAction function properly resets the Git import state by setting both loading to false and clearing any errors.

@brayn003 brayn003 added ok-to-test Required label for CI Git Platform Issues related to the git & the app platform labels Apr 28, 2025
@sondermanish sondermanish requested review from rahulbarwal and removed request for a team April 29, 2025 08:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java (2)

371-373: hydrateLatest is now a no-op – is this still needed?

The new implementation just wraps the incoming Artifact in Mono.just, providing no hydration logic.
If the previous behaviour purposely re-queried or enriched the artifact, this change may introduce stale data bugs; if the method is indeed obsolete, consider removing it and inlining the call sites to keep the class lean.


278-281: Potential memory hit when loading all datasources into a list

getAllByWorkspaceIdWithStorages(..).collectList() materialises the entire datasource set in memory.
If a workspace can host many datasources, consider streaming with buffer/window or pushing the conflict check down to the DB/service layer instead of collecting the whole list.

app/client/src/instrumentation/index.ts (1)

140-149: Prefer Object.entries to avoid inherited keys

for…in walks the prototype chain; if someone passes an object with polluted prototypes you’d stringify unintended keys. Use Object.entries / Object.keys to stay on safe ground.

-  if (hint) {
-    for (const key in hint) {
-      if (typeof hint[key] === "string") {
-        context[key] = hint[key];
-      } else {
-        context[key] = JSON.stringify(hint[key]);
-      }
-    }
-  }
+  if (hint) {
+    for (const [key, value] of Object.entries(hint)) {
+      context[key] =
+        typeof value === "string" ? value : JSON.stringify(value);
+    }
+  }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 91b03e0 and 19e7e98.

⛔ Files ignored due to path filters (1)
  • app/client/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (66)
  • app/client/package.json (1 hunks)
  • app/client/src/AppErrorBoundry.tsx (2 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx (2 hunks)
  • app/client/src/actions/pageActions.tsx (2 hunks)
  • app/client/src/api/helpers/validateJsonResponseMeta.ts (2 hunks)
  • app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts (1 hunks)
  • app/client/src/api/interceptors/response/failureHandlers/handleNotFoundError.ts (2 hunks)
  • app/client/src/api/interceptors/response/failureHandlers/handleUnauthorizedError.ts (2 hunks)
  • app/client/src/ce/sagas/PageSagas.tsx (2 hunks)
  • app/client/src/ce/utils/AnalyticsUtil.tsx (2 hunks)
  • app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx (2 hunks)
  • app/client/src/components/editorComponents/ErrorBoundry.tsx (2 hunks)
  • app/client/src/components/propertyControls/TabControl.tsx (2 hunks)
  • app/client/src/ee/sagas/index.tsx (2 hunks)
  • app/client/src/git/sagas/helpers/handleApiErrors.ts (2 hunks)
  • app/client/src/index.tsx (1 hunks)
  • app/client/src/instrumentation/PageLoadInstrumentation.ts (0 hunks)
  • app/client/src/instrumentation/generateTraces.ts (1 hunks)
  • app/client/src/instrumentation/index.ts (4 hunks)
  • app/client/src/instrumentation/sendFaroErrors.ts (0 hunks)
  • app/client/src/pages/Editor/Canvas.tsx (2 hunks)
  • app/client/src/pages/UserAuth/Login.tsx (2 hunks)
  • app/client/src/pages/UserAuth/SignUp.tsx (2 hunks)
  • app/client/src/pages/UserAuth/VerifyUser.tsx (2 hunks)
  • app/client/src/pages/UserAuth/helpers.ts (2 hunks)
  • app/client/src/reducers/evaluationReducers/treeReducer.ts (2 hunks)
  • app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2 hunks)
  • app/client/src/sagas/AppThemingSaga.tsx (2 hunks)
  • app/client/src/sagas/ErrorSagas.tsx (2 hunks)
  • app/client/src/sagas/EvalErrorHandler.ts (5 hunks)
  • app/client/src/sagas/EvaluationsSaga.ts (3 hunks)
  • app/client/src/sagas/FormEvaluationSaga.ts (2 hunks)
  • app/client/src/sagas/InitSagas.ts (4 hunks)
  • app/client/src/sagas/ReplaySaga.ts (4 hunks)
  • app/client/src/sagas/WidgetLoadingSaga.ts (2 hunks)
  • app/client/src/sagas/layoutConversionSagas.ts (2 hunks)
  • app/client/src/utils/Analytics/sentry.ts (0 hunks)
  • app/client/src/utils/getPathAndValueFromActionDiffObject.ts (2 hunks)
  • app/client/src/utils/helpers.test.ts (2 hunks)
  • app/client/src/utils/helpers.tsx (2 hunks)
  • app/client/src/widgets/CurrencyInputWidget/widget/index.tsx (4 hunks)
  • app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx (2 hunks)
  • app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.ts (2 hunks)
  • app/client/src/widgets/MapChartWidget/component/utilities.ts (2 hunks)
  • app/client/src/widgets/PhoneInputWidget/widget/index.tsx (2 hunks)
  • app/client/src/widgets/RichTextEditorWidget/component/index.tsx (1 hunks)
  • app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx (2 hunks)
  • app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx (2 hunks)
  • app/client/src/widgets/TabsMigrator/widget/index.tsx (2 hunks)
  • app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx (4 hunks)
  • app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx (2 hunks)
  • app/client/src/workers/Evaluation/errorModifier.ts (2 hunks)
  • app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java (3 hunks)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/FileInterface.java (1 hunks)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ErrorType.java (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/GitConnectDTO.java (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithErrorCode.java (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCE.java (0 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java (8 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/GitHandlingServiceCE.java (2 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCECompatibleImpl.java (0 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java (3 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceImpl.java (0 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java (2 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java (2 hunks)
💤 Files with no reviewable changes (6)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCE.java
  • app/client/src/instrumentation/sendFaroErrors.ts
  • app/client/src/utils/Analytics/sentry.ts
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceImpl.java
  • app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCECompatibleImpl.java
  • app/client/src/instrumentation/PageLoadInstrumentation.ts
✅ Files skipped from review due to trivial changes (27)
  • app/client/src/utils/getPathAndValueFromActionDiffObject.ts
  • app/client/package.json
  • app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.ts
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ErrorType.java
  • app/client/src/pages/UserAuth/VerifyUser.tsx
  • app/client/src/api/interceptors/response/failureHandlers/handleUnauthorizedError.ts
  • app/client/src/widgets/MapChartWidget/component/utilities.ts
  • app/client/src/sagas/layoutConversionSagas.ts
  • app/client/src/git/sagas/helpers/handleApiErrors.ts
  • app/client/src/actions/pageActions.tsx
  • app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/GitConnectDTO.java
  • app/client/src/pages/UserAuth/helpers.ts
  • app/client/src/api/helpers/validateJsonResponseMeta.ts
  • app/client/src/sagas/FormEvaluationSaga.ts
  • app/client/src/components/editorComponents/ErrorBoundry.tsx
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx
  • app/client/src/pages/UserAuth/SignUp.tsx
  • app/client/src/AppErrorBoundry.tsx
  • app/client/src/widgets/CurrencyInputWidget/widget/index.tsx
  • app/client/src/ce/utils/AnalyticsUtil.tsx
  • app/client/src/ce/sagas/PageSagas.tsx
  • app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx
  • app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithErrorCode.java
  • app/client/src/sagas/EvaluationsSaga.ts
  • app/client/src/sagas/ActionExecution/PluginActionSaga.ts
  • app/client/src/api/interceptors/response/failureHandlers/handleNotFoundError.ts
  • app/client/src/instrumentation/generateTraces.ts
🧰 Additional context used
🧠 Learnings (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java (2)
Learnt from: sondermanish
PR: appsmithorg/appsmith#36413
File: app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java:514-518
Timestamp: 2024-09-20T07:55:30.235Z
Learning: In the `ImportServiceCEImpl` class, when throwing new `AppsmithException` instances, avoid adding the original `Throwable` as the cause due to messaging constraints.
Learnt from: sondermanish
PR: appsmithorg/appsmith#36413
File: app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java:514-518
Timestamp: 2024-10-08T15:32:34.114Z
Learning: In the `ImportServiceCEImpl` class, when throwing new `AppsmithException` instances, avoid adding the original `Throwable` as the cause due to messaging constraints.
🧬 Code Graph Analysis (22)
app/client/src/ee/sagas/index.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts (2)
app/client/src/api/types.ts (1)
  • ApiResponse (14-18)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/PhoneInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/reducers/evaluationReducers/treeReducer.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/workers/Evaluation/errorModifier.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/pages/UserAuth/Login.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/AppThemingSaga.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/pages/Editor/Canvas.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/components/propertyControls/TabControl.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/WidgetLoadingSaga.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/ErrorSagas.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/utils/helpers.test.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/widgets/TabsMigrator/widget/index.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/InitSagas.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/ReplaySaga.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/utils/helpers.tsx (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
app/client/src/sagas/EvalErrorHandler.ts (1)
app/client/src/instrumentation/index.ts (1)
  • appsmithTelemetry (184-184)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: server-spotless / spotless-check
  • GitHub Check: client-build / client-build
  • GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (61)
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/FileInterface.java (1)

80-80: New method signature added for package.json reconstruction.

This method signature Mono<Object> reconstructPackageJsonFromGitRepository(Path repoSuffix) provides a contract for Git repository package.json reconstruction functionality. The implementation is correctly declared to return a reactive Mono to maintain consistency with other methods in this interface.

app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/ImportServiceCEImpl.java (2)

40-40: Added import for DuplicateKeyException.

This import is necessary for the specific error handling added later in the file.


535-538: Improved error handling for duplicate artifacts during import.

Added specific error handling for duplicate key exceptions during artifact import. This properly separates duplicate key errors from generic import errors, allowing more precise error reporting to the client.

Note: This implementation correctly follows the established pattern of not including the original Throwable cause in the AppsmithException, as mentioned in the project learnings.

app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java (1)

879-886: New error type for duplicate key conflicts during artifact import.

This new error enum properly defines a server-side error for duplicate key conflicts during artifact import. The HTTP status code, error messages, and error type classification all follow the established pattern.

app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java (2)

87-87: Changed field visibility from private to protected.

The visibility of gitServiceConfig and scheduler fields has been changed from private to protected to allow access from subclasses. This refactoring supports extensibility of the class.

Also applies to: 101-101


1253-1257: Implementation of the package.json reconstruction method.

This method properly implements the interface contract by immediately returning an error Mono indicating that the feature is not supported in the CE implementation. This is an appropriate approach for functionality that's only available in an enterprise edition.

app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java (2)

98-98: Access modifier change improves extensibility

Changing fileUtils from private to protected aligns with the other dependency fields in this class and enables proper subclassing, which is consistent with the CE/EE pattern used throughout the codebase.


830-833: Improved error logging

Enhanced error logging to include the full error object rather than just the message. This provides more context for debugging repository move issues, including the complete stack trace.

app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/GitHandlingServiceCE.java (2)

44-45: New method to retrieve artifact type and identifier

This new method extends the API to return both artifact type and identifier in a single operation, reducing the need for multiple repository queries.


59-60: Overloaded removeRepository with artifact type context

The addition of the isArtifactTypeUnknown parameter allows for more flexible repository removal, particularly during error handling in the import flow.

app/server/appsmith-server/src/main/java/com/appsmith/server/git/fs/GitFSServiceCEImpl.java (3)

69-70: Access modifier change improves extensibility

Making commonGitFileUtils and gitRedisUtils protected instead of private enables proper subclassing of this implementation, following the CE/EE pattern.


177-180: Implementation of artifact type and identifier retrieval

The implementation zips the artifact type with an empty string as identifier. Note that the current implementation doesn't actually provide a meaningful identifier.

Consider whether a meaningful identifier should be implemented here, or if this is intentionally setting up for future enhancement.


272-281: Handles unknown artifact types gracefully

This implementation gracefully handles the case when the artifact type is unknown by defaulting to APPLICATION type. This makes the import flow more robust when dealing with repositories where the artifact type can't be determined initially.

app/server/appsmith-server/src/main/java/com/appsmith/server/git/central/CentralGitServiceCEImpl.java (1)

246-251: Repository clean-up inside onErrorResume looks solid – good catch!
Using usingWhen to ensure removeRepository(..) runs on failures prevents temp repos from leaking on disk. Nicely handled.

app/client/src/components/propertyControls/TabControl.tsx (1)

13-13: Update to Error Capturing Logic

The code has been updated to use the appsmithTelemetry singleton instance for error capturing instead of the direct captureException import. This aligns with the centralized telemetry approach used across the codebase.

Also applies to: 134-140

app/client/src/pages/Editor/Canvas.tsx (1)

22-22: Error Handling Update

Error reporting has been updated to use the centralized appsmithTelemetry singleton. The error object and context data remain unchanged, maintaining consistent error diagnostics.

Also applies to: 123-123

app/client/src/ee/sagas/index.tsx (1)

5-5: Standardized Error Reporting

The saga error handler now uses the standardized appsmithTelemetry service for exception reporting. This ensures consistent error reporting across the application.

Also applies to: 25-27

app/client/src/api/interceptors/response/failureHandlers/handleMissingResponseMeta.ts (1)

3-3: API Error Handling Refactor

The missing response metadata interceptor now correctly uses the application's telemetry service. This change maintains the same error context data while aligning with the centralized approach to error reporting.

Also applies to: 9-15

app/client/src/index.tsx (1)

35-41: LGTM: Improved instrumentation loading pattern.

The change to unconditionally load the instrumentation module with proper error handling is a good approach. This ensures telemetry is consistently initialized while gracefully handling any loading failures.

app/client/src/workers/Evaluation/errorModifier.ts (2)

16-16: Standardized telemetry imports.

Correctly updated to use the centralized telemetry singleton pattern.


227-229: Updated error capture method.

Updated to use the singleton's capture method while maintaining the same error reporting parameters.

app/client/src/reducers/evaluationReducers/treeReducer.ts (2)

6-6: Standardized telemetry imports.

Correctly updated to use the centralized telemetry singleton.


35-41: Updated error capture method.

Updated to use the singleton's capture method while maintaining the same error context details.

app/client/src/widgets/TabsMigrator/widget/index.tsx (3)

15-15: Standardized telemetry imports.

Correctly updated to use the centralized telemetry singleton.


23-28: Updated error capture method in migrateTabsDataUsingMigrator.

Successfully migrated to the new telemetry API while preserving all error context.


120-124: Updated error capture method in migrateTabsData.

Successfully migrated to the new telemetry API while preserving all error context.

app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.tsx (2)

17-17: Import updated to use centralized telemetry service.

The import has been updated to use the centralized appsmithTelemetry singleton from the instrumentation module, which is part of the broader refactoring effort.


135-137: Error tracking updated to use the new telemetry system.

This change updates the error capturing methodology to use the centralized telemetry system, which will improve error tracking consistency across the application.

app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.tsx (2)

23-23: Import updated to use centralized telemetry service.

The import has been updated to use the centralized appsmithTelemetry singleton from the instrumentation module, which aligns with the application-wide telemetry refactoring.


230-232: Error tracking updated to use the new telemetry system.

The error capturing method has been updated to use the standardized appsmithTelemetry.captureException method, which maintains the same error context while utilizing the new centralized telemetry service.

app/client/src/widgets/RichTextEditorWidget/component/index.tsx (1)

463-469:

✅ Verification successful

Markdown pattern trigger configuration updated for TinyMCE compatibility.

The trigger: "space" property has been removed from the text pattern configurations. This change aligns with the TinyMCE version downgrade from 7.7.1 to 6.8.3, allowing the editor to use default pattern triggering behavior instead of explicitly requiring a space key.


🏁 Script executed:

#!/bin/bash
# Check if the TinyMCE version has been downgraded in package.json

grep -A 2 "@tinymce/tinymce-react" app/client/package.json

Length of output: 171


Markdown pattern trigger configuration updated for TinyMCE v6 compatibility

Removed the explicit trigger: "space" from all text-pattern rules. The @tinymce/tinymce-react dependency has been downgraded to ^6.0.0 in app/client/package.json so that TinyMCE v6’s default space-triggered behavior applies.

app/client/src/widgets/PhoneInputWidget/widget/index.tsx (2)

41-41: Import updated to use centralized telemetry service.

The import has been updated to use the centralized appsmithTelemetry singleton from the instrumentation module, which is consistent with the application-wide telemetry refactoring pattern.


351-353: Error tracking updated to use the new telemetry system.

The error capturing implementation has been updated to use the standardized appsmithTelemetry.captureException method, providing consistent error reporting while maintaining the same error context information.

app/client/src/utils/helpers.tsx (2)

47-47: Update to centralized telemetry import looks good.

The import change from standalone captureException to appsmithTelemetry aligns with the ongoing centralization of telemetry handling.


947-953: Usage of centralized telemetry is correct.

The implementation correctly uses the new appsmithTelemetry.captureException method with the appropriate error object and options parameter.

app/client/src/widgets/wds/WDSPhoneInputWidget/widget/index.tsx (2)

23-23: Import looks good.

Correctly importing the centralized telemetry instance.


166-168: Error capturing implementation is correct.

Properly captures exceptions with the widget-specific error name.

app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.tsx (4)

32-32: Import is correct.

Good usage of the centralized telemetry module.


192-194: Error handling implementation looks good.

Properly captures exceptions in the onValueChange method.


253-255: Error handling is consistent.

Good implementation of error capturing in the onFocusChange method.


318-320: Error handling is complete.

Correctly handles errors in the formatText method, maintaining consistent error name.

app/client/src/pages/UserAuth/Login.tsx (2)

55-55: Telemetry import is correct.

Good transition to the centralized telemetry service.


119-121: Login error handling is properly implemented.

Correctly captures login errors with appropriate error name.

app/client/src/sagas/ReplaySaga.ts (4)

11-11: LGTM: Updated import for telemetry.

The import was properly updated to use the centralized telemetry instance.


135-139: LGTM: Updated error reporting method.

Error reporting now uses the centralized telemetry instance, maintaining the same error metadata.


170-170: LGTM: Updated error reporting method.

Error reporting now uses the centralized telemetry instance, maintaining the same error metadata.


265-265: LGTM: Updated error reporting method.

Error reporting now uses the centralized telemetry instance, maintaining the same error metadata.

app/client/src/utils/helpers.test.ts (2)

19-34: LGTM: Updated mock implementation for telemetry.

The test correctly mocks the new telemetry implementation, providing both the getTraceAndContext and captureException methods.


561-563: LGTM: Updated mock implementation usage.

The test now correctly uses the mocked telemetry instance for the implementation of captureException.

app/client/src/sagas/WidgetLoadingSaga.ts (2)

19-19: LGTM: Updated import for telemetry.

The import was properly updated to use the centralized telemetry instance.


104-106: LGTM: Updated error reporting method.

Error reporting now uses the centralized telemetry instance, maintaining the same error metadata.

app/client/src/widgets/TableWidgetV2/component/cellComponents/InlineCellEditor.tsx (2)

23-23: LGTM: Updated import for telemetry.

The import was properly updated to use the centralized telemetry instance.


240-242: LGTM: Updated error reporting method.

Error reporting now uses the centralized telemetry instance, maintaining the same error metadata.

app/client/src/sagas/ErrorSagas.tsx (1)

44-44: Good refactoring to use centralized telemetry singleton

The change from direct captureException import to using the appsmithTelemetry singleton follows good practices for centralizing error reporting. This maintains the same error metadata while standardizing the telemetry approach.

Also applies to: 301-307

app/client/src/sagas/InitSagas.ts (3)

95-95: Correctly migrated to centralized telemetry singleton

The error handling for consolidated API failures has been properly updated to use the appsmithTelemetry singleton, maintaining the same error context and metadata.

Also applies to: 281-287


377-377: Appropriate error handling update

The AppEngine error capture is correctly migrated to use the centralized telemetry service.


474-476: Error handling properly standardized

Session validation error reporting is correctly updated to use the centralized telemetry approach while preserving the error context.

app/client/src/sagas/AppThemingSaga.tsx (1)

47-47: Well-executed telemetry refactoring

The error reporting for theme fetching failures has been properly migrated to use the centralized telemetry singleton while preserving all the detailed error context needed for diagnostics.

Also applies to: 129-141

app/client/src/sagas/EvalErrorHandler.ts (2)

20-20: Consistent telemetry approach for cyclical dependency errors

Error reporting for cyclical dependencies has been standardized to use the centralized telemetry service while preserving the detailed context including dependency maps and diffs.

Also applies to: 238-251


271-274: Comprehensive telemetry standardization across all error types

All error types in the evaluation error handling switch statement have been systematically updated to use the centralized telemetry approach. This maintains consistent error reporting while preserving specific error contexts for each error type.

Also applies to: 278-281, 284-287, 292-298, 308-312, 315-319, 323-326, 334-334, 339-342

app/client/src/instrumentation/index.ts (1)

163-181: Double-check Faro measurement schema

pushMeasurement sets type: "measurement" but Faro’s typings already infer the envelope; duplicating the field may be redundant or rejected depending on SDK version. Please verify against the current SDK contract (it was previously { values, context }).

@brayn003 brayn003 requested review from ashit-rath and removed request for ApekshaBhosale, ayushpahwa, a team, riodeuno and rahulbarwal April 29, 2025 10:33
if (jsonStr) {
try {
artifactNames = JSON.parse(jsonStr);
} catch {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we should log the error here

@sondermanish sondermanish merged commit 61d4801 into release Apr 29, 2025
47 checks passed
@sondermanish sondermanish deleted the chore/git-import-override-1 branch April 29, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Git Platform Issues related to the git & the app platform Git Product Issues related to version control product ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants