Change:
Type: <bBug</bworkspace a new notebook a syntax or other error in a cell problems view bug There's an extra to the right of the notebook file title ! VS Code version: Code - Insiders 1.88.0-insider (Universal) (, 2024-03-25T05:50:56.142Z) OS version: Darwin arm64 23.4.0 Modes: <details<summarySystem Info</summary </details<!-- generated by issue reporter --
It is also same in Search ! Probably this should be something handled by the CC
Its possible to omit in the label widget for because there we know we are in a file context and is not very meaningful for descriptions (change in ). But for the problems view there is an explicit call to with an explicit description passed in: I am not sure just changing to return or wouldn't break some assumptions we have. I would argue that is a valid relative label for a path that has no parent (as in this case). any reason is not used? Or maybe we need to enlist the cell scheme as well as we do for untitled scheme.
I do not remember why we have two branches here - and . Is there a general suggestion for this? I am looking for this before digging deep. Is there a way to know this?
Yeah I would pick the and see what breaks, but maybe there is something in the history of that change that could explain it? I think schemes are pretty much hardcoded, here unfortunately while the notebook scheme is , the cell schemes are not. is there a way to know if a cell scheme is untitled?
It goes back before we used to have label service. I was also not showing the of the resource if the resource has no file provider. Showing parent was introduced . I believe using is the right way to go. I also see Search doing the same.

Discussion:
*--------------------------------------------------------------------------------------------*/ import * as dom from 'vs/base/browser/dom'; <del> import * as network from 'vs/base/common/network'; </del> import * as paths from 'vs/base/common/path'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { ResourceLabels, IResourceLabel } from 'vs/workbench/browser/labels';

import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { QuickFixAction, QuickFixActionViewItem } from 'vs/workbench/contrib/markers/browser/markersViewActions'; import { ILabelService } from 'vs/platform/label/common/label'; <del> import { dirname, basename, isEqual } from 'vs/base/common/resources'; </del> <ins> import { basename, isEqual } from 'vs/base/common/resources'; </ins> import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; import { ITreeFilter, TreeVisibility, TreeFilterResult, ITreeRenderer, ITreeNode } from 'vs/base/browser/ui/tree/tree'; import { FilterOptions } from 'vs/workbench/contrib/markers/browser/markersFilterOptions';

import { SeverityIcon } from 'vs/platform/severityIcon/browser/severityIcon'; import { CodeActionTriggerType } from 'vs/editor/common/languages'; import { IOpenerService } from 'vs/platform/opener/common/opener'; <del> import { IFileService } from 'vs/platform/files/common/files'; </del> import { Progress } from 'vs/platform/progress/common/progress'; import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems'; import { Codicon } from 'vs/base/common/codicons';

constructor( private labels: ResourceLabels, onDidChangeRenderNodeCount: Event<ITreeNode<ResourceMarkers, ResourceMarkersFilterData>>, <del> @ILabelService private readonly labelService: ILabelService, @IFileService private readonly fileService: IFileService </del> ) { onDidChangeRenderNodeCount(this.onDidChangeRenderNodeCount, this, this.disposables); }

const resourceMarkers = node.element; const uriMatches = node.filterData && node.filterData.uriMatches || []; <del> if (this.fileService.hasProvider(resourceMarkers.resource) || resourceMarkers.resource.scheme === network.Schemas.untitled) { templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches }); } else { templateData.resourceLabel.setResource({ name: resourceMarkers.name, description: this.labelService.getUriLabel(dirname(resourceMarkers.resource), { relative: true }), resource: resourceMarkers.resource }, { matches: uriMatches }); } </del> <ins> templateData.resourceLabel.setFile(resourceMarkers.resource, { matches: uriMatches }); </ins> this.updateCount(node, templateData); const nodeRenders = this.renderedNodes.get(resourceMarkers) ?? [];