Skip to content
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

Adds indicator in console when extension host is disconnected #6089

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

samclark2015
Copy link
Contributor

@samclark2015 samclark2015 commented Jan 22, 2025

Adds indicator and helpful message in console when extension host is disconnected, replacing the prompt. When the extension host comes back, the prompt is restored.
ezgif-1-a4d8bf5223

Addresses #5444

Release Notes

New Features

  • Indicator in console when extension host is down

Bug Fixes

  • N/A

QA Notes

@samclark2015 samclark2015 self-assigned this Jan 22, 2025
Copy link

github-actions bot commented Jan 22, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@samclark2015 samclark2015 marked this pull request as ready for review January 23, 2025 18:34
@samclark2015 samclark2015 requested a review from jmcphers January 24, 2025 14:44

let extensionHostDisconnected = false;

const reversedItems = this.props.positronConsoleInstance.runtimeItems.slice().reverse();
Copy link
Collaborator

Choose a reason for hiding this comment

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

There can be a lot of runtime items, so the copy made by slice() could be expensive (which matters since this runs on every render). I would recommend just adding a flag we can check. If we do need a loop we could just index backwards?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I modified the check to set this flag, and moved it within the existing map() call; same effect, but without a copy or secondary iteration.

{extensionHostDisconnected ?
(<div className='console-item-reconnecting'>
<span className='codicon codicon-loading codicon-modifier-spin'></span>
<span>Extensions restarting...</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This string needs to be localized.

Copy link
Contributor Author

@samclark2015 samclark2015 Jan 27, 2025

Choose a reason for hiding this comment

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

I added the localization in the React component, but want to confirm no l10n properties need to be defined elsewhere (e.g., map the key to a string outside the source code). I searched the codebase for several other l10n keys and didn't find references outside the components.

@samclark2015 samclark2015 requested a review from jmcphers January 28, 2025 17:11
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

LGTM!

@samclark2015 samclark2015 merged commit bfdc517 into main Jan 29, 2025
8 checks passed
@samclark2015 samclark2015 deleted the feature/console-extension-host-status branch January 29, 2025 14:55
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants