OpenHands
OpenHands copied to clipboard
[Bug]: The file editor is displaying the wrong content.
Is there an existing issue for the same bug?
- [X] I have checked the troubleshooting document at https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
- [X] I have checked the existing issues.
Describe the bug
After clicking refresh icon, the displayed file content becomes incorrect. However, upon inspecting using F12, the data returned from the backend is correct. I will debug and fix this issue later.
https://github.com/OpenDevin/OpenDevin/assets/33391300/073eb607-a8ec-428f-9232-c9912c0ef2a0
Current Version
main
Installation and Configuration
npm run start
Model and Agent
No response
Reproduction Steps
No response
Logs, Errors, Screenshots, and Additional Context
No response
How to reproduce:
- Create files named aaa.sh and tmp/bbb.sh.
- First, view the aaa.sh file, then view the tmp/bbb.sh file, and finally re-visit the aaa.sh file. You will notice that the content is incorrect.
I can confirm it's a redux issue because when I store the code using useState, the bug fixed. Later, I will see if I can refactor it.
Working fine here. That sh file should be inside the tree. How it replaced the workspace title?
@SmartManoj
You need to create aaa.sh and tmp/bbb.sh. Please note that bbb.sh is inside the tmp folder, and then you can reproduce it. I provide a video.
https://github.com/OpenDevin/OpenDevin/assets/33391300/9fb8e750-fe36-42ea-960f-663416e04b88
I had some similar issues
@Shimada666 Yes, affecting in latest versions even without nested dirs. If two files are there a and b, The first time clicking a -> works clicking b -> works then clicking again doesn't work
This PR #1853 introduced this? Workaround: View files in IDE
It may be related to how the active file path is being updated. I can't do it today, so maybe you can take a look somewhere here?
https://github.com/OpenDevin/OpenDevin/blob/3e3dcd52a8043f47b747dc8560d95cf59bc8915b/frontend/src/components/file-explorer/TreeNode.tsx#L45-L69
@SmartManoj @amanape The latest the code does not seem to have this issue, I will close this issue. Thank you all!