Skip to content

fix: added Redeploy button that allows the user to sync the latest changes#41459

Merged
tomjose92 merged 12 commits intoreleasefrom
fix/issue-41457/git-redeploy-button
Dec 16, 2025
Merged

fix: added Redeploy button that allows the user to sync the latest changes#41459
tomjose92 merged 12 commits intoreleasefrom
fix/issue-41457/git-redeploy-button

Conversation

@tomjose92
Copy link
Contributor

@tomjose92 tomjose92 commented Dec 10, 2025

Description

Added Redeploy button that allows the user to sync the latest changes between edit and view mode. This button shows up only when lastDeployedAt is less than modifiedAt of the application and when there are no more commits to be pushed.

Below is a video of where changes are pulled from remote in the edit mode, but due to some technical glitch, fails to deploy/publish the Application. And there are no more commits to be pushed to deploy the App.
Earlier workaround was to introduce a change and click Discard and Pull. But with this PR, we are introducing the Redeploy button with Callout in the GIT Modal so that the view mode can be in sync with edit mode.
Also showing an orange dot next to deploy icon to indicate that the App needs to be redeployed

CE.Repo.-.Need.for.Redeploy.button.mp4

Fixes 41457

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/20256007695
Commit: 91df629
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 16 Dec 2025 05:01:29 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Added a redeploy flow: warning UI, Redeploy button, redeploy hook, loading/error indicators, and analytics events.
    • Deploy UX updates: context-aware tooltips and dynamic start icons reflecting repo and redeploy status.
    • Added a new "rocket-dot" icon and Redeploy menu/label text.
  • Style

    • Styling added for the redeploy warning component.

✏️ Tip: You can customize this high-level summary in your review settings.

… between edit and view mode. This button shows up only when lastDeployedAt is less than modifiedAt of the application and when there are no commits to be pushed.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

Adds a redeploy flow across UI, Redux, sagas, selectors, analytics and messages, plus registers a new "rocket-dot" icon in two design-system icon maps and minor UI wiring for redeploy indicators and actions.

Changes

