Skip to content

Commit 8f25927

Browse files
authored
chore: now branch updates after consolidated api load (#41492)
## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!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.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!IMPORTANT] > 🟣 🟣 🟣 Your tests are running. > Tests running at: <https://github.com/appsmithorg/appsmith/actions/runs/20603821286> > Commit: 8bec483 > Workflow: `PR Automation test suite` > Tags: `@tag.Sanity` > Spec: `` > <hr>Tue, 30 Dec 2025 19:03:35 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 * **Bug Fixes** * Improved git branch URL parameter handling to properly synchronize branch metadata across the application. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 977f437 commit 8f25927

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

app/client/src/entities/Engine/AppViewerEngine.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import {
3333
import type { Span } from "instrumentation/types";
3434
import { endSpan, startNestedSpan } from "instrumentation/generateTraces";
3535
import { getIsFirstPageLoad } from "selectors/evaluationSelectors";
36+
import { updateBranchParam } from "git/helpers/updateBranchParam";
37+
import type { DefaultRootState } from "react-redux";
3638

3739
export default class AppViewerEngine extends AppEngine {
3840
constructor(mode: APP_MODE) {
@@ -45,8 +47,23 @@ export default class AppViewerEngine extends AppEngine {
4547
this.completeChore = this.completeChore.bind(this);
4648
}
4749

48-
*loadGit() {
49-
return;
50+
*loadGit(applicationId: string, rootSpan: Span) {
51+
const loadGitSpan = startNestedSpan("AppViewerEngine.loadGit", rootSpan);
52+
53+
// Extract branch from application's gitApplicationMetadata (populated from consolidated API response)
54+
// Inline selector to avoid cyclic dependency with applicationSelectors
55+
const branchName: string | undefined = yield select(
56+
(state: DefaultRootState) =>
57+
state.ui.applications.currentApplication?.gitApplicationMetadata
58+
?.branchName,
59+
);
60+
61+
// Update URL with branch parameter if branch exists
62+
if (branchName) {
63+
updateBranchParam(branchName);
64+
}
65+
66+
endSpan(loadGitSpan);
5067
}
5168

5269
*completeChore(rootSpan: Span) {

0 commit comments

Comments
 (0)