CodeDiff Shows Incorrect Old File When Multiple Same Name Files Have Changes

Wappler Version : 4.0.1
Operating System : W10
Server Model: NodeJS
Database Type: MariaDB
Hosting Type: Docker/DO

Expected behavior

When doing “show changes” on a file from Git panel, left side should show the actual old file or new file shown on right.

Actual behavior

If there are more than one file with the same name which have changes, the code diff tab opened by “show changes” compares the file with the first instance of the same named file, with the current file selected.

How to reproduce

Have been trying to reproduce this for weeks, and finally have a reliable method. Not 100%, but works almost always.
I have a project with three Docker targets - local, staging (remote) & production (remote).
I made some changes in docker-compose.yml in the .wappler/targets folder for all three targets.
When I do a code diff on the first target’s yml file in Wappler, it shows up correctly.
But for both staging & production yml files (which come lower in the list of uncommitted changes in Wappler), code diff shows the development file in the left, and correct file on the right.
So the number of changes that are shown are huge, instead of just the two lines that actually have the change.

I tried opening the same files in SourceTree application, and code diff there works fine.

The docker-compose and docker based targets are not the reason for this - its because the name of the files are same.
This happens almost always when there are same named files (anywhere in the project) that have uncommitted changes.

Which side is wrong, is it the left or right side that shows the incorrect file?

Left side.

This has been fixed in Wappler 4.0.2

This topic was automatically closed after 46 hours. New replies are no longer allowed.