Cohort / File(s) Summary
Icons
app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx, app/client/packages/design-system/widgets-old/src/Icon/index.tsx
Added RocketDotIcon via importSvg and registered "rocket-dot" in icon lookup maps.
Redux action types & action
app/client/src/ce/constants/ReduxActionConstants.tsx, app/client/src/ce/actions/applicationActions.ts
Added REDEPLOY_APPLICATION_INIT, REDEPLOY_APPLICATION_SUCCESS, REDEPLOY_APPLICATION_ERROR constants and exported redeployApplication(applicationId) action creator.
Messages & analytics names
app/client/src/ce/constants/messages.ts, app/client/src/ce/utils/analyticsUtilTypes.ts
Added REDEPLOY_APP_WARNING, REDEPLOY_APP_BUTTON_TOOLTIP, REDEPLOY_MENU_OPTION message exports and added REDEPLOY_APP and GS_REDEPLOY_APPLICATION_CLICK analytics event names.
Editor reducer & selectors
app/client/src/ce/reducers/uiReducers/editorReducer.tsx, app/client/src/selectors/editorSelectors.tsx
Added redeploying and redeployingError loading flags to editor state and selectors getIsRedeployingApplication / getRedeployingError.
Sagas & watcher
app/client/src/ce/sagas/ApplicationSagas.tsx, app/client/src/ee/sagas/ApplicationSagas.tsx
Added redeployApplicationSaga (selects current app, logs analytics, calls ApplicationApi.publishApplication, dispatches fetchApplication and waits for fetch result) and wired takeLatest for REDEPLOY_APPLICATION_INIT.
Deployment constants & re-export
app/client/src/ce/constants/DeploymentConstants.ts, app/client/src/ee/constants/DeploymentConstants.ts
Introduced REDEPLOY_TRIGGERS, RedeployTriggerValue type and REDEPLOY_WARNING_MESSAGE mapping in CE; EE file re-exports CE constants.
Application selector
app/client/src/ce/selectors/applicationSelectors.tsx
Added getRedeployApplicationTrigger selector returning `RedeployTriggerValue
Git UI components, hook & wiring
app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx, app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx, app/client/src/git/components/OpsModal/TabDeploy/index.tsx, app/client/src/git/hooks/useRedeploy.ts
Added RedeployWarning component; useRedeploy hook exposing { isRedeploying, redeploy }; wired redeploy, isRedeploying, and redeployTrigger into TabDeployView; added conditional Redeploy UI and button.
Deploy preview rename
app/client/src/git/components/OpsModal/TabDeploy/DeployPreview.tsx
Renamed prop isCommitSuccessisSuccess and updated related logic/dependencies.
Header / Deploy button UI
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
Computed tooltipText and startIcon (uses "rocket-dot" vs "rocket") based on package upgrade, git status, pending commits, and redeploy trigger; integrated redeploy-aware UX.
Git types
app/client/src/git/types.ts
Added optional modifiedAt?: string to GitApplicationArtifact.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant UI as TabDeployView / DeployButton
    participant Hook as useRedeploy
    participant Store as Redux Store
    participant Saga as redeployApplicationSaga
    participant API as ApplicationApi
    participant Editor as EditorReducer

    User->>UI: Click "Redeploy" button
    UI->>Hook: call redeploy()
    Hook->>Store: dispatch(REDEPLOY_APPLICATION_INIT { applicationId })
    Store->>Saga: takeLatest(REDEPLOY_APPLICATION_INIT) triggers saga
    Saga->>Store: select current application & page IDs
    Saga->>Saga: log analytics ("REDEPLOY_APP")
    Saga->>API: call publishApplication(request)
    API-->>Saga: response
    alt publish success
        Saga->>Store: dispatch(fetchApplication(mode=EDIT))
        Saga->>Store: dispatch(REDEPLOY_APPLICATION_SUCCESS)
        Store->>Editor: set loadingStates.redeploying = false, redeployingError = false
        Store->>UI: selectors update (isRedeploying=false)
    else publish error
        Saga->>Store: dispatch(REDEPLOY_APPLICATION_ERROR)
        Store->>Editor: set loadingStates.redeploying = false, redeployingError = true
        Store->>UI: selectors update (isRedeploying=false, error=true)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Review redeployApplicationSaga for parity with publish flow, response validation, and waiting for fetch result.
  • Verify reducer handlers and new selectors/types for type correctness and state consistency.
  • Inspect TabDeployView and DeployButton for correct conditional rendering, memo dependencies, and accessibility attributes.
  • Check useRedeploy dispatch guard around missing applicationId and selector wiring.
  • Validate new icon imports/paths for bundling/loader safety.

Poem

🚀 A dotted rocket wakes at dawn,
Buttons hum and sagas yawn.
Redux flips a tiny switch,
Fetches fly and servers pitch.
✨ Redeploy — the app is drawn!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a Redeploy button for syncing changes between edit and view mode.
Description check ✅ Passed The pull request description provides clear context, motivation, implementation details, issue reference, and video demonstrating the feature.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/issue-41457/git-redeploy-button

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Production labels Dec 10, 2025
…lso in the scenario where lastDeployedAt value is null but there are no changes to be pushed.
…e page in new tab. Added its respective sagas, selectors, redux constants. Also added RedeployWarning callout component.
… redeploy is needed. Using that redeployTrigger as the logic directly in TabDeployView. Also sending that value to RedeployWarning to decide what message to show.
…cases where redeploy is needed for packages or app, or when there are uncommited changes.
@tomjose92 tomjose92 marked this pull request as ready for review December 15, 2025 02:53
@tomjose92 tomjose92 requested a review from a team as a code owner December 15, 2025 02:53
@tomjose92 tomjose92 requested a review from ashit-rath December 15, 2025 02:53
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 (5)
app/client/src/ce/constants/messages.ts (1)

1057-1061: Redeploy copy is clear; consider future use of redeployTrigger

The new REDEPLOY_WARNING_MESSAGE, REDEPLOY_BUTTON_TOOLTIP, and REDEPLOY_MENU_OPTION strings are concise and consistent with existing deploy terminology. The optional redeployTrigger argument is currently unused but safely ignored via eslint suppression.

If you don’t foresee multiple redeploy reasons, you could drop the unused parameter to reduce noise; otherwise, consider wiring it into the message later (e.g., to distinguish first‑time deployment vs. re‑sync scenarios).

Also applies to: 1471-1474, 1487-1488

app/client/src/git/components/OpsModal/TabDeploy/index.tsx (1)

2-2: Redeploy wiring in TabDeploy is clean; consider centralizing deploy metadata later

Using useRedeploy for { isRedeploying, redeploy } and useSelector(getRedeployApplicationTrigger) keeps this component lean and matches existing hook/selector patterns. Passing isRedeploying, redeploy, and redeployTrigger through to TabDeployView gives the view layer everything it needs to control the new “Redeploy” UX.

Longer‑term, you might consider sourcing lastDeployedAt from the same place as getRedeployApplicationTrigger (or vice versa) to avoid any subtle drift between the Git artifact metadata and currentApplication, but that’s an optional cleanup rather than a blocker.

Also applies to: 10-10, 13-13, 17-17, 25-25, 52-56

app/client/src/ce/selectors/applicationSelectors.tsx (1)

218-242: Selector logic looks solid.

The timestamp comparison with a 1-second buffer is reasonable for handling precision issues. The selector correctly identifies when redeployment is needed.

Consider extracting "PENDING_DEPLOYMENT" as a named constant for better maintainability if this string is used elsewhere or might need to change:

+export const REDEPLOY_STATUS = {
+  PENDING_DEPLOYMENT: "PENDING_DEPLOYMENT",
+} as const;
+
 export const getRedeployApplicationTrigger = (
   state: DefaultRootState,
 ): string | null => {
   const currentApplication = getCurrentApplication(state);

   if (!currentApplication?.modifiedAt) {
     return null;
   }

   if (!currentApplication?.lastDeployedAt) {
-    return "PENDING_DEPLOYMENT";
+    return REDEPLOY_STATUS.PENDING_DEPLOYMENT;
   }

   const lastDeployedAtMs = new Date(
     currentApplication.lastDeployedAt,
   ).getTime();
   const modifiedAtMs = new Date(currentApplication.modifiedAt).getTime();

   // If modifiedAt is greater than lastDeployedAt by more than 1 second, deployment is needed
   if (modifiedAtMs - lastDeployedAtMs > 1000) {
-    return "PENDING_DEPLOYMENT";
+    return REDEPLOY_STATUS.PENDING_DEPLOYMENT;
   }

   return null;
 };
app/client/src/ce/sagas/ApplicationSagas.tsx (1)

227-306: Implementation is correct, but consider reducing duplication.

The saga logic is sound and follows the existing publish pattern. However, redeployApplicationSaga and publishApplicationSaga share significant logic (navigation settings collection, analytics structure, API call, fetch flow).

Consider extracting shared logic into a helper function to reduce duplication:

function* collectNavigationSettingsWithPrefix(
  currentApplication: ApplicationPayload | undefined,
) {
  const navigationSettingsWithPrefix: Record<
    string,
    NavigationSetting[keyof NavigationSetting]
  > = {};

  if (currentApplication?.applicationDetail?.navigationSetting) {
    const settingKeys = objectKeys(
      currentApplication.applicationDetail.navigationSetting,
    ) as Array<keyof NavigationSetting>;

    settingKeys.map((key: keyof NavigationSetting) => {
      if (currentApplication.applicationDetail?.navigationSetting?.[key]) {
        const value: NavigationSetting[keyof NavigationSetting] =
          currentApplication.applicationDetail.navigationSetting[key];

        navigationSettingsWithPrefix[`navigationSetting_${key}`] = value;
      }
    });
  }

  return navigationSettingsWithPrefix;
}

function* logPublishAnalytics(
  currentApplication: ApplicationPayload | undefined,
  eventName: string,
) {
  if (!currentApplication) return;

  const appName = currentApplication.name;
  const appId = currentApplication?.id;
  const pageCount = currentApplication?.pages?.length;
  const navigationSettingsWithPrefix = yield call(
    collectNavigationSettingsWithPrefix,
    currentApplication,
  );

  AnalyticsUtil.logEvent(eventName, {
    appId,
    appName,
    pageCount,
    ...navigationSettingsWithPrefix,
    isPublic: !!currentApplication?.isPublic,
    templateTitle: currentApplication?.forkedFromTemplateTitle,
  });
}

Then both sagas can call these helpers, reducing duplication and improving maintainability.

app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

103-118: Icon logic is correct, minor simplification possible.

The function correctly shows "rocket-dot" when action is needed (pending commits or redeploy required).

The two conditions both return "rocket-dot" and could be combined for conciseness:

 const getStartIcon = useCallback(() => {
   if (isGitConnected && !gitStatusState?.loading) {
     const hasPendingCommits =
       gitStatusState?.value && !gitStatusState.value.isClean;

-    if (!hasPendingCommits && redeployTrigger) {
-      return "rocket-dot";
-    }
-
-    if (hasPendingCommits) {
+    if (hasPendingCommits || redeployTrigger) {
       return "rocket-dot";
     }
   }

   return "rocket";
 }, [isGitConnected, gitStatusState, redeployTrigger]);

The current structure is fine if you prefer the explicit separation for clarity.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be741e6 and 184530a.

⛔ Files ignored due to path filters (2)
  • app/client/packages/design-system/ads/src/__assets__/icons/ads/rocket-dot.svg is excluded by !**/*.svg
  • app/client/packages/design-system/widgets-old/src/assets/icons/ads/rocket-dot.svg is excluded by !**/*.svg
📒 Files selected for processing (17)
  • app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx (2 hunks)
  • app/client/packages/design-system/widgets-old/src/Icon/index.tsx (2 hunks)
  • app/client/src/ce/actions/applicationActions.ts (1 hunks)
  • app/client/src/ce/constants/ReduxActionConstants.tsx (2 hunks)
  • app/client/src/ce/constants/messages.ts (3 hunks)
  • app/client/src/ce/reducers/uiReducers/editorReducer.tsx (3 hunks)
  • app/client/src/ce/sagas/ApplicationSagas.tsx (1 hunks)
  • app/client/src/ce/selectors/applicationSelectors.tsx (1 hunks)
  • app/client/src/ce/utils/analyticsUtilTypes.ts (2 hunks)
  • app/client/src/ee/sagas/ApplicationSagas.tsx (2 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (10 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx (2 hunks)
  • app/client/src/git/hooks/useRedeploy.ts (1 hunks)
  • app/client/src/git/types.ts (1 hunks)
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (4 hunks)
  • app/client/src/selectors/editorSelectors.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (18)
📚 Learning: 2025-01-16T14:25:46.177Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38681
File: app/client/src/git/constants/enums.ts:2-4
Timestamp: 2025-01-16T14:25:46.177Z
Learning: The GitArtifactType enum in TypeScript uses lowercase plural values: "applications", "packages", and "workflows" for Application, Package, and Workflow respectively.

Applied to files:

  • app/client/src/git/types.ts
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-10T10:52:51.127Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/sagas/updateLocalProfileSaga.ts:35-40
Timestamp: 2024-12-10T10:52:51.127Z
Learning: In `app/client/src/git/sagas/updateLocalProfileSaga.ts`, it's acceptable to cast `error` to `string` when passing it to `gitArtifactActions.updateLocalProfileError`.

Applied to files:

  • app/client/src/git/types.ts
📚 Learning: 2025-10-30T07:17:49.646Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 41312
File: app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx:817-883
Timestamp: 2025-10-30T07:17:49.646Z
Learning: In app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx, the isErrorPersistingAppSlug flag is unused and should be removed. There is no corresponding selector to expose it, and no handlers set it to true.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx
  • app/client/src/ce/reducers/uiReducers/editorReducer.tsx
  • app/client/src/selectors/editorSelectors.tsx
  • app/client/src/ce/selectors/applicationSelectors.tsx
📚 Learning: 2024-12-11T08:25:39.197Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts:40-43
Timestamp: 2024-12-11T08:25:39.197Z
Learning: In `app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts`, the `useMemo` hook includes dependencies `artifactType` and `baseArtifactId` in its dependency array.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx
  • app/client/src/git/hooks/useRedeploy.ts
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-11T08:33:24.352Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/BranchButton/index.tsx:72-74
Timestamp: 2024-12-11T08:33:24.352Z
Learning: In the 'BranchButton' component in 'app/client/src/git/components/GitQuickActions/BranchButton/index.tsx' (TypeScript, React), the `useEffect` hook that checks for label ellipsis does not need to include `currentBranch` in its dependency array.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx
  • app/client/src/git/hooks/useRedeploy.ts
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-11-29T05:38:54.262Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 37830
File: app/client/packages/git/src/actions/checkoutBranchActions.ts:11-18
Timestamp: 2024-11-29T05:38:54.262Z
Learning: In the Git Redux actions (`app/client/packages/git/src/actions`), the `createSingleArtifactAction` function already handles loading state and error management, so additional checks in action creators are unnecessary.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx
  • app/client/src/git/hooks/useRedeploy.ts
📚 Learning: 2024-12-15T17:45:48.303Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38171
File: app/client/src/git/components/DefaultBranch/DefaultBranchCE.tsx:1-14
Timestamp: 2024-12-15T17:45:48.303Z
Learning: In `app/client/src/git/components/DefaultBranch/DefaultBranchCE.tsx`, the feature flag check is performed at a higher level, so it's acceptable to have `isGitProtectedFeatureLicensed={false}` in this component.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/index.tsx
📚 Learning: 2024-10-21T13:18:10.293Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 36989
File: app/client/packages/git/src/actions/helpers/createSingleArtifactAction.ts:12-41
Timestamp: 2024-10-21T13:18:10.293Z
Learning: In Redux Toolkit (TypeScript), since it uses Immer internally, assigning the same initial state object across artifacts does not lead to shared mutable state issues.

Applied to files:

  • app/client/src/ce/reducers/uiReducers/editorReducer.tsx
📚 Learning: 2025-10-28T03:30:58.299Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 41312
File: app/client/src/sagas/InitSagas.ts:260-271
Timestamp: 2025-10-28T03:30:58.299Z
Learning: In app/client/src/sagas/InitSagas.ts, when constructing consolidatedApiParams for static page URLs, the code intentionally reuses applicationId and defaultPageId fields to pass staticApplicationSlug and staticPageSlug values respectively. This is by design, even though ConsolidatedApiParams type has dedicated staticApplicationSlug and staticPageSlug fields.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
  • app/client/src/ee/sagas/ApplicationSagas.tsx
📚 Learning: 2024-12-11T08:31:10.356Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-21
Timestamp: 2024-12-11T08:31:10.356Z
Learning: In the file `app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`, when defining the function `getPullBtnStatus`, it's acceptable to use default parameters in destructuring. Do not suggest removing default parameters in this context.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-10T10:53:17.146Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-24
Timestamp: 2024-12-10T10:53:17.146Z
Learning: In the `getPullBtnStatus` function (`app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`), default parameter values should be explicitly mentioned to handle component state properly, even if all props are required.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-16T19:43:14.764Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38171
File: app/client/src/git/components/GitContextProvider/index.tsx:60-70
Timestamp: 2024-12-16T19:43:14.764Z
Learning: Prefer not to throw errors when dispatching actions in the `setImportWorkspaceId` function in `app/client/src/git/components/GitContextProvider/index.tsx`.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-05T10:57:15.397Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 37984
File: app/client/src/git/requests/updateGlobalConfigRequest.ts:9-13
Timestamp: 2024-12-05T10:57:15.397Z
Learning: In the TypeScript files within `app/client/src/git/requests/`, functions should not include internal error handling or request timeouts; they should allow errors to be thrown directly.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2025-01-09T15:17:04.536Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38563
File: app/client/src/git/components/QuickActions/index.tsx:34-34
Timestamp: 2025-01-09T15:17:04.536Z
Learning: In Git-related components, `isStatusClean` with a default value of `true` is used to determine the initial loading state, rather than indicating the presence of uncommitted changes.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-11-12T07:37:42.598Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 37330
File: app/client/src/pages/Editor/gitSync/components/GitChangesList/StaticChange.tsx:52-52
Timestamp: 2024-11-12T07:37:42.598Z
Learning: The icon provider components in `app/client/packages/design-system/widgets-old/src/Icon/index.tsx` and `app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx` should provide both `settings-2-line` and `settings-v3` icons and should not be updated to remove the old icon.

Applied to files:

  • app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx
  • app/client/packages/design-system/widgets-old/src/Icon/index.tsx
📚 Learning: 2024-11-12T11:42:28.998Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 37330
File: app/client/src/pages/common/SearchBar/HomepageHeaderAction.tsx:95-95
Timestamp: 2024-11-12T11:42:28.998Z
Learning: In icon provider components within the TypeScript/React codebase, old settings icons like `"settings-2-line"` and `"settings-control"` are intentionally provided alongside new icons. These references are acceptable and should not be flagged for updates.

Applied to files:

  • app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx
  • app/client/packages/design-system/widgets-old/src/Icon/index.tsx
📚 Learning: 2024-10-08T15:32:34.114Z
Learnt from: KelvinOm
Repo: appsmithorg/appsmith PR: 29387
File: app/client/packages/design-system/widgets/src/components/TagGroup/src/Tag.tsx:9-9
Timestamp: 2024-10-08T15:32:34.114Z
Learning: The `CloseIcon` is being moved to a common directory for better reusability across components, following the suggestion to avoid importing it from the `Modal` component's directory.

Applied to files:

  • app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx
  • app/client/packages/design-system/widgets-old/src/Icon/index.tsx
📚 Learning: 2024-12-10T10:52:38.873Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/sagas/fetchLocalProfileSaga.ts:8-13
Timestamp: 2024-12-10T10:52:38.873Z
Learning: In `app/client/src/git/sagas/fetchLocalProfileSaga.ts` and similar Git sagas, error handling for `baseArtifactId` is managed outside the scope, so validation checks for `baseArtifactId` within the saga functions are unnecessary.

Applied to files:

  • app/client/src/ee/sagas/ApplicationSagas.tsx
🧬 Code graph analysis (7)
app/client/src/ce/actions/applicationActions.ts (1)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
  • ReduxActionTypes (1328-1373)
app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1)
app/client/src/ce/constants/messages.ts (1)
  • REDEPLOY_WARNING_MESSAGE (1057-1061)
app/client/src/git/components/OpsModal/TabDeploy/index.tsx (3)
app/client/src/git/components/GitContextProvider/index.tsx (1)
  • useGitContext (30-32)
app/client/src/ce/selectors/applicationSelectors.tsx (1)
  • getRedeployApplicationTrigger (218-242)
app/client/src/git/hooks/useRedeploy.ts (1)
  • useRedeploy (9-24)
app/client/src/git/hooks/useRedeploy.ts (2)
app/client/src/selectors/editorSelectors.tsx (2)
  • getCurrentApplicationId (246-247)
  • getIsRedeployingApplication (159-160)
app/client/src/ce/actions/applicationActions.ts (1)
  • redeployApplication (188-195)
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (4)
app/client/src/git/hooks/useArtifactSelector.ts (1)
  • useArtifactSelector (10-30)
app/client/src/git/store/selectors/gitArtifactSelectors.ts (1)
  • selectStatusState (106-109)
app/client/src/ce/selectors/applicationSelectors.tsx (1)
  • getRedeployApplicationTrigger (218-242)
app/client/src/ce/constants/messages.ts (3)
  • UNCOMMITTED_CHANGES (1024-1024)
  • REDEPLOY_BUTTON_TOOLTIP (1471-1474)
  • DEPLOY_BUTTON_TOOLTIP (1469-1470)
app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (3)
app/client/src/utils/AppsmithUtils.tsx (1)
  • noop (143-145)
app/client/src/pages/Editor/gitSync/components/DeployPreview.tsx (1)
  • DeployPreview (36-79)
app/client/src/ce/constants/messages.ts (1)
  • REDEPLOY_MENU_OPTION (1487-1487)
app/client/src/ee/sagas/ApplicationSagas.tsx (1)
app/client/src/ce/sagas/ApplicationSagas.tsx (1)
  • redeployApplicationSaga (227-306)
⏰ 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). (8)
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
🔇 Additional comments (19)
app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx (1)

207-209: Rocket-dot icon wiring is consistent and type-safe

Importing RocketDotIcon via importSvg and adding "rocket-dot": RocketDotIcon to ICON_LOOKUP matches the existing icon patterns and keeps IconCollection/IconNames in sync. No issues from a typing or runtime perspective.

Also applies to: 1595-1595

app/client/packages/design-system/widgets-old/src/Icon/index.tsx (1)

417-419: Rocket-dot added correctly to legacy icon map

RocketDotIcon is imported and exposed via "rocket-dot": <RocketDotIcon /> in ICON_LOOKUP in line with the existing icon conventions here and stays consistent with the ADS provider’s key. Looks good.

Also applies to: 875-875

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

25-42: modifiedAt field addition looks correct; verify API contract and null-handling at call sites

The new modifiedAt?: string; on GitApplicationArtifact is consistent with the existing lastDeployedAt?: string; and fits the redeploy logic needs.

Two things to double‑check outside this file:

  1. Backend/API payloads – Confirm all endpoints populating GitApplicationArtifact actually send modifiedAt (or that the redeploy logic gracefully handles it being undefined for older payloads).
  2. Selector/logic usage – Wherever you compare lastDeployedAt vs modifiedAt, ensure you handle missing timestamps explicitly so redeploy indicators don’t show up incorrectly or break when one side is undefined.

If packages will ever support a similar redeploy flow, consider whether GitPackageArtifact should also gain a modifiedAt field for consistency, otherwise this asymmetry is fine as‑is.

app/client/src/ce/utils/analyticsUtilTypes.ts (1)

45-46: Redeploy analytics event names look consistent

REDEPLOY_APP and GS_REDEPLOY_APPLICATION_CLICK follow the existing naming/placement conventions and safely extend the EventName union.

Also applies to: 206-207

app/client/src/ce/constants/ReduxActionConstants.tsx (1)

1003-1023: Redeploy Redux action constants are well‑integrated

REDEPLOY_APPLICATION_INIT/SUCCESS/ERROR are added in the right groups, align with existing publish action naming, and are correctly surfaced via ReduxActionTypes, ReduxActionErrorTypes, and toastMessageErrorTypes.

Also applies to: 1025-1034

app/client/src/selectors/editorSelectors.tsx (1)

159-164: Redeploy selectors align with existing loading state patterns

getIsRedeployingApplication and getRedeployingError follow the same structure as the publish selectors and correctly read from state.ui.editor.loadingStates. This gives a clean surface for UI/hooks like useRedeploy.

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

37-40: LGTM! Redeploy saga wired correctly.

The takeLatest watcher follows the same pattern as the existing publish flow and is positioned appropriately after PUBLISH_APPLICATION_INIT.

app/client/src/git/hooks/useRedeploy.ts (1)

1-24: LGTM! Clean hook implementation.

The conditional dispatch check and dependency array are correct. The hook follows React best practices.

app/client/src/ce/actions/applicationActions.ts (1)

188-195: LGTM! Action creator follows established patterns.

The implementation mirrors the existing publishApplication action creator and maintains consistency with Redux conventions.

app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1)

1-42: Component implementation looks good.

The warning callout is properly structured with appropriate styling and test ID. The link to documentation provides helpful context for users.

app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

53-72: LGTM! Tooltip logic correctly prioritizes states.

The cascading conditional logic appropriately handles package upgrade, git status, and redeploy scenarios, with proper fallback to the default tooltip.

app/client/src/ce/reducers/uiReducers/editorReducer.tsx (1)

21-22: LGTM! Reducer state management follows established patterns.

The redeploy loading states are managed consistently with the existing publish flow. The handlers correctly update state for INIT, ERROR, and SUCCESS actions.

Also applies to: 122-143, 365-366

app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (7)

19-19: LGTM!

New imports for redeploy functionality are correctly placed and follow established patterns.

Also applies to: 41-41


88-93: LGTM!

New props for redeploy state are well-typed and defaults follow the established pattern in this component. Based on learnings, using default parameters in destructuring is acceptable here.

Also applies to: 111-115


149-151: LGTM!

The shouldShowRedeploy condition correctly gates the redeploy UI to scenarios where there are no pending changes and a redeploy trigger exists.


276-281: LGTM!

Analytics logging and callback structure are consistent with other trigger functions in this component (triggerCommit, triggerPull).


324-326: LGTM!

RedeployWarning is correctly guarded by shouldShowRedeploy, which ensures redeployTrigger is non-null when rendered.


433-442: LGTM!

Redeploy button follows the established button patterns in this footer. The isLoading state prevents double-clicks, and test ID is properly assigned.


416-416: LGTM!

Good addition of !shouldShowRedeploy to ensure mutual exclusivity between the commit and redeploy buttons.

@tomjose92 tomjose92 added the Packages & Git Pod All issues belonging to Packages and Git label Dec 15, 2025
`Some changes may reappear after discarding them, these changes support new features in Appsmith. You can safely commit them to your repository.`;
export const REDEPLOY_WARNING_MESSAGE = (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
redeployTrigger?: string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need this so that EE rep can use the same function for the case redeployment is because of packages getting updated

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 (3)
app/client/src/ce/selectors/applicationSelectors.tsx (2)

218-221: Unused enum value: PendingDeploymentWithPackage.

The enum value PendingDeploymentWithPackage is declared but never returned by getRedeployApplicationTrigger. Remove it unless you plan to use it soon.

 export enum RedeployTrigger {
   PendingDeployment = "PENDING_DEPLOYMENT",
-  PendingDeploymentWithPackage = "PENDING_DEPLOYMENT_WITH_PACKAGE",
 }

223-246: Logic looks good.

The selector correctly compares timestamps to determine if redeployment is needed. The 1-second threshold accounts for minor timing discrepancies.

Optional: Extract the 1000ms threshold into a named constant for clarity:

+const DEPLOYMENT_TIMESTAMP_THRESHOLD_MS = 1000;
+
 export const getRedeployApplicationTrigger = createSelector(
   getCurrentApplication,
   (currentApplication): RedeployTrigger | null => {
     // ... existing code ...
     
     // If modifiedAt is greater than lastDeployedAt by more than 1 second, deployment is needed
-    if (modifiedAtMs - lastDeployedAtMs > 1000) {
+    if (modifiedAtMs - lastDeployedAtMs > DEPLOYMENT_TIMESTAMP_THRESHOLD_MS) {
       return RedeployTrigger.PendingDeployment;
     }
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

53-72: Extract duplicate logic.

The hasPendingCommits calculation appears in both tooltipText and startIcon useMemo blocks. Extract it to reduce duplication.

+ const hasPendingCommits = useMemo(() => {
+   return (
+     isGitConnected &&
+     !gitStatusState?.loading &&
+     gitStatusState?.value &&
+     !gitStatusState.value.isClean
+   );
+ }, [isGitConnected, gitStatusState]);

  const tooltipText = useMemo(() => {
    if (isPackageUpgrading) {
      return createMessage(PACKAGE_UPGRADING_ACTION_STATUS, "deploy this app");
    }

-   if (isGitConnected && !gitStatusState?.loading) {
-     const hasPendingCommits =
-       gitStatusState?.value && !gitStatusState.value.isClean;
-
-     if (hasPendingCommits) {
+   if (hasPendingCommits) {
       return createMessage(UNCOMMITTED_CHANGES);
-     }
+   }

+   if (isGitConnected && !gitStatusState?.loading) {
      if (redeployTrigger) {
        return REDEPLOY_BUTTON_TOOLTIP(redeployTrigger);
      }
    }

    return createMessage(DEPLOY_BUTTON_TOOLTIP);
- }, [isPackageUpgrading, isGitConnected, gitStatusState, redeployTrigger]);
+ }, [isPackageUpgrading, hasPendingCommits, isGitConnected, gitStatusState, redeployTrigger]);

  const startIcon = useMemo(() => {
-   if (isGitConnected && !gitStatusState?.loading) {
-     const hasPendingCommits =
-       gitStatusState?.value && !gitStatusState.value.isClean;
-
-     if (!hasPendingCommits && redeployTrigger) {
+   if (!hasPendingCommits && redeployTrigger) {
       return "rocket-dot";
-     }
+   }

-     if (hasPendingCommits) {
+   if (hasPendingCommits) {
       return "rocket-dot";
-     }
    }

    return "rocket";
- }, [isGitConnected, gitStatusState, redeployTrigger]);
+ }, [hasPendingCommits, redeployTrigger]);

Also applies to: 103-118

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 184530a and 9241cc3.

📒 Files selected for processing (2)
  • app/client/src/ce/selectors/applicationSelectors.tsx (1 hunks)
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (4 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-10-30T07:17:49.646Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 41312
File: app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx:817-883
Timestamp: 2025-10-30T07:17:49.646Z
Learning: In app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx, the isErrorPersistingAppSlug flag is unused and should be removed. There is no corresponding selector to expose it, and no handlers set it to true.

Applied to files:

  • app/client/src/ce/selectors/applicationSelectors.tsx
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-11T08:31:10.356Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-21
Timestamp: 2024-12-11T08:31:10.356Z
Learning: In the file `app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`, when defining the function `getPullBtnStatus`, it's acceptable to use default parameters in destructuring. Do not suggest removing default parameters in this context.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-11T08:25:39.197Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts:40-43
Timestamp: 2024-12-11T08:25:39.197Z
Learning: In `app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts`, the `useMemo` hook includes dependencies `artifactType` and `baseArtifactId` in its dependency array.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-11T08:33:24.352Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/BranchButton/index.tsx:72-74
Timestamp: 2024-12-11T08:33:24.352Z
Learning: In the 'BranchButton' component in 'app/client/src/git/components/GitQuickActions/BranchButton/index.tsx' (TypeScript, React), the `useEffect` hook that checks for label ellipsis does not need to include `currentBranch` in its dependency array.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-10T10:53:17.146Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-24
Timestamp: 2024-12-10T10:53:17.146Z
Learning: In the `getPullBtnStatus` function (`app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`), default parameter values should be explicitly mentioned to handle component state properly, even if all props are required.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2025-02-20T13:36:10.743Z
Learnt from: alex-golovanov
Repo: appsmithorg/appsmith PR: 39379
File: app/client/src/pages/AppIDE/components/LibrariesList/JSLibrariesSection.tsx:0-0
Timestamp: 2025-02-20T13:36:10.743Z
Learning: When reviewing React components, ensure that useMemo and useEffect hooks include all variables used within their callbacks in their dependency arrays to prevent stale values and potential bugs.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.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). (8)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
🔇 Additional comments (1)
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

50-51: LGTM!

The new selectors are properly initialized.

ichik
ichik previously approved these changes Dec 15, 2025
…s as it is already being logged in TabDeployView component.
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 (1)
app/client/src/ce/sagas/ApplicationSagas.tsx (1)

227-268: Redeploy saga mirrors publish flow; consider extracting shared helper and analytics parity

Functionally this looks correct and consistent with publishApplicationSaga (publish → validate → FETCH_APPLICATION_INIT → wait for FETCH_APPLICATION_SUCCESS/ERROR), so no blockers from my side.

You might want to:

  • Extract the common “publish + validate + fetch + wait” sequence used here and in publishApplicationSaga into a small helper to avoid duplication and keep behaviour in sync if the flow changes later.
  • If you intend to track redeploys (there’s a REDEPLOY_APP analytics event type elsewhere in the PR), consider logging that here (potentially via the same helper) for parity with the PUBLISH_APP event, unless it’s already captured in the UI layer.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9241cc3 and c279af6.

📒 Files selected for processing (1)
  • app/client/src/ce/sagas/ApplicationSagas.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-10-28T03:30:58.299Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 41312
File: app/client/src/sagas/InitSagas.ts:260-271
Timestamp: 2025-10-28T03:30:58.299Z
Learning: In app/client/src/sagas/InitSagas.ts, when constructing consolidatedApiParams for static page URLs, the code intentionally reuses applicationId and defaultPageId fields to pass staticApplicationSlug and staticPageSlug values respectively. This is by design, even though ConsolidatedApiParams type has dedicated staticApplicationSlug and staticPageSlug fields.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
📚 Learning: 2024-07-26T21:12:57.228Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 29965
File: app/client/src/ce/sagas/ApplicationSagas.tsx:736-742
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The use of `editorId` instead of `appId` is an intentional change in the PR and is part of reverting to a previous functionality.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
📚 Learning: 2024-10-22T07:08:25.558Z
Learnt from: rishabhrathod01
Repo: appsmithorg/appsmith PR: 37001
File: app/server/appsmith-server/src/main/java/com/appsmith/server/layouts/UpdateLayoutServiceCEImpl.java:136-138
Timestamp: 2024-10-22T07:08:25.558Z
Learning: When a `Span` is started before a `try-catch` block and ended after it, there is no need to end the span inside the catch block.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
📚 Learning: 2025-01-13T18:31:44.457Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38634
File: app/client/src/git/sagas/initGitSaga.ts:38-39
Timestamp: 2025-01-13T18:31:44.457Z
Learning: In Git sagas where operations are primarily Redux `put` effects, error handling with try-catch blocks is unnecessary as these effects don't throw errors.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
📚 Learning: 2024-12-10T10:52:38.244Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/sagas/fetchLocalProfileSaga.ts:28-34
Timestamp: 2024-12-10T10:52:38.244Z
Learning: In `app/client/src/git/sagas/fetchLocalProfileSaga.ts`, error handling is managed outside the scope, so casting errors directly to strings is acceptable.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
📚 Learning: 2024-12-10T10:52:57.789Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/sagas/deleteBranchSaga.ts:38-45
Timestamp: 2024-12-10T10:52:57.789Z
Learning: In the TypeScript file `app/client/src/git/sagas/deleteBranchSaga.ts`, within the `deleteBranchSaga` function, error handling is managed outside the scope of the catch block. Therefore, casting `error` to `string` in this context is acceptable.

Applied to files:

  • app/client/src/ce/sagas/ApplicationSagas.tsx
🧬 Code graph analysis (1)
app/client/src/ce/sagas/ApplicationSagas.tsx (4)
app/client/src/ce/api/ApplicationApi.tsx (4)
  • PublishApplicationRequest (19-21)
  • PublishApplicationResponse (28-28)
  • ApplicationApi (291-567)
  • fetchApplication (329-333)
app/client/src/sagas/ErrorSagas.tsx (1)
  • validateResponse (100-155)
app/client/src/selectors/editorSelectors.tsx (2)
  • getCurrentApplicationId (246-247)
  • getCurrentPageId (129-130)
app/client/src/ce/actions/applicationActions.ts (1)
  • fetchApplication (47-52)
⏰ 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). (8)
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment

@tomjose92 tomjose92 requested a review from ashit-rath December 15, 2025 09:03
…onstants along with object mapping for messages. Using the introduced const in places where redeployment trigger is used. Minor fixes in ApplicationSagas as well
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 (3)
app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1)

18-43: Avoid rendering an empty warning when redeployTrigger is null

Right now the Callout always renders, and the heading text becomes empty if redeployTrigger is null. To avoid a blank warning (and to be defensive against future changes), you can short‑circuit the component and then drop the inline &&:

 const RedeployWarning: React.FC<RedeployWarningProps> = ({
   redeployTrigger,
 }) => {
-  const redeployDocUrl =
-    "https://docs.appsmith.com/advanced-concepts/version-control-with-git/commit-and-push";
+  const redeployDocUrl =
+    "https://docs.appsmith.com/advanced-concepts/version-control-with-git/commit-and-push";
+
+  if (!redeployTrigger) {
+    return null;
+  }
@@
-        <Text kind="heading-xs">
-          {redeployTrigger &&
-            createMessage(REDEPLOY_WARNING_MESSAGE[redeployTrigger])}
-        </Text>
+        <Text kind="heading-xs">
+          {createMessage(REDEPLOY_WARNING_MESSAGE[redeployTrigger])}
+        </Text>

Optionally, consider moving the docs URL and "Learn more" label into shared constants/messages for easier maintenance and localization, but the current behavior is functionally fine.

app/client/src/ce/constants/DeploymentConstants.ts (1)

6-25: Type-safe trigger/message mapping looks solid; ValueOf reuse is optional

The pattern of:

  • REDEPLOY_TRIGGERS as as const,
  • RedeployTriggerValue = ValueOf<typeof REDEPLOY_TRIGGERS>, and
  • Record<RedeployTriggerValue, () => string> for both warning and tooltip

is a nice, type-safe way to guarantee every trigger has corresponding copy.

If there’s already a shared ValueOf helper type in the codebase, you might consider reusing it to avoid redefining the generic; if not, this local definition is perfectly fine as-is.

app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

50-72: Deduplicate hasPendingCommits logic between tooltip and icon for clarity

The core logic:

  • derive hasPendingCommits from gitStatusState?.value.isClean, and
  • use it in both tooltipText and startIcon,

is duplicated across the two useMemo blocks. It’s correct, but a bit harder to maintain if the status shape changes.

You could centralize this into a single computed value and reuse it, e.g.:

-  const gitStatusState = useArtifactSelector(selectStatusState);
-  const redeployTrigger = useSelector(getRedeployApplicationTrigger);
+  const gitStatusState = useArtifactSelector(selectStatusState);
+  const redeployTrigger = useSelector(getRedeployApplicationTrigger);
+
+  const hasPendingCommits = useMemo(() => {
+    if (!isGitConnected || gitStatusState?.loading || !gitStatusState?.value) {
+      return false;
+    }
+
+    return !gitStatusState.value.isClean;
+  }, [gitStatusState, isGitConnected]);
@@
-  const tooltipText = useMemo(() => {
+  const tooltipText = useMemo(() => {
     if (isPackageUpgrading) {
       return createMessage(PACKAGE_UPGRADING_ACTION_STATUS, "deploy this app");
     }
 
-    if (isGitConnected && !gitStatusState?.loading) {
-      const hasPendingCommits =
-        gitStatusState?.value && !gitStatusState.value.isClean;
-
-      if (hasPendingCommits) {
+    if (isGitConnected && !gitStatusState?.loading) {
+      if (hasPendingCommits) {
         return createMessage(UNCOMMITTED_CHANGES);
       }
 
       if (redeployTrigger) {
         return createMessage(REDEPLOY_BUTTON_TOOLTIP[redeployTrigger]);
       }
     }
@@
-  const startIcon = useMemo(() => {
-    if (isGitConnected && !gitStatusState?.loading) {
-      const hasPendingCommits =
-        gitStatusState?.value && !gitStatusState.value.isClean;
-
-      if (!hasPendingCommits && redeployTrigger) {
-        return "rocket-dot";
-      }
-
-      if (hasPendingCommits) {
-        return "rocket-dot";
-      }
-    }
-
-    return "rocket";
-  }, [isGitConnected, gitStatusState, redeployTrigger]);
+  const startIcon = useMemo(() => {
+    if (isGitConnected && !gitStatusState?.loading) {
+      if (!hasPendingCommits && redeployTrigger) {
+        return "rocket-dot";
+      }
+
+      if (hasPendingCommits) {
+        return "rocket-dot";
+      }
+    }
+
+    return "rocket";
+  }, [isGitConnected, gitStatusState, redeployTrigger, hasPendingCommits]);

This keeps the “what counts as pending commits?” rule in one place while preserving the existing behavior for tooltips and the rocket/rocket-dot icon.

Also applies to: 103-118

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c279af6 and 665914d.

📒 Files selected for processing (8)
  • app/client/src/ce/constants/DeploymentConstants.ts (1 hunks)
  • app/client/src/ce/constants/messages.ts (3 hunks)
  • app/client/src/ce/sagas/ApplicationSagas.tsx (1 hunks)
  • app/client/src/ce/selectors/applicationSelectors.tsx (2 hunks)
  • app/client/src/ee/constants/DeploymentConstants.ts (1 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (10 hunks)
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/client/src/ce/sagas/ApplicationSagas.tsx
  • app/client/src/ce/selectors/applicationSelectors.tsx
  • app/client/src/ce/constants/messages.ts
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2024-10-22T04:46:13.268Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 36926
File: app/client/src/ce/pages/Editor/IDE/Header/useLibraryHeaderTitle.ts:1-1
Timestamp: 2024-10-22T04:46:13.268Z
Learning: In this project, importing constants from 'ee/constants/messages' in CE files is a known and acceptable pattern.

Applied to files:

  • app/client/src/ee/constants/DeploymentConstants.ts
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-10-24T08:38:20.429Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 37056
File: app/client/src/pages/Editor/JSEditor/JSObjectNameEditor/JSObjectNameEditor.tsx:22-25
Timestamp: 2024-10-24T08:38:20.429Z
Learning: "constants/AppConstants" does not export "SaveActionNameParams".

Applied to files:

  • app/client/src/ee/constants/DeploymentConstants.ts
📚 Learning: 2024-12-11T08:25:39.197Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts:40-43
Timestamp: 2024-12-11T08:25:39.197Z
Learning: In `app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts`, the `useMemo` hook includes dependencies `artifactType` and `baseArtifactId` in its dependency array.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-11T08:31:10.356Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-21
Timestamp: 2024-12-11T08:31:10.356Z
Learning: In the file `app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`, when defining the function `getPullBtnStatus`, it's acceptable to use default parameters in destructuring. Do not suggest removing default parameters in this context.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-10T10:53:17.146Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-24
Timestamp: 2024-12-10T10:53:17.146Z
Learning: In the `getPullBtnStatus` function (`app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`), default parameter values should be explicitly mentioned to handle component state properly, even if all props are required.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-11T08:33:24.352Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/BranchButton/index.tsx:72-74
Timestamp: 2024-12-11T08:33:24.352Z
Learning: In the 'BranchButton' component in 'app/client/src/git/components/GitQuickActions/BranchButton/index.tsx' (TypeScript, React), the `useEffect` hook that checks for label ellipsis does not need to include `currentBranch` in its dependency array.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2025-02-20T13:36:10.743Z
Learnt from: alex-golovanov
Repo: appsmithorg/appsmith PR: 39379
File: app/client/src/pages/AppIDE/components/LibrariesList/JSLibrariesSection.tsx:0-0
Timestamp: 2025-02-20T13:36:10.743Z
Learning: When reviewing React components, ensure that useMemo and useEffect hooks include all variables used within their callbacks in their dependency arrays to prevent stale values and potential bugs.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-07-26T21:12:57.228Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 29573
File: app/client/src/ce/entities/DataTree/types.ts:182-186
Timestamp: 2024-07-26T21:12:57.228Z
Learning: The use of `any` type for `moduleInstanceEntities` in `app/client/src/ce/entities/DataTree/types.ts` is intentional and was done by another developer. This decision is likely to serve a specific purpose within the codebase, which may be related to maintaining compatibility between CE and EE or other architectural reasons.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
🧬 Code graph analysis (3)
app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx (1)
app/client/src/ce/constants/DeploymentConstants.ts (2)
  • RedeployTriggerValue (11-11)
  • REDEPLOY_WARNING_MESSAGE (13-18)
app/client/src/ce/constants/DeploymentConstants.ts (1)
app/client/src/ce/constants/messages.ts (2)
  • REDEPLOY_APP_WARNING (1057-1058)
  • REDEPLOY_APP_BUTTON_TOOLTIP (1468-1469)
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (5)
app/client/src/git/hooks/useArtifactSelector.ts (1)
  • useArtifactSelector (10-30)
app/client/src/git/store/selectors/gitArtifactSelectors.ts (1)
  • selectStatusState (106-109)
app/client/src/ce/selectors/applicationSelectors.tsx (1)
  • getRedeployApplicationTrigger (222-245)
app/client/src/ce/constants/messages.ts (3)
  • PACKAGE_UPGRADING_ACTION_STATUS (504-505)
  • UNCOMMITTED_CHANGES (1024-1024)
  • DEPLOY_BUTTON_TOOLTIP (1466-1467)
app/client/src/ce/constants/DeploymentConstants.ts (1)
  • REDEPLOY_BUTTON_TOOLTIP (20-25)
⏰ 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). (8)
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
🔇 Additional comments (1)
app/client/src/ee/constants/DeploymentConstants.ts (1)

1-1: EE barrel re-export is appropriate

Re-exporting the CE deployment constants/types through this EE barrel keeps the EE import surface consistent without duplicating definitions. No issues here.

@tomjose92 tomjose92 requested a review from ashit-rath December 15, 2025 17:45
…ment of EE/CE message mapping for redeploy button tooltip. Renamed variable in DeployPreview from isCommitSuccess to isSuccess to make it generic to be used for redeploying and commit success. Updated the rocket-dot icon
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

♻️ Duplicate comments (1)
app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (1)

386-386: Potential premature success indicator during redeploy.

Passing isRedeploying directly shows the success tick during the redeploy operation rather than after completion. The isCommitSuccess pattern (line 174-176) shows success only after loading completes: hasSubmitted && !isCommitLoading.

Consider deriving an isRedeploySuccess similar to isCommitSuccess:

const isRedeploySuccess = hasRedeployed && !isRedeploying;

Then update line 386:

-            <DeployPreview isSuccess={isCommitSuccess || isRedeploying} />
+            <DeployPreview isSuccess={isCommitSuccess || isRedeploySuccess} />
🧹 Nitpick comments (1)
app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (1)

53-72: Consider extracting duplicated hasPendingCommits computation.

The logic for hasPendingCommits (lines 59-60) is duplicated in the startIcon useMemo (lines 105-106). Extracting this to a separate memoized value would improve maintainability.

+ const hasPendingCommits = useMemo(() => {
+   return isGitConnected && !gitStatusState?.loading && 
+     gitStatusState?.value && !gitStatusState.value.isClean;
+ }, [isGitConnected, gitStatusState]);
+
  const tooltipText = useMemo(() => {
    if (isPackageUpgrading) {
      return createMessage(PACKAGE_UPGRADING_ACTION_STATUS, "deploy this app");
    }

    if (isGitConnected && !gitStatusState?.loading) {
-     const hasPendingCommits =
-       gitStatusState?.value && !gitStatusState.value.isClean;
-
      if (hasPendingCommits) {
        return createMessage(UNCOMMITTED_CHANGES);
      }

      if (redeployTrigger) {
        return createMessage(REDEPLOY_APP_BUTTON_TOOLTIP);
      }
    }

    return createMessage(DEPLOY_BUTTON_TOOLTIP);
- }, [isPackageUpgrading, isGitConnected, gitStatusState, redeployTrigger]);
+ }, [isPackageUpgrading, hasPendingCommits, redeployTrigger]);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 665914d and 91df629.

⛔ Files ignored due to path filters (2)
  • app/client/packages/design-system/ads/src/__assets__/icons/ads/rocket-dot.svg is excluded by !**/*.svg
  • app/client/packages/design-system/widgets-old/src/assets/icons/ads/rocket-dot.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • app/client/src/ce/constants/DeploymentConstants.ts (1 hunks)
  • app/client/src/ce/constants/messages.ts (3 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/DeployPreview.tsx (2 hunks)
  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (10 hunks)
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/ce/constants/messages.ts
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: 2024-12-11T08:33:24.352Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/BranchButton/index.tsx:72-74
Timestamp: 2024-12-11T08:33:24.352Z
Learning: In the 'BranchButton' component in 'app/client/src/git/components/GitQuickActions/BranchButton/index.tsx' (TypeScript, React), the `useEffect` hook that checks for label ellipsis does not need to include `currentBranch` in its dependency array.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-10T10:52:38.873Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/sagas/fetchLocalProfileSaga.ts:8-13
Timestamp: 2024-12-10T10:52:38.873Z
Learning: In `app/client/src/git/sagas/fetchLocalProfileSaga.ts` and similar Git sagas, error handling for `baseArtifactId` is managed outside the scope, so validation checks for `baseArtifactId` within the saga functions are unnecessary.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-11T08:31:10.356Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-21
Timestamp: 2024-12-11T08:31:10.356Z
Learning: In the file `app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`, when defining the function `getPullBtnStatus`, it's acceptable to use default parameters in destructuring. Do not suggest removing default parameters in this context.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-16T19:43:14.764Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38171
File: app/client/src/git/components/GitContextProvider/index.tsx:60-70
Timestamp: 2024-12-16T19:43:14.764Z
Learning: Prefer not to throw errors when dispatching actions in the `setImportWorkspaceId` function in `app/client/src/git/components/GitContextProvider/index.tsx`.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-11T08:25:39.197Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38088
File: app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts:40-43
Timestamp: 2024-12-11T08:25:39.197Z
Learning: In `app/client/src/git/components/GitContextProvider/hooks/useGitBranches.ts`, the `useMemo` hook includes dependencies `artifactType` and `baseArtifactId` in its dependency array.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-12-05T10:57:15.397Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 37984
File: app/client/src/git/requests/updateGlobalConfigRequest.ts:9-13
Timestamp: 2024-12-05T10:57:15.397Z
Learning: In the TypeScript files within `app/client/src/git/requests/`, functions should not include internal error handling or request timeouts; they should allow errors to be thrown directly.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2025-01-09T15:17:04.536Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38563
File: app/client/src/git/components/QuickActions/index.tsx:34-34
Timestamp: 2025-01-09T15:17:04.536Z
Learning: In Git-related components, `isStatusClean` with a default value of `true` is used to determine the initial loading state, rather than indicating the presence of uncommitted changes.

Applied to files:

  • app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx
📚 Learning: 2024-12-10T10:53:17.146Z
Learnt from: brayn003
Repo: appsmithorg/appsmith PR: 38060
File: app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts:16-24
Timestamp: 2024-12-10T10:53:17.146Z
Learning: In the `getPullBtnStatus` function (`app/client/src/git/components/GitQuickActions/helpers/getPullButtonStatus.ts`), default parameter values should be explicitly mentioned to handle component state properly, even if all props are required.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2025-02-20T13:36:10.743Z
Learnt from: alex-golovanov
Repo: appsmithorg/appsmith PR: 39379
File: app/client/src/pages/AppIDE/components/LibrariesList/JSLibrariesSection.tsx:0-0
Timestamp: 2025-02-20T13:36:10.743Z
Learning: When reviewing React components, ensure that useMemo and useEffect hooks include all variables used within their callbacks in their dependency arrays to prevent stale values and potential bugs.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-10-22T04:46:13.268Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 36926
File: app/client/src/ce/pages/Editor/IDE/Header/useLibraryHeaderTitle.ts:1-1
Timestamp: 2024-10-22T04:46:13.268Z
Learning: In this project, importing constants from 'ee/constants/messages' in CE files is a known and acceptable pattern.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2024-10-08T15:32:34.114Z
Learnt from: ankitakinger
Repo: appsmithorg/appsmith PR: 29573
File: app/client/src/ce/entities/DataTree/types.ts:182-186
Timestamp: 2024-10-08T15:32:34.114Z
Learning: The use of `any` type for `moduleInstanceEntities` in `app/client/src/ce/entities/DataTree/types.ts` is intentional and was done by another developer. This decision is likely to serve a specific purpose within the codebase, which may be related to maintaining compatibility between CE and EE or other architectural reasons.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
📚 Learning: 2025-10-30T07:17:49.646Z
Learnt from: ashit-rath
Repo: appsmithorg/appsmith PR: 41312
File: app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx:817-883
Timestamp: 2025-10-30T07:17:49.646Z
Learning: In app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx, the isErrorPersistingAppSlug flag is unused and should be removed. There is no corresponding selector to expose it, and no handlers set it to true.

Applied to files:

  • app/client/src/pages/AppIDE/layouts/components/Header/DeployButton.tsx
🧬 Code graph analysis (2)
app/client/src/ce/constants/DeploymentConstants.ts (1)
app/client/src/ce/constants/messages.ts (1)
  • REDEPLOY_APP_WARNING (1057-1058)
app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (3)
app/client/src/ce/constants/DeploymentConstants.ts (1)
  • RedeployTriggerValue (8-8)
app/client/src/git/components/OpsModal/TabDeploy/DeployPreview.tsx (1)
  • DeployPreview (38-97)
app/client/src/ce/constants/messages.ts (1)
  • REDEPLOY_MENU_OPTION (1482-1482)
⏰ 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). (8)
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
🔇 Additional comments (6)
app/client/src/git/components/OpsModal/TabDeploy/DeployPreview.tsx (1)

35-52: LGTM! Clean prop generalization.

The rename from isCommitSuccess to isSuccess appropriately generalizes the component to handle both commit and redeploy success states while maintaining existing behavior.

app/client/src/git/components/OpsModal/TabDeploy/TabDeployView.tsx (4)

89-120: LGTM! Props follow established patterns.

The new redeploy-related props (isRedeploying, redeploy, redeployTrigger) follow the same patterns as existing props with appropriate types and defaults.


150-151: Redeploy gating logic looks correct.

The shouldShowRedeploy condition appropriately shows redeploy UI only when status is loaded, there are no pending changes, and a redeploy trigger exists. This aligns with the PR objectives.


277-282: Analytics logging follows established pattern.

The handleRedeploy callback follows the same pattern as other Git modal actions (commit, pull, discard) by logging analytics before invoking the action.


417-443: LGTM! Button rendering logic is sound.

The mutually exclusive rendering of commit and redeploy buttons based on shouldShowRedeploy ensures a clean UX. The redeploy button appropriately uses loading state and analytics logging.

app/client/src/ce/constants/DeploymentConstants.ts (1)

1-15: Message content may not align with trigger mechanism.

The REDEPLOY_APP_WARNING message states "not using the latest versions of some packages," but the PendingDeployment trigger is set when changes are detected since the last deployment (modifiedAtMs - lastDeployedAtMs > 1000). These detect different conditions—package version status vs. pending changes—which could mislead users about why a redeploy is needed.

@tomjose92 tomjose92 added the ok-to-test Required label for CI label Dec 16, 2025
@tomjose92 tomjose92 self-assigned this Dec 16, 2025
@tomjose92 tomjose92 merged commit 51902c8 into release Dec 16, 2025
100 checks passed
@tomjose92 tomjose92 deleted the fix/issue-41457/git-redeploy-button branch December 16, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Packages & Git Pod All issues belonging to Packages and Git Production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No proper UX to redeploy GIT connected App when package is updated

3 participants