Skip to content

sessions: rename "No Workspace" group to "Unknown"#305352

Merged
sandy081 merged 3 commits intomainfrom
copilot/semantic-canid
Mar 27, 2026
Merged

sessions: rename "No Workspace" group to "Unknown"#305352
sandy081 merged 3 commits intomainfrom
copilot/semantic-canid

Conversation

@sandy081
Copy link
Copy Markdown
Member

Summary

Renames the fallback workspace group label in the sessions list from "No Workspace" to "Unknown" for sessions that don't have an associated workspace.

Changes

  • src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts — Updated groupByWorkspace() fallback label from "No Workspace" to "Unknown"
  • src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts — Updated test description and assertion to match the new label

Copilot AI review requested due to automatic review settings March 26, 2026 22:57
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 26, 2026
@sandy081 sandy081 self-assigned this Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the fallback workspace group label used by the Sessions list grouping logic when a session has no associated workspace, and updates the related unit test expectations.

Changes:

  • Updated groupByWorkspace() fallback label from “No Workspace” to “Unknown”.
  • Updated the groupByWorkspace helper test description and expected labels to match.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts Changes the localized fallback workspace group label used during grouping.
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts Updates test text and assertions for the new fallback label.
Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts:1186

  • The fallback group label is now "Unknown", and groupByWorkspace uses the label both as the Map key and to form the section id (id: workspace:${label}). This increases the chance of collisions with a real workspace actually named "Unknown", which can break section identity and collapse-state persistence (two different groups end up sharing the same id). Consider using a stable, non-display identifier for grouping/ids (e.g. a dedicated sentinel id for the missing-workspace group) and keep the localized label purely for display.
		const workspace = session.workspace.get();
		const label = workspace?.label ?? localize('unknown', "Unknown");
		let group = groups.get(label);
		if (!group) {
			group = [];
			groups.set(label, group);
		}
		group.push(session);
	}

	const order = [...groups.keys()].sort((a, b) => a.localeCompare(b));

	return order.map(label => ({
		id: `workspace:${label}`,
		label,

Yoyokrazy
Yoyokrazy previously approved these changes Mar 26, 2026
@sandy081 sandy081 enabled auto-merge (squash) March 26, 2026 23:48
@sandy081 sandy081 merged commit 79c4565 into main Mar 27, 2026
18 checks passed
@sandy081 sandy081 deleted the copilot/semantic-canid branch March 27, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants