Skip to content

chore: fixes issue with disabled branch button#40163

Merged
brayn003 merged 1 commit intoreleasefrom
chore/git-mod-fix-11
Apr 9, 2025
Merged

chore: fixes issue with disabled branch button#40163
brayn003 merged 1 commit intoreleasefrom
chore/git-mod-fix-11

Conversation

@brayn003
Copy link
Contributor

@brayn003 brayn003 commented Apr 8, 2025

Description

  • Users with "developer" access to an app were finding the branch switch button disabled
  • The issue is occurring due to a bug in the autocommit flow. This PR fixes it

Fixes #40162

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/14337186264
Commit: 5803065
Cypress dashboard.
Tags: @tag.Git
Spec:


Tue, 08 Apr 2025 16:13:18 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Refactor
    • Improved the autocommit process by enhancing the success-handling logic with additional context details. This change refines how commit actions are processed, ensuring more precise state updates during the commit workflow while preserving the existing functional flow. These modifications help significantly streamline internal operations without affecting the overall seamless user experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 8, 2025

Walkthrough

The change updates the autocommit saga by replacing the dispatched action. The previous generic success action has been replaced with a more specific one that includes the artifact definition. Additionally, the method signature has been updated to reflect this change, ensuring that the dispatched action now carries the necessary context.

Changes

File(s) Change Summary
app/client/src/git/sagas/triggerAutocommitSaga.ts
git/store/gitArtifactSlice
Replaced gitSyncActions.triggerAutocommitSuccess() with gitArtifactActions.triggerAutocommitSuccess({ artifactDef }) in the saga, and updated the exported method signature accordingly.

Assessment against linked issues

Objective (Issue) Addressed Explanation
Resolve disabled branch button bug (#40162) The change focuses solely on autocommit action dispatch and does not affect branch button behavior.

Poem

In commits’ whisper, changes take flight,
With artifact details shining bright.
A saga refined with a clearer tone,
New actions now step into the zone.
Git sings its tune in every byte.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bee2091 and 5803065.

📒 Files selected for processing (1)
  • app/client/src/git/sagas/triggerAutocommitSaga.ts (1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
app/client/src/git/sagas/triggerAutocommitSaga.ts (1)
app/client/src/git/store/gitArtifactSlice.ts (1)
  • gitArtifactActions (277-277)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (1)
app/client/src/git/sagas/triggerAutocommitSaga.ts (1)

153-153: Fixed bug in autocommit flow by providing correct artifact data

The change correctly addresses the issue where developers couldn't switch branches. Previously, the action dispatched didn't include the necessary artifact definition, which is required for proper branch button state management.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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 docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@github-actions github-actions bot added Bug Something isn't working skip-changelog Adding this label to a PR prevents it from being listed in the changelog and removed Bug Something isn't working labels Apr 8, 2025
@brayn003 brayn003 added the ok-to-test Required label for CI label Apr 8, 2025
@github-actions github-actions bot added the Bug Something isn't working label Apr 8, 2025
@brayn003 brayn003 self-assigned this Apr 8, 2025
@brayn003 brayn003 requested a review from ashit-rath April 8, 2025 16:46
@brayn003 brayn003 merged commit e805fca into release Apr 9, 2025
48 checks passed
@brayn003 brayn003 deleted the chore/git-mod-fix-11 branch April 9, 2025 10:14
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description
- Users with "developer" access to an app were finding the branch switch
button disabled
- The issue is occurring due to a bug in the autocommit flow. This PR
fixes it

Fixes appsmithorg#40162

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14337186264>
> Commit: 5803065
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14337186264&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Tue, 08 Apr 2025 16:13:18 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved the autocommit process by enhancing the success-handling
logic with additional context details. This change refines how commit
actions are processed, ensuring more precise state updates during the
commit workflow while preserving the existing functional flow. These
modifications help significantly streamline internal operations without
affecting the overall seamless user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working 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.

[Bug]: Issue with disabled branch button

2 participants