Skip to content

Conversation

@bmingles
Copy link
Collaborator

@bmingles bmingles commented Dec 12, 2025

DH-20899: Fixed some treeview command errors

  • The refresh button in title bar of PANELS panel was completely broken due to using incorrect command. I created a dedicated command for this.
  • Inline actions for treeview items sometimes pass undefined instead of the treeview item. I've mostly observed this when changing to another window and coming back to VS Code. It's possible there's some treeview data sync issue like the tree in the middle of a refresh or something, but it seems like a VS Code bug. Regardless, the fix was to ignore undefined values passed to command handlers and user can just click again instead of getting an error toast which was happening before
  • I also fixed a minor issue where package.json showed validation warnings due to missing icons. These get used if a user drags a panel out of the DH view into the activity bar as its own panel. For now just re-using the DH icon. Could always have dedicated icons for each panel, but this seems very low priority and out of scope.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

No docs changes detected for cd7234f

@bmingles bmingles requested a review from mofojed December 12, 2025 16:47
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

End-to-end Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
330000015:03:51
A ctrf plugin

Failed Test Summary

No failed tests ✨

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

Unit Test Summary

Tests 📝Passed ✅Failed ❌Skipped ⏭️Pending ⏳Other ❓Flaky 🍂Duration ⏱️
2882880000000:00:00
A ctrf plugin

Failed Test Summary

No failed tests ✨

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an issue filed in VS Code for why undefined is coming through? That seems like a bug...
I guess you'd be able to tell in the tree provider if a getTreeItem was called and returned undefined. It seems odd to have to add this protective check in every single context menu handler.

serverState: ServerState
serverState: ServerState | undefined
): Promise<void> => {
// Sometimes view/item/context commands pass undefined instead of a tree.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is strange. "instead of a tree. node." But it doesn't pass either of those?
Probably just say "instead of a value".

@bmingles bmingles requested a review from mofojed December 12, 2025 22:09
mofojed
mofojed previously approved these changes Dec 15, 2025
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate filing a bug for VS Code as well just for tracking.

@bmingles
Copy link
Collaborator Author

I filed microsoft/vscode#283655 and updated comments in this PR to reference it

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice filed bug too!

@bmingles bmingles merged commit b9bae64 into main Dec 15, 2025
6 checks passed
@bmingles bmingles deleted the DH-20899_tree-view branch December 15, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants