Change:
<img width="419" alt="image" src=""
While the SCM view is refreshing itself, I still sometimes see the sparkle move outside of the input box, then back in on the next layout
could you verify this again? With the latest Insiders the sparkle should not appear outside the input box.
LGTM now, thank you for the fix!

Discussion:
} const SCMInputContextKeys = { <ins> ActionCount: new RawContextKey<number>('scmInputActionCount', 0), </ins> ActionIsEnabled: new RawContextKey<boolean>('scmInputActionIsEnabled', false), ActionIsRunning: new RawContextKey<boolean>('scmInputActionIsRunning', false), };

private _dropdownActions: IAction[] = []; get dropdownActions(): IAction[] { return this._dropdownActions; } <ins> private readonly _ctxActionCount: IContextKey<number>; </ins> constructor( container: HTMLElement, menuId: MenuId,

icon: Codicon.debugStop, }, undefined, undefined, undefined, contextKeyService, commandService); <ins> this._ctxActionCount = SCMInputContextKeys.ActionCount.bindTo(contextKeyService); </ins> const updateToolbar = () => { const actions: IAction[] = []; createAndFillInActionBarActions(menu, options?.menuOptions, actions);

primaryAction = actions.find(a => a.id === lastActionId) ?? actions[0]; } <ins> this._ctxActionCount.set(actions.length); </ins> this._dropdownActions = actions.length === 1 ? [] : actions; container.classList.toggle('has-no-actions', actions.length === 0);

private placeholderTextContainer: HTMLElement; private inputEditor: CodeEditorWidget; private toolbarContainer: HTMLElement; <ins> private toolbarContextKeyService: IContextKeyService; </ins> private actionBar: ActionBar; private readonly disposables = new DisposableStore();

const onDidChangeActionButton = () => { this.actionBar.clear(); <del> const defaultProvider = this.scmService.getDefaultInputValueProvider(input.repository); </del> <ins> const actionCount = this.toolbarContextKeyService.getContextKeyValue<number>(SCMInputContextKeys.ActionCount.key) ?? 0; </ins> <del> if (input.actionButton && defaultProvider === undefined) { </del> <ins> if (input.actionButton && actionCount === 0) { </ins> const action = new Action( input.actionButton.command.id, input.actionButton.command.title,

this.layout(); }; <ins> const ctxKeys = new Set<string>([SCMInputContextKeys.ActionCount.key]); this.repositoryDisposables.add(Event.filter(this.toolbarContextKeyService.onDidChangeContext, e => e.affectsSome(ctxKeys))(onDidChangeActionButton, this)); </ins> this.repositoryDisposables.add(input.onDidChangeActionButton(onDidChangeActionButton, this)); this.repositoryDisposables.add(this.scmService.onDidChangeInputValueProviders(onDidChangeActionButton, this)); this.repositoryDisposables.add(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.showInputActionButton'))(onDidChangeActionButton, this));

} private createToolbar(input: ISCMInput): void { <del> const contextKeyService2 = this.contextKeyService.createScoped(this.toolbarContainer); const services = new ServiceCollection([IContextKeyService, contextKeyService2]); </del> <ins> const services = new ServiceCollection([IContextKeyService, this.toolbarContextKeyService]); </ins> const instantiationService2 = this.instantiationService.createChild(services); <del> const ctxIsActionEnabled = SCMInputContextKeys.ActionIsEnabled.bindTo(contextKeyService2); </del> <ins> const ctxIsActionEnabled = SCMInputContextKeys.ActionIsEnabled.bindTo(this.toolbarContextKeyService); </ins> this.repositoryDisposables.add(input.repository.provider.onDidChangeResources(() => ctxIsActionEnabled.set(input.repository.provider.groups.some(r => r.resources.length > 0)))); const actionRunner = instantiationService2.createInstance(SCMInputWidgetActionRunner, input);

actionRunner, actionViewItemProvider: action => { if (action instanceof MenuItemAction && toolbar.dropdownActions.length > 1) { <del> const scmInputActionIsEnabled = contextKeyService2.getContextKeyValue<boolean>('scmInputActionIsEnabled') === true; </del> <ins> const scmInputActionIsEnabled = this.toolbarContextKeyService.getContextKeyValue<boolean>('scmInputActionIsEnabled') === true; </ins> const dropdownAction = new Action('scmInputMoreActions', localize('scmInputMoreActions', 'More Actions...'), 'codicon-chevron-down', scmInputActionIsEnabled); return instantiationService2.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, toolbar.dropdownActions, '', this.contextMenuService, { actionRunner });

this.setPlaceholderFontStyles(fontFamily, fontSize, lineHeight); <ins> this.toolbarContextKeyService = this.contextKeyService.createScoped(this.toolbarContainer); </ins> const contextKeyService2 = contextKeyService.createScoped(this.element); this.repositoryIdContextKey = contextKeyService2.createKey('scmRepository', undefined);