src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts/RunStateRenderer/renderState
class RunStateRenderer:	renderState(runState: NotebookCellExecutionState | undefined, getCellIndex: () => number, lastRunSuccess: boolean | undefined = undefined) {
		if (this.spinnerTimer) {
			this.pendingNewState = runState;
			this.pendingLastRunSuccess = lastRunSuccess;
			return;
		}

		let runStateTooltip: string | undefined;
		if (!runState && lastRunSuccess) {
			aria.alert(`Code cell at ${getCellIndex()} finishes running successfully`);
			DOM.reset(this.element, renderIcon(successStateIcon));
		} else if (!runState && !lastRunSuccess) {
			aria.alert(`Code cell at ${getCellIndex()} finishes running with errors`);
			DOM.reset(this.element, renderIcon(errorStateIcon));
		} else if (runState === NotebookCellExecutionState.Executing) {
			runStateTooltip = localize('runStateExecuting', "Executing");
			if (this.lastRunState !== NotebookCellExecutionState.Executing) {
				aria.alert(`Code cell at ${getCellIndex()} starts running`);
			}
			DOM.reset(this.element, renderIcon(syncing));
			this.spinnerTimer = setTimeout(() => {
				this.spinnerTimer = undefined;
				if (this.pendingNewState && this.pendingNewState !== runState) {
					this.renderState(this.pendingNewState, getCellIndex, this.pendingLastRunSuccess);
					this.pendingNewState = undefined;
				}
			}, RunStateRenderer.MIN_SPINNER_TIME);
		} else if (runState === NotebookCellExecutionState.Pending) {
			// Not spinning
			runStateTooltip = localize('runStatePending', "Pending");
			DOM.reset(this.element, renderIcon(Codicons.Codicon.clock));
		} else {
			this.element.innerText = '';
		}

		if (!runState && typeof lastRunSuccess !== 'boolean') {
			DOM.hide(this.element);
		} else {
			this.element.style.display = 'flex';
		}

		if (runStateTooltip) {
			this.element.setAttribute('title', runStateTooltip);
		}

		this.lastRunState = runState;
	}