OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: Just clicking and browsing Workspace files cause them to have the "edited dot" next the file name

Open diwu-sf opened this issue 1 year ago • 6 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

On latest main commit 2b3fd9454034187b638282f7d204f329622766b2 In the UI, load up the workspace and just click around the files will cause them to have the "edited dot".

image

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

diwu-sf avatar Nov 06 '24 23:11 diwu-sf

Maybe @amanape has an idea why that happens?

enyst avatar Nov 06 '24 23:11 enyst

Huh... interesting that you are seeing this while nothing is running. There is a related issue here: https://github.com/All-Hands-AI/OpenHands/issues/4576

mamoodi avatar Nov 07 '24 14:11 mamoodi

The easiest way to reproduce this is to make a fully empty .gitkeep file (touch .gitkeep) and then click the gitkeep file in the UI

diwu-sf avatar Nov 14 '24 19:11 diwu-sf

@enyst @mamoodi This is still happening, there's something wrong with handleEditorChange callback, and the value that's being set.

I think there's a race condition with the fetch for the new file, because what I see after adding logging is:

  • when clicking away from a file path
  • handleEditorChange is called with the previous file path, but the content of the new file clicked into

diwu-sf avatar Nov 22 '24 19:11 diwu-sf

@diwu-sf Nobody has taken on the issue yet, sorry! I'll give it a good look on Monday but can't make any promises.

amanape avatar Nov 22 '24 20:11 amanape

Bump, this is a pretty severe bug that's still reproducible on main. I think it has to do with random ordering of the event callback for the editor. When it reproduces, the frontend file content state cache is constantly getting the "new file content" set against the previous file's path when a new file is clicked into in the tree list.

diwu-sf avatar Nov 27 '24 07:11 diwu-sf

This is fixed in main because the UI no longer allows you to edit files.

mamoodi avatar Dec 27 '24 16:12 mamoodi

Fixed in 0.18.0.

mamoodi avatar Jan 02 '25 17:01 mamoodi