-
Notifications
You must be signed in to change notification settings - Fork 92
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
Conversation
E2E Tests 🚀 |
Also fixes ext. host indicator showing during unrelated disconnections
|
||
let extensionHostDisconnected = false; | ||
|
||
const reversedItems = this.props.positronConsoleInstance.runtimeItems.slice().reverse(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.
Addresses #5444
Release Notes
New Features
Bug Fixes
QA Notes