opensumi / core

🚀 A framework helps you quickly build AI Native IDE products.
https://opensumi.com
MIT License
3.01k stars 386 forks source link

[BUG] explorer - workspace 文件操作表现异常 #4051

Closed nxps closed 1 month ago

nxps commented 2 months ago

描述你的问题(Describe the bug)

  1. workspace 目录下为空时,新建目录比如 a, 页面并不显示,即使点击上面的刷新按钮也是如此,只能刷新页面,才会显示

image

image

  1. a 目录下有嵌套目录,直接删除顶层 a,并不生效

image

  1. 批量删除文件,删除成功后,过几秒报错,另外删除有嵌套文件夹的显示也有问题,刷新后显示正常

image

image

Uncaught Error: Cannot read properties of null (reading 'uri')

TypeError: Cannot read properties of null (reading 'uri')
    at MergeConflictContribution.getCacheResolvedConflicts (index.ts:443:35)
    at MergeConflictContribution.updateAllWidgets (index.ts:424:36)
    at UniqueContainer.value (index.ts:323:16)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:904:1)
    at UniqueContainer.value (codeEditorWidget.js:181:1)
    at Emitter._deliver (event.js:882:1)
    at Emitter.fire (event.js:912:1)
    at EditorConfiguration._recomputeOptions (editorConfiguration.js:72:1)
    at EditorConfiguration.updateOptions (editorConfiguration.js:120:1)
    at StandaloneEditor.updateOptions (codeEditorWidget.js:288:1)
    at StandaloneEditor.updateOptions (standaloneCodeEditor.js:223:1)
    at updateOptionsWithMonacoEditor (editor-collection.service.ts:233:16)
    at BrowserCodeEditor._doUpdateOptions (editor-collection.service.ts:339:5)
    at BrowserCodeEditor.updateOptions (editor-collection.service.ts:334:10)
    at CommentsService.updateEditorLayoutOptions (comments.service.ts:623:12)
    at CommentsService.<anonymous> (comments.service.ts:588:12)
    at Generator.next (<anonymous>)
    at tslib.es6.mjs:121:1
    at new Promise (<anonymous>)
    at Module.__awaiter (tslib.es6.mjs:117:1)
    at CommentsService.tryUpdateReservedSpace (comments.service.ts:563:55)
    at UniqueContainer.value (comments.service.ts:512:14)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:917:1)
    at StandaloneEditor.setModel (codeEditorWidget.js:357:1)
    at UniqueContainer.value (codeEditorWidget.js:1242:1)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:917:1)
    at TextModel.dispose (textModel.js:257:1)
    at disposable.dispose (disposable.ts:207:7)
    at EditorDocumentModel.dispose (disposable.ts:164:33)
    at EditorDocumentModelServiceImpl._doDelete (editor-document-model-service.ts:147:11)
    at editor-document-model-service.ts:138:14
    at MergeConflictContribution.getCacheResolvedConflicts (index.ts:443:35)
    at MergeConflictContribution.updateAllWidgets (index.ts:424:36)
    at UniqueContainer.value (index.ts:323:16)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:904:1)
    at UniqueContainer.value (codeEditorWidget.js:181:1)
    at Emitter._deliver (event.js:882:1)
    at Emitter.fire (event.js:912:1)
    at EditorConfiguration._recomputeOptions (editorConfiguration.js:72:1)
    at EditorConfiguration.updateOptions (editorConfiguration.js:120:1)
    at StandaloneEditor.updateOptions (codeEditorWidget.js:288:1)
    at StandaloneEditor.updateOptions (standaloneCodeEditor.js:223:1)
    at updateOptionsWithMonacoEditor (editor-collection.service.ts:233:16)
    at BrowserCodeEditor._doUpdateOptions (editor-collection.service.ts:339:5)
    at BrowserCodeEditor.updateOptions (editor-collection.service.ts:334:10)
    at CommentsService.updateEditorLayoutOptions (comments.service.ts:623:12)
    at CommentsService.<anonymous> (comments.service.ts:588:12)
    at Generator.next (<anonymous>)
    at tslib.es6.mjs:121:1
    at new Promise (<anonymous>)
    at Module.__awaiter (tslib.es6.mjs:117:1)
    at CommentsService.tryUpdateReservedSpace (comments.service.ts:563:55)
    at UniqueContainer.value (comments.service.ts:512:14)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:917:1)
    at StandaloneEditor.setModel (codeEditorWidget.js:357:1)
    at UniqueContainer.value (codeEditorWidget.js:1242:1)
    at Emitter._deliver (event.js:882:1)
    at Emitter._deliverQueue (event.js:893:1)
    at Emitter.fire (event.js:917:1)
    at TextModel.dispose (textModel.js:257:1)
    at disposable.dispose (disposable.ts:207:7)
    at EditorDocumentModel.dispose (disposable.ts:164:33)
    at EditorDocumentModelServiceImpl._doDelete (editor-document-model-service.ts:147:11)
    at editor-document-model-service.ts:138:14
    at errors.js:18:1

复现路径(To Reproduce)

如上

预期表现(Expected behavior)

环境信息(Environment)

erha19 commented 1 month ago

@nxps 感谢反馈,已在 v3.4.3 版本修复