Describe the bug
The model cleanup effect introduced in apps/desktop/src/components/EditorArea.tsx (commit 0efec72e, "imp: CPU & Ram optimization") disposes Monaco models that should remain active.
On Windows, paths stored in openFiles use backslashes (e.g. C:\Proyectos\ide\package.json), while Monaco model URIs normalize to forward slashes and encode the drive letter. The current matching with === against model.uri.fsPath / model.uri.path or modelPath.endsWith(f.path) never matches, so every model is treated as "not in openFiles" and disposed — including the model that was just created for the file being opened. The editor then renders against a disposed model, which shows as empty content.
Additional notes:
- The local variable
openPaths is created but never referenced.
- Dep array
[openFiles, currentFile] causes extra runs on tab switches.
Steps to Reproduce
- Open the app on Windows (
pnpm desktop).
- Open any folder via File → Open Folder.
- Click any file in the explorer (e.g.
package.json).
- The tab appears at the top but the editor area stays blank.
- Repeat with any other file — same result.
Trixty Version
v1.0.8 (main @ 50923f8)
OS
Windows
Fix yourself?
Yes
Describe the bug
The model cleanup effect introduced in
apps/desktop/src/components/EditorArea.tsx(commit0efec72e, "imp: CPU & Ram optimization") disposes Monaco models that should remain active.On Windows, paths stored in
openFilesuse backslashes (e.g.C:\Proyectos\ide\package.json), while Monaco model URIs normalize to forward slashes and encode the drive letter. The current matching with===againstmodel.uri.fsPath/model.uri.pathormodelPath.endsWith(f.path)never matches, so every model is treated as "not in openFiles" and disposed — including the model that was just created for the file being opened. The editor then renders against a disposed model, which shows as empty content.Additional notes:
openPathsis created but never referenced.[openFiles, currentFile]causes extra runs on tab switches.Steps to Reproduce
pnpm desktop).package.json).Trixty Version
v1.0.8 (main @ 50923f8)
OS
Windows
Fix yourself?
Yes