In app, "merge main into <branch>" isn't working as expected

I am working on a short-lived feature branch and need to quickly address a bug someone found in our published app.

Steps:

  1. i create feature-branch-abc from main, make some changes and commit.
  2. bug report from published app comes in, and I need to address quickly.
  3. i create a bug-branch-xyz from main, fix the bug, commit, create pr, merge to main in github, publish. no more bug in the published app.
  4. i go back to feature-branch-abc. I click on ā€œMerge main into feature-branch-abcā€. It displays the merge modal, no conflicts, and I commit.

After merging main into feature-branch-abc, things aren’t what they should be. If I go to the js query that was fixed in bug-branch-xyz and merged into main, I will see a ā€œblue dotā€ in the code tab indicating changes have been made, and I’ll see the old version of that query in the code editor. Why is the old version appearing as unsaved changes in the js query? Obviously to move forward I need to save the query (since Retool doesn’t allow ā€œundo changesā€). So I save the query , ā€œPreview Changesā€ and it certainly is removing the change I just merged in from main.

I have 2 workarounds:

  • Create a new feature branch off of main, feature-branch-abc-take2 and manually copy/paste my changes from feature-branch-abc to feature-branch-abc-take2. And pray that I don’t have to do another ā€œhot-fixā€ before publishing feature-branch-abc-take2.
  • In my existing feature branch, feature-branch-abc, manually copy/paste my changes that were in bug-branch-xyz. When I do this, that ā€œblue dotā€, go aways. This isn’t always possible since I’m not able to modify every possible field that shows up in the commit. Even when possible, it’s cumbersome.

Regardless of the workaround, it’s not always possible to copy/paste changes since I don’t have access to ā€œall the fieldsā€. And when it is possible, javascript often gets converted to a long string with newlines, and extracting that is cumbersome.

This has happened twice in the last day, and rebuilding the feature branch is becoming too time consuming to not report this. I hope I’m doing something wrong or this can be fixed quickly.

Thanks,

Larry

Data point – originally, while in feature-branch-abc, I had query1 open (albeit not modified). Then I jumped to main, created branch for bug fix, merged to main, etc etc. When I jumped back to feature-branch-abc, query1 tab was still open. The change made in bug-branch-xyz was within query1. When I ā€œmerge from mainā€, query1 tab was still open. I think open tabs are not being updated when ā€œmerge from mainā€ happens.

As a test, I emulated the entire flow from above. When I ā€œmerged from mainā€, I made sure all of my query tabs were closed, and it worked. ←- So this is yet another workaround for this issue. I’m not making UI changes so I don’t know if this is a workaround for that (or if that is even an issue).

So I think there is a bug. When a query tab is open, and the changes incoming from main would modify the query, then the code in the tab should get updated with whatever is in made.

Hi @lkiss,

I saw another user reporting a similar issue and our team believes that this issue is due to the app/page not refreshing in the browser after branches are merged.

I think you are correct, that if query tab is open, the UI is not automatically refreshing to reflect the saved changes from the branch merging back to main.

If you leave the tab open but refresh the browser, does that resolve the issue?