Skip to content

Reuse agent metadata watchers #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Reuse agent metadata watchers #204

merged 2 commits into from
Feb 2, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Feb 2, 2024

Followup PR to reuse watchers to make the automatic refresh less janky.

This has two effects:

  1. Lower overhead from establishing the watchers over and over.
  2. No more flashing in the tree as the watchers get recreated and we wait for the first update.

I renamed CoderTreeItemType to make clear it was for openable items only, not for the metadata items and not for the new error item.

Because I needed to refactor the watchers a little I added a line for when something with the metadata fails, rather than quietly disposing (tested by manually adding throw new Error("hey")).

screenshot

@code-asher code-asher requested a review from Kira-Pilot February 2, 2024 00:06
This has two effects:

1. Lower overhead from establishing the watchers over and over.
2. No more flashing in the tree as the watchers get recreated and we
   wait for the first update.
@code-asher code-asher force-pushed the asher/reuse-watchers branch from 49fbe38 to c94247a Compare February 2, 2024 00:11
@code-asher code-asher merged commit e3e4272 into main Feb 2, 2024
@code-asher code-asher deleted the asher/reuse-watchers branch February 2, 2024 02:59
@code-asher
Copy link
Member Author

@Kira-Pilot Just FYI I was going to push this directly to main to get a test release out, but I decided to open a PR first and merge it in that way so it could be reviewed later just in case I missed something!

Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

This looks solid to me!!

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.

2 participants