Closed roblourens closed 5 months ago
update after trying to repro:
Still no consistent repro or solution after a debug session with peng, will need to put a bigger effort into this in the future, and look out for a consistent repro.
cc @joaomoreno
Wondering if there's a way that we can make sure that the treeview can recover from this? Bit painful forcing a full reload. The treeview fails on a setSelection
call and from that point the DOM node is fully present regardless of editor switching.
@joaomoreno is OOF till next week, if this requires attention from him I suggest we move the issue to next milestone or the recovery milestone. I don't see any candidate label, please let me know otherwise.
the issue is still happening. Sometimes the outline is stuck and its view remains the same even if I open a new notebook with different content.
I can confirm this (latest PopOS; Ubuntu 22.04, Linux 6.8.0 and code
1.88.0).
Once I open a notebook, the outline stops updating, and requires a full vscode restart. On opening a notebook, I see the following Window
output:
2024-04-08 16:11:01.120 [error] TreeError [OutlinePane] Tree element not found: [object Object]: Error: TreeError [OutlinePane] Tree element not found: [object Object]
at T.o (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:192:29689)
at T.getListIndex (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:192:28692)
at Y.getRelativeTop (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:626:2556)
at V (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2334:38326)
at P.jc (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2334:38463)
@Yoyokrazy should we track this as candidate? (assuming fix is in reason)
@jrieken Yep, I think that's pretty fair. Given the only way out of the broken state is a full reload, it seems breaking enough (and a regression) to warrant candidate status.
Easy repro:
notebook.outline.showCodeCells
is set to false
(this is the default, but double check you haven't changed this)NotebookCellOutline.getChildren
)Description of issue (from PR)
When outline view was set to follow cursor
, the treeview will try to highlight the active entry in the outline view. After the latest iteration, users are now able to exclude a variety of cell types from the view. This filtering logic was shifted to the treeview's getChildren
call in order to preserve the outline model for other computations (namely nb sticky scroll).
Easiest example is if the user excludes code cells (the default behavior), and then clicks a code cell. The treeview will attempt to highlight the entry, but as the cell was filtered out, there would be an error as the entry cannot be found. This breaks the outline view entirely, and the treeview cannot recover. Ideally this wouldn't force a reload, but this PR ensures that a notebook entry exclusion error will not break the view state.
I confirmed that nothing shows up in the outline and no errors are thrown in the devtools console.
I saw this once a couple days ago, and again today