Repository: RooVetGit/Roo-Code
Pull request #2526: Filter & Search Workspace Task History
Author: login: samhvw8
Labels: name: Enhancement
description: New feature or request
name: size:L
description: This PR changes 100-499 lines, ignoring generated files.
name: lgtm
description: This PR has been approved by a maintainer
Created: 2025-04-12T10:24:49Z | Merged: 2025-04-13T03:20:14Z


## Context

Follow up https://github.com/RooVetGit/Roo-Code/pull/2054 and discussion in https://github.com/RooVetGit/Roo-Code/discussions/2511

<!-- Brief description of WHAT you’re doing and WHY. -->

## Implementation

<!--

Some description of HOW you achieved it. Perhaps give a high level description of the program flow. Did you need to refactor something? What tradeoffs did you take? Are there things in here which you’d particularly like people to pay close attention to?

-->

## Screen Cast 
<div>
    <a href="https://www.loom.com/share/4a1023e84d9d4ab9809f320c0cab0421">
      <p>Filter & Search Workspace History - Watch Video</p>
    </a>
    <a href="https://www.loom.com/share/4a1023e84d9d4ab9809f320c0cab0421">
      <img style="max-width:300px;" src="https://cdn.loom.com/sessions/thumbnails/4a1023e84d9d4ab9809f320c0cab0421-78e31e6664e184b5-full-play.gif">
    </a>
  </div>

## How to Test

<!--

A straightforward scenario of how to test your changes will help reviewers that are not familiar with the part of the code that you are changing but want to see it in action. This section can include a description or step-by-step instructions of how to get to the state of v2 that your change affects.

A "How To Test" section can look something like this:

- Sign in with a user with tracks
- Activate `show_awesome_cat_gifs` feature (add `?feature.show_awesome_cat_gifs=1` to your URL)
- You should see a GIF with cats dancing

-->

## Get in Touch

<!-- We'd love to have a way to chat with you about your changes if necessary. If you're in the [Roo Code Discord](https://discord.gg/roocode), please share your handle here. -->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add 'Show all workspaces' feature to task history with UI toggle and translations.
> 
>   - **Feature**:
>     - Add 'Show all workspaces' checkbox in `HistoryPreview` and `HistoryView` to toggle task visibility across workspaces.
>     - Update `useTaskSearch` to filter tasks based on `showAllWorkspaces` state.
>   - **Translations**:
>     - Add `showAllWorkspaces` translation key to multiple language files including `en`, `es`, `fr`, `de`, `zh-CN`, and others.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=RooVetGit%2FRoo-Code&utm_source=github&utm_medium=referral)<sup> for 3cf35bb6611112a9d581e685828c490dab1fa324. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->


Diff:
diff --git a/webview-ui/package-lock.json b/webview-ui/package-lock.json
index c9c933e5cd5..abd6901452f 100644
--- a/webview-ui/package-lock.json
+++ b/webview-ui/package-lock.json
@@ -9,6 +9,7 @@
 			"version": "0.1.0",
 			"dependencies": {
 				"@radix-ui/react-alert-dialog": "^1.1.6",
+				"@radix-ui/react-checkbox": "^1.1.5",
 				"@radix-ui/react-collapsible": "^1.1.3",
 				"@radix-ui/react-dialog": "^1.1.6",
 				"@radix-ui/react-dropdown-menu": "^2.1.5",
@@ -3851,6 +3852,218 @@
 				}
 			}
 		},
+		"node_modules/@radix-ui/react-checkbox": {
+			"version": "1.1.5",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.1.5.tgz",
+			"integrity": "sha512-B0gYIVxl77KYDR25AY9EGe/G//ef85RVBIxQvK+m5pxAC7XihAc/8leMHhDvjvhDu02SBSb6BuytlWr/G7F3+g==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/primitive": "1.1.2",
+				"@radix-ui/react-compose-refs": "1.1.2",
+				"@radix-ui/react-context": "1.1.2",
+				"@radix-ui/react-presence": "1.1.3",
+				"@radix-ui/react-primitive": "2.0.3",
+				"@radix-ui/react-use-controllable-state": "1.1.1",
+				"@radix-ui/react-use-previous": "1.1.1",
+				"@radix-ui/react-use-size": "1.1.1"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"@types/react-dom": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+				"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				},
+				"@types/react-dom": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/primitive": {
+			"version": "1.1.2",
+			"resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz",
+			"integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==",
+			"license": "MIT"
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-compose-refs": {
+			"version": "1.1.2",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",
+			"integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",
+			"license": "MIT",
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-context": {
+			"version": "1.1.2",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",
+			"integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",
+			"license": "MIT",
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-presence": {
+			"version": "1.1.3",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.3.tgz",
+			"integrity": "sha512-IrVLIhskYhH3nLvtcBLQFZr61tBG7wx7O3kEmdzcYwRGAEBmBicGGL7ATzNgruYJ3xBTbuzEEq9OXJM3PAX3tA==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/react-compose-refs": "1.1.2",
+				"@radix-ui/react-use-layout-effect": "1.1.1"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"@types/react-dom": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+				"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				},
+				"@types/react-dom": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive": {
+			"version": "2.0.3",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.3.tgz",
+			"integrity": "sha512-Pf/t/GkndH7CQ8wE2hbkXA+WyZ83fhQQn5DDmwDiDo6AwN/fhaH8oqZ0jRjMrO2iaMhDi6P1HRx6AZwyMinY1g==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/react-slot": "1.2.0"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"@types/react-dom": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+				"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				},
+				"@types/react-dom": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-slot": {
+			"version": "1.2.0",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz",
+			"integrity": "sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/react-compose-refs": "1.1.2"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-callback-ref": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",
+			"integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==",
+			"license": "MIT",
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-controllable-state": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.1.tgz",
+			"integrity": "sha512-YnEXIy8/ga01Y1PN0VfaNH//MhA91JlEGVBDxDzROqwrAtG5Yr2QGEPz8A/rJA3C7ZAHryOYGaUv8fLSW2H/mg==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/react-use-callback-ref": "1.1.1"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-layout-effect": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",
+			"integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",
+			"license": "MIT",
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-previous": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",
+			"integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",
+			"license": "MIT",
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-size": {
+			"version": "1.1.1",
+			"resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",
+			"integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",
+			"license": "MIT",
+			"dependencies": {
+				"@radix-ui/react-use-layout-effect": "1.1.1"
+			},
+			"peerDependencies": {
+				"@types/react": "*",
+				"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+			},
+			"peerDependenciesMeta": {
+				"@types/react": {
+					"optional": true
+				}
+			}
+		},
 		"node_modules/@radix-ui/react-collapsible": {
 			"version": "1.1.3",
 			"resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.3.tgz",
diff --git a/webview-ui/package.json b/webview-ui/package.json
index 6c4c157176a..6dbda7b0045 100644
--- a/webview-ui/package.json
+++ b/webview-ui/package.json
@@ -19,6 +19,7 @@
 	},
 	"dependencies": {
 		"@radix-ui/react-alert-dialog": "^1.1.6",
+		"@radix-ui/react-checkbox": "^1.1.5",
 		"@radix-ui/react-collapsible": "^1.1.3",
 		"@radix-ui/react-dialog": "^1.1.6",
 		"@radix-ui/react-dropdown-menu": "^2.1.5",
diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx
index 64af37ed64d..e7e998cd6ce 100644
--- a/webview-ui/src/components/history/HistoryPreview.tsx
+++ b/webview-ui/src/components/history/HistoryPreview.tsx
@@ -4,15 +4,15 @@ import { vscode } from "@/utils/vscode"
 import { formatLargeNumber, formatDate } from "@/utils/format"
 import { Button } from "@/components/ui"
 
-import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
 import { CopyButton } from "./CopyButton"
+import { useTaskSearch } from "./useTaskSearch"
 
 type HistoryPreviewProps = {
 	showHistoryView: () => void
 }
 const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
-	const { taskHistory } = useExtensionState()
+	const { tasks } = useTaskSearch()
 	const { t } = useAppTranslation()
 
 	return (
@@ -26,7 +26,7 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
 					{t("history:viewAll")}
 				</Button>
 			</div>
-			{taskHistory.slice(0, 3).map((item) => (
+			{tasks.slice(0, 3).map((item) => (
 				<div
 					key={item.id}
 					className="bg-vscode-toolbar-hoverBackground/50 hover:bg-vscode-toolbar-hoverBackground/75 rounded-xs relative overflow-hidden opacity-90 hover:opacity-100 cursor-pointer"
diff --git a/webview-ui/src/components/history/HistoryView.tsx b/webview-ui/src/components/history/HistoryView.tsx
index c74d6b0d96e..064d9d2ef8e 100644
--- a/webview-ui/src/components/history/HistoryView.tsx
+++ b/webview-ui/src/components/history/HistoryView.tsx
@@ -4,12 +4,12 @@ import { BatchDeleteTaskDialog } from "./BatchDeleteTaskDialog"
 import prettyBytes from "pretty-bytes"
 import { Virtuoso } from "react-virtuoso"
 
-import { VSCodeTextField, VSCodeRadioGroup, VSCodeRadio, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeTextField, VSCodeRadioGroup, VSCodeRadio } from "@vscode/webview-ui-toolkit/react"
 
 import { vscode } from "@/utils/vscode"
 import { formatLargeNumber, formatDate } from "@/utils/format"
 import { cn } from "@/lib/utils"
-import { Button } from "@/components/ui"
+import { Button, Checkbox } from "@/components/ui"
 import { useAppTranslation } from "@/i18n/TranslationContext"
 
 import { Tab, TabContent, TabHeader } from "../common/Tab"
@@ -24,7 +24,16 @@ type HistoryViewProps = {
 type SortOption = "newest" | "oldest" | "mostExpensive" | "mostTokens" | "mostRelevant"
 
 const HistoryView = ({ onDone }: HistoryViewProps) => {
-	const { tasks, searchQuery, setSearchQuery, sortOption, setSortOption, setLastNonRelevantSort } = useTaskSearch()
+	const {
+		tasks,
+		searchQuery,
+		setSearchQuery,
+		sortOption,
+		setSortOption,
+		setLastNonRelevantSort,
+		showAllWorkspaces,
+		setShowAllWorkspaces,
+	} = useTaskSearch()
 	const { t } = useAppTranslation()
 
 	const [deleteTaskId, setDeleteTaskId] = useState<string | null>(null)
@@ -147,21 +156,36 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
 						</VSCodeRadio>
 					</VSCodeRadioGroup>
 
+					<div className="flex items-center gap-2" onClick={() => setShowAllWorkspaces(!showAllWorkspaces)}>
+						<Checkbox
+							checked={showAllWorkspaces}
+							onCheckedChange={(checked) => setShowAllWorkspaces(checked === true)}
+							variant="description"
+						/>
+						<span className="text-vscode-foreground">{t("history:showAllWorkspaces")}</span>
+					</div>
+
 					{/* Select all control in selection mode */}
 					{isSelectionMode && tasks.length > 0 && (
 						<div className="flex items-center py-1 px-2 bg-vscode-editor-background rounded">
-							<VSCodeCheckbox
-								checked={tasks.length > 0 && selectedTaskIds.length === tasks.length}
-								onChange={(e) => toggleSelectAll((e.target as HTMLInputElement).checked)}
-							/>
-							<span className="ml-2 text-vscode-foreground">
-								{selectedTaskIds.length === tasks.length
-									? t("history:deselectAll")
-									: t("history:selectAll")}
-							</span>
-							<span className="ml-auto text-vscode-descriptionForeground text-xs">
-								{t("history:selectedItems", { selected: selectedTaskIds.length, total: tasks.length })}
-							</span>
+							<div className="flex items-center gap-2">
+								<Checkbox
+									checked={tasks.length > 0 && selectedTaskIds.length === tasks.length}
+									onCheckedChange={(checked) => toggleSelectAll(checked === true)}
+									variant="description"
+								/>
+								<span className="text-vscode-foreground">
+									{selectedTaskIds.length === tasks.length
+										? t("history:deselectAll")
+										: t("history:selectAll")}
+								</span>
+								<span className="ml-auto text-vscode-descriptionForeground text-xs">
+									{t("history:selectedItems", {
+										selected: selectedTaskIds.length,
+										total: tasks.length,
+									})}
+								</span>
+							</div>
 						</div>
 					)}
 				</div>
@@ -203,11 +227,12 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
 										onClick={(e) => {
 											e.stopPropagation()
 										}}>
-										<VSCodeCheckbox
+										<Checkbox
 											checked={selectedTaskIds.includes(item.id)}
-											onChange={(e) =>
-												toggleTaskSelection(item.id, (e.target as HTMLInputElement).checked)
+											onCheckedChange={(checked) =>
+												toggleTaskSelection(item.id, checked === true)
 											}
+											variant="description"
 										/>
 									</div>
 								)}
@@ -407,6 +432,13 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
 												)}
 											</div>
 										)}
+
+										{showAllWorkspaces && item.workspace && (
+											<div className="flex flex-row gap-1 text-vscode-descriptionForeground text-xs">
+												<span className="codicon codicon-folder scale-80" />
+												<span>{item.workspace}</span>
+											</div>
+										)}
 									</div>
 								</div>
 							</div>
diff --git a/webview-ui/src/components/history/useTaskSearch.ts b/webview-ui/src/components/history/useTaskSearch.ts
index cc8e33e371c..47d5c3719c0 100644
--- a/webview-ui/src/components/history/useTaskSearch.ts
+++ b/webview-ui/src/components/history/useTaskSearch.ts
@@ -7,10 +7,11 @@ import { useExtensionState } from "@/context/ExtensionStateContext"
 type SortOption = "newest" | "oldest" | "mostExpensive" | "mostTokens" | "mostRelevant"
 
 export const useTaskSearch = () => {
-	const { taskHistory } = useExtensionState()
+	const { taskHistory, cwd } = useExtensionState()
 	const [searchQuery, setSearchQuery] = useState("")
 	const [sortOption, setSortOption] = useState<SortOption>("newest")
 	const [lastNonRelevantSort, setLastNonRelevantSort] = useState<SortOption | null>("newest")
+	const [showAllWorkspaces, setShowAllWorkspaces] = useState(false)
 
 	useEffect(() => {
 		if (searchQuery && sortOption !== "mostRelevant" && !lastNonRelevantSort) {
@@ -23,8 +24,12 @@ export const useTaskSearch = () => {
 	}, [searchQuery, sortOption, lastNonRelevantSort])
 
 	const presentableTasks = useMemo(() => {
-		return taskHistory.filter((item) => item.ts && item.task)
-	}, [taskHistory])
+		let tasks = taskHistory.filter((item) => item.ts && item.task)
+		if (!showAllWorkspaces) {
+			tasks = tasks.filter((item) => item.workspace === cwd)
+		}
+		return tasks
+	}, [taskHistory, showAllWorkspaces, cwd])
 
 	const fzf = useMemo(() => {
 		return new Fzf(presentableTasks, {
@@ -34,19 +39,26 @@ export const useTaskSearch = () => {
 
 	const tasks = useMemo(() => {
 		let results = presentableTasks
+
 		if (searchQuery) {
 			const searchResults = fzf.find(searchQuery)
-			results = searchResults.map((result) => ({
-				...result.item,
-				task: highlightFzfMatch(result.item.task, Array.from(result.positions)),
-			}))
-		}
+			results = searchResults.map((result) => {
+				const positions = Array.from(result.positions)
+				const taskEndIndex = result.item.task.length
 
-		// First apply search if needed
-		const searchResults = searchQuery ? results : presentableTasks
+				return {
+					...result.item,
+					task: highlightFzfMatch(
+						result.item.task,
+						positions.filter((p) => p < taskEndIndex),
+					),
+					workspace: result.item.workspace,
+				}
+			})
+		}
 
 		// Then sort the results
-		return [...searchResults].sort((a, b) => {
+		return [...results].sort((a, b) => {
 			switch (sortOption) {
 				case "oldest":
 					return (a.ts || 0) - (b.ts || 0)
@@ -74,5 +86,7 @@ export const useTaskSearch = () => {
 		setSortOption,
 		lastNonRelevantSort,
 		setLastNonRelevantSort,
+		showAllWorkspaces,
+		setShowAllWorkspaces,
 	}
 }
diff --git a/webview-ui/src/components/ui/checkbox.tsx b/webview-ui/src/components/ui/checkbox.tsx
new file mode 100644
index 00000000000..c14e7bd3d32
--- /dev/null
+++ b/webview-ui/src/components/ui/checkbox.tsx
@@ -0,0 +1,42 @@
+"use client"
+
+import * as React from "react"
+import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
+import { Check } from "lucide-react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const checkboxVariants = cva(
+	"peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+	{
+		variants: {
+			variant: {
+				default:
+					"border-vscode-foreground data-[state=checked]:bg-vscode-foreground data-[state=checked]:text-primary-foreground",
+				description:
+					"border-vscode-descriptionForeground data-[state=checked]:bg-vscode-descriptionForeground data-[state=checked]:text-white",
+			},
+		},
+		defaultVariants: {
+			variant: "default",
+		},
+	},
+)
+
+export interface CheckboxProps
+	extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
+		VariantProps<typeof checkboxVariants> {}
+
+const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(
+	({ className, variant, ...props }, ref) => (
+		<CheckboxPrimitive.Root ref={ref} className={cn(checkboxVariants({ variant, className }))} {...props}>
+			<CheckboxPrimitive.Indicator className={cn("flex items-center justify-center text-current")}>
+				<Check className="h-4 w-4 text-vscode-background" />
+			</CheckboxPrimitive.Indicator>
+		</CheckboxPrimitive.Root>
+	),
+)
+Checkbox.displayName = CheckboxPrimitive.Root.displayName
+
+export { Checkbox, checkboxVariants }
diff --git a/webview-ui/src/components/ui/index.ts b/webview-ui/src/components/ui/index.ts
index 1a2456a72fb..69d9c093e0a 100644
--- a/webview-ui/src/components/ui/index.ts
+++ b/webview-ui/src/components/ui/index.ts
@@ -2,6 +2,7 @@ export * from "./alert-dialog"
 export * from "./autosize-textarea"
 export * from "./badge"
 export * from "./button"
+export * from "./checkbox"
 export * from "./collapsible"
 export * from "./command"
 export * from "./dialog"
diff --git a/webview-ui/src/i18n/locales/ca/history.json b/webview-ui/src/i18n/locales/ca/history.json
index 4add5f9611b..6bf40b3d838 100644
--- a/webview-ui/src/i18n/locales/ca/history.json
+++ b/webview-ui/src/i18n/locales/ca/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Eliminar tasques",
 	"confirmDeleteTasks": "Estàs segur que vols eliminar {{count}} tasques?",
 	"deleteTasksWarning": "Les tasques eliminades no es poden recuperar. Si us plau, assegura't que vols continuar.",
-	"deleteItems": "Eliminar {{count}} elements"
+	"deleteItems": "Eliminar {{count}} elements",
+	"showAllWorkspaces": "Mostrar tasques de tots els espais de treball"
 }
diff --git a/webview-ui/src/i18n/locales/de/history.json b/webview-ui/src/i18n/locales/de/history.json
index b879c3fb127..ed0e53b48e0 100644
--- a/webview-ui/src/i18n/locales/de/history.json
+++ b/webview-ui/src/i18n/locales/de/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Aufgaben löschen",
 	"confirmDeleteTasks": "Bist du sicher, dass du {{count}} Aufgaben löschen möchtest?",
 	"deleteTasksWarning": "Gelöschte Aufgaben können nicht wiederhergestellt werden. Bitte vergewissere dich, dass du fortfahren möchtest.",
-	"deleteItems": "{{count}} Elemente löschen"
+	"deleteItems": "{{count}} Elemente löschen",
+	"showAllWorkspaces": "Aufgaben aus allen Arbeitsbereichen anzeigen"
 }
diff --git a/webview-ui/src/i18n/locales/en/history.json b/webview-ui/src/i18n/locales/en/history.json
index 4c664ca6084..81b93645f08 100644
--- a/webview-ui/src/i18n/locales/en/history.json
+++ b/webview-ui/src/i18n/locales/en/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Delete Tasks",
 	"confirmDeleteTasks": "Are you sure you want to delete {{count}} tasks?",
 	"deleteTasksWarning": "Deleted tasks cannot be recovered. Please make sure you want to proceed.",
-	"deleteItems": "Delete {{count}} Items"
+	"deleteItems": "Delete {{count}} Items",
+	"showAllWorkspaces": "Show tasks from all workspaces"
 }
diff --git a/webview-ui/src/i18n/locales/es/history.json b/webview-ui/src/i18n/locales/es/history.json
index 482f488b50e..7a0d93ce8d9 100644
--- a/webview-ui/src/i18n/locales/es/history.json
+++ b/webview-ui/src/i18n/locales/es/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Eliminar tareas",
 	"confirmDeleteTasks": "¿Estás seguro de que quieres eliminar {{count}} tareas?",
 	"deleteTasksWarning": "Las tareas eliminadas no se pueden recuperar. Por favor, asegúrate de que quieres continuar.",
-	"deleteItems": "Eliminar {{count}} elementos"
+	"deleteItems": "Eliminar {{count}} elementos",
+	"showAllWorkspaces": "Mostrar tareas de todos los espacios de trabajo"
 }
diff --git a/webview-ui/src/i18n/locales/fr/history.json b/webview-ui/src/i18n/locales/fr/history.json
index 15fcd601c68..76b1f8cc3fb 100644
--- a/webview-ui/src/i18n/locales/fr/history.json
+++ b/webview-ui/src/i18n/locales/fr/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Supprimer les tâches",
 	"confirmDeleteTasks": "Êtes-vous sûr de vouloir supprimer {{count}} tâches ?",
 	"deleteTasksWarning": "Les tâches supprimées ne peuvent pas être récupérées. Veuillez confirmer que vous souhaitez continuer.",
-	"deleteItems": "Supprimer {{count}} éléments"
+	"deleteItems": "Supprimer {{count}} éléments",
+	"showAllWorkspaces": "Afficher les tâches de tous les espaces de travail"
 }
diff --git a/webview-ui/src/i18n/locales/hi/history.json b/webview-ui/src/i18n/locales/hi/history.json
index 222e0940e95..0cae1e9cc14 100644
--- a/webview-ui/src/i18n/locales/hi/history.json
+++ b/webview-ui/src/i18n/locales/hi/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "कार्य हटाएं",
 	"confirmDeleteTasks": "क्या आप वाकई {{count}} कार्य हटाना चाहते हैं?",
 	"deleteTasksWarning": "हटाए गए कार्य पुनर्प्राप्त नहीं किए जा सकते। कृपया सुनिश्चित करें कि आप आगे बढ़ना चाहते हैं।",
-	"deleteItems": "{{count}} आइटम हटाएं"
+	"deleteItems": "{{count}} आइटम हटाएं",
+	"showAllWorkspaces": "सभी वर्कस्पेस से कार्य दिखाएं"
 }
diff --git a/webview-ui/src/i18n/locales/it/history.json b/webview-ui/src/i18n/locales/it/history.json
index 604a2136795..11d7e7f82c5 100644
--- a/webview-ui/src/i18n/locales/it/history.json
+++ b/webview-ui/src/i18n/locales/it/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Elimina attività",
 	"confirmDeleteTasks": "Sei sicuro di voler eliminare {{count}} attività?",
 	"deleteTasksWarning": "Le attività eliminate non possono essere recuperate. Assicurati di voler continuare.",
-	"deleteItems": "Elimina {{count}} elementi"
+	"deleteItems": "Elimina {{count}} elementi",
+	"showAllWorkspaces": "Mostra attività da tutti gli spazi di lavoro"
 }
diff --git a/webview-ui/src/i18n/locales/ja/history.json b/webview-ui/src/i18n/locales/ja/history.json
index 70673037802..bf435e4431a 100644
--- a/webview-ui/src/i18n/locales/ja/history.json
+++ b/webview-ui/src/i18n/locales/ja/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "タスクを削除",
 	"confirmDeleteTasks": "{{count}} 件のタスクを削除してもよろしいですか？",
 	"deleteTasksWarning": "削除されたタスクは復元できません。続行してもよろしいですか？",
-	"deleteItems": "{{count}} 項目を削除"
+	"deleteItems": "{{count}} 項目を削除",
+	"showAllWorkspaces": "すべてのワークスペースのタスクを表示"
 }
diff --git a/webview-ui/src/i18n/locales/ko/history.json b/webview-ui/src/i18n/locales/ko/history.json
index 4c7d9478203..dd5042540ad 100644
--- a/webview-ui/src/i18n/locales/ko/history.json
+++ b/webview-ui/src/i18n/locales/ko/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "작업 삭제",
 	"confirmDeleteTasks": "{{count}}개의 작업을 삭제하시겠습니까?",
 	"deleteTasksWarning": "삭제된 작업은 복구할 수 없습니다. 계속 진행하시겠습니까?",
-	"deleteItems": "{{count}}개 항목 삭제"
+	"deleteItems": "{{count}}개 항목 삭제",
+	"showAllWorkspaces": "모든 워크스페이스의 작업 표시"
 }
diff --git a/webview-ui/src/i18n/locales/pl/history.json b/webview-ui/src/i18n/locales/pl/history.json
index f9359eeed82..d66c4b349ab 100644
--- a/webview-ui/src/i18n/locales/pl/history.json
+++ b/webview-ui/src/i18n/locales/pl/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Usuń zadania",
 	"confirmDeleteTasks": "Czy na pewno chcesz usunąć {{count}} zadań?",
 	"deleteTasksWarning": "Usuniętych zadań nie można przywrócić. Upewnij się, że chcesz kontynuować.",
-	"deleteItems": "Usuń {{count}} elementów"
+	"deleteItems": "Usuń {{count}} elementów",
+	"showAllWorkspaces": "Pokaż zadania ze wszystkich przestrzeni roboczych"
 }
diff --git a/webview-ui/src/i18n/locales/pt-BR/history.json b/webview-ui/src/i18n/locales/pt-BR/history.json
index a44f039bb87..2c25fe6e59d 100644
--- a/webview-ui/src/i18n/locales/pt-BR/history.json
+++ b/webview-ui/src/i18n/locales/pt-BR/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Excluir tarefas",
 	"confirmDeleteTasks": "Tem certeza que deseja excluir {{count}} tarefas?",
 	"deleteTasksWarning": "As tarefas excluídas não podem ser recuperadas. Por favor, certifique-se de que deseja prosseguir.",
-	"deleteItems": "Excluir {{count}} itens"
+	"deleteItems": "Excluir {{count}} itens",
+	"showAllWorkspaces": "Mostrar tarefas de todos os espaços de trabalho"
 }
diff --git a/webview-ui/src/i18n/locales/tr/history.json b/webview-ui/src/i18n/locales/tr/history.json
index 07761f1536c..a29107ef76d 100644
--- a/webview-ui/src/i18n/locales/tr/history.json
+++ b/webview-ui/src/i18n/locales/tr/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Görevleri Sil",
 	"confirmDeleteTasks": "{{count}} görevi silmek istediğinizden emin misiniz?",
 	"deleteTasksWarning": "Silinen görevler geri alınamaz. Lütfen devam etmek istediğinizden emin olun.",
-	"deleteItems": "{{count}} Öğeyi Sil"
+	"deleteItems": "{{count}} Öğeyi Sil",
+	"showAllWorkspaces": "Tüm çalışma alanlarından görevleri göster"
 }
diff --git a/webview-ui/src/i18n/locales/vi/history.json b/webview-ui/src/i18n/locales/vi/history.json
index 29ecb390e01..3d3565c2e88 100644
--- a/webview-ui/src/i18n/locales/vi/history.json
+++ b/webview-ui/src/i18n/locales/vi/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "Xóa nhiệm vụ",
 	"confirmDeleteTasks": "Bạn có chắc chắn muốn xóa {{count}} nhiệm vụ không?",
 	"deleteTasksWarning": "Các nhiệm vụ đã xóa không thể khôi phục. Vui lòng chắc chắn bạn muốn tiếp tục.",
-	"deleteItems": "Xóa {{count}} mục"
+	"deleteItems": "Xóa {{count}} mục",
+	"showAllWorkspaces": "Hiển thị nhiệm vụ từ tất cả không gian làm việc"
 }
diff --git a/webview-ui/src/i18n/locales/zh-CN/history.json b/webview-ui/src/i18n/locales/zh-CN/history.json
index 5acb65023ba..68cffd73892 100644
--- a/webview-ui/src/i18n/locales/zh-CN/history.json
+++ b/webview-ui/src/i18n/locales/zh-CN/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "删除任务",
 	"confirmDeleteTasks": "确认删除 {{count}} 项任务？",
 	"deleteTasksWarning": "删除后将无法恢复，请谨慎操作。",
-	"deleteItems": "删除 {{count}} 项"
+	"deleteItems": "删除 {{count}} 项",
+	"showAllWorkspaces": "显示所有工作区的任务"
 }
diff --git a/webview-ui/src/i18n/locales/zh-TW/history.json b/webview-ui/src/i18n/locales/zh-TW/history.json
index 9280c5ba4e8..f3a009022c8 100644
--- a/webview-ui/src/i18n/locales/zh-TW/history.json
+++ b/webview-ui/src/i18n/locales/zh-TW/history.json
@@ -34,5 +34,6 @@
 	"deleteTasks": "刪除工作",
 	"confirmDeleteTasks": "確定要刪除 {{count}} 個工作嗎？",
 	"deleteTasksWarning": "已刪除的工作無法還原。請確認是否要繼續。",
-	"deleteItems": "刪除 {{count}} 個項目"
+	"deleteItems": "刪除 {{count}} 個項目",
+	"showAllWorkspaces": "顯示所有工作區的工作"
 }


Reviews:
user: login: ellipsis-dev[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-12T10:27:38Z
user: login: mrubens
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-13T02:26:45Z
user: login: mrubens
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-13T02:48:15Z
user: login: mrubens
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-13T03:20:07Z

Review comments:
diff_hunk: @@ -3,39 +3,61 @@ import { memo } from "react"
 import { vscode } from "@/utils/vscode"
 import { formatLargeNumber, formatDate } from "@/utils/format"
 import { Button } from "@/components/ui"
+import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
 
-import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
 import { CopyButton } from "./CopyButton"
+import { useTaskSearch } from "./useTaskSearch"
 
 type HistoryPreviewProps = {
 	showHistoryView: () => void
 }
 const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
-	const { taskHistory } = useExtensionState()
+	const { tasks, showAllWorkspaces, setShowAllWorkspaces } = useTaskSearch()
 	const { t } = useAppTranslation()
 
 	return (
 		<div className="flex flex-col gap-3 shrink-0 mx-5">
 			<div className="flex items-center justify-between text-vscode-descriptionForeground">
-				<div className="flex items-center gap-1">
-					<span className="codicon codicon-comment-discussion scale-90 mr-1" />
-					<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+				<div className="flex items-center gap-4">
+					<div className="flex items-center gap-1">
+						<span className="codicon codicon-comment-discussion scale-90 mr-1" />
+						<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+					</div>
+					<div
+						className="flex items-center gap-1 text-xs opacity-80 hover:opacity-100 cursor-pointer"
+						onClick={() => setShowAllWorkspaces(!showAllWorkspaces)}>
path: webview-ui/src/components/history/HistoryPreview.tsx
user: login: ellipsis-dev[bot]
body: Avoid potential double toggling: the parent `div`’s `onClick` and the `VSCodeCheckbox` `onChange` both update `showAllWorkspaces`. Consider removing the `onClick` from the parent to prevent unintended state flips.
```suggestion

```
created_at: 2025-04-12T10:27:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -2,40 +2,71 @@ import { memo } from "react"
 
 import { vscode } from "@/utils/vscode"
 import { formatLargeNumber, formatDate } from "@/utils/format"
-import { Button } from "@/components/ui"
+import { Button, Checkbox } from "@/components/ui"
 
-import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
 import { CopyButton } from "./CopyButton"
+import { useTaskSearch } from "./useTaskSearch"
 
 type HistoryPreviewProps = {
 	showHistoryView: () => void
 }
 const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
-	const { taskHistory } = useExtensionState()
+	const { tasks, showAllWorkspaces, setShowAllWorkspaces } = useTaskSearch()
 	const { t } = useAppTranslation()
 
 	return (
 		<div className="flex flex-col gap-3 shrink-0 mx-5">
 			<div className="flex items-center justify-between text-vscode-descriptionForeground">
-				<div className="flex items-center gap-1">
-					<span className="codicon codicon-comment-discussion scale-90 mr-1" />
-					<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+				<div className="flex items-center gap-4">
+					<div className="flex items-center gap-1">
+						<span className="codicon codicon-comment-discussion scale-90 mr-1" />
+						<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+					</div>
+					<div className="flex items-center gap-1 text-xs opacity-80 hover:opacity-100">
+						<div className="flex items-center space-x-2">
+							<Checkbox
+								id="show-all-workspaces"
+								checked={showAllWorkspaces}
+								onCheckedChange={(checked) => setShowAllWorkspaces(checked === true)}
+								variant="description"
+							/>
+							<label
+								htmlFor="show-all-workspaces"
+								className="text-vscode-descriptionForeground select-none cursor-pointer text-sm">
+								{t("history:showAllWorkspaces")}
+							</label>
+						</div>
+					</div>
 				</div>
-				<Button variant="ghost" size="sm" onClick={() => showHistoryView()} className="uppercase">
+				<Button
+					variant="ghost"
+					size="sm"
+					onClick={() => showHistoryView()}
+					className="uppercase text-xs hover:bg-vscode-toolbar-hoverBackground/50 transition-colors">
 					{t("history:viewAll")}
 				</Button>
 			</div>
-			{taskHistory.slice(0, 3).map((item) => (
+			{tasks.slice(0, 3).map((item) => (
 				<div
 					key={item.id}
 					className="bg-vscode-toolbar-hoverBackground/50 hover:bg-vscode-toolbar-hoverBackground/75 rounded-xs relative overflow-hidden opacity-90 hover:opacity-100 cursor-pointer"
 					onClick={() => vscode.postMessage({ type: "showTaskWithId", text: item.id })}>
 					<div className="flex flex-col gap-2 p-3 pt-1">
 						<div className="flex justify-between items-center">
-							<span className="text-xs font-medium text-vscode-descriptionForeground uppercase">
-								{formatDate(item.ts)}
-							</span>
+							<div className="flex items-center gap-4">
+								<span className="text-xs font-medium text-vscode-descriptionForeground uppercase">
+									{formatDate(item.ts)}
+								</span>
+								{item.workspace && (
+									<span className="text-xs text-vscode-descriptionForeground flex items-center gap-1">
+										<span className="codicon codicon-folder" />
+										<span className="truncate max-w-[300px]">
+											{item.workspace.split("/").slice(-2).join("/") || item.workspace}
path: webview-ui/src/components/history/HistoryPreview.tsx
user: login: mrubens
body: Mind explaining what this does? Does it work on windows?
created_at: 2025-04-13T02:26:45Z
author_association: COLLABORATOR
diff_hunk: @@ -2,40 +2,71 @@ import { memo } from "react"
 
 import { vscode } from "@/utils/vscode"
 import { formatLargeNumber, formatDate } from "@/utils/format"
-import { Button } from "@/components/ui"
+import { Button, Checkbox } from "@/components/ui"
 
-import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
 import { CopyButton } from "./CopyButton"
+import { useTaskSearch } from "./useTaskSearch"
 
 type HistoryPreviewProps = {
 	showHistoryView: () => void
 }
 const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
-	const { taskHistory } = useExtensionState()
+	const { tasks, showAllWorkspaces, setShowAllWorkspaces } = useTaskSearch()
 	const { t } = useAppTranslation()
 
 	return (
 		<div className="flex flex-col gap-3 shrink-0 mx-5">
 			<div className="flex items-center justify-between text-vscode-descriptionForeground">
-				<div className="flex items-center gap-1">
-					<span className="codicon codicon-comment-discussion scale-90 mr-1" />
-					<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+				<div className="flex items-center gap-4">
+					<div className="flex items-center gap-1">
+						<span className="codicon codicon-comment-discussion scale-90 mr-1" />
+						<span className="font-medium text-xs uppercase">{t("history:recentTasks")}</span>
+					</div>
+					<div className="flex items-center gap-1 text-xs opacity-80 hover:opacity-100">
+						<div className="flex items-center space-x-2">
+							<Checkbox
+								id="show-all-workspaces"
+								checked={showAllWorkspaces}
+								onCheckedChange={(checked) => setShowAllWorkspaces(checked === true)}
+								variant="description"
+							/>
+							<label
+								htmlFor="show-all-workspaces"
+								className="text-vscode-descriptionForeground select-none cursor-pointer text-sm">
+								{t("history:showAllWorkspaces")}
+							</label>
+						</div>
+					</div>
 				</div>
-				<Button variant="ghost" size="sm" onClick={() => showHistoryView()} className="uppercase">
+				<Button
+					variant="ghost"
+					size="sm"
+					onClick={() => showHistoryView()}
+					className="uppercase text-xs hover:bg-vscode-toolbar-hoverBackground/50 transition-colors">
 					{t("history:viewAll")}
 				</Button>
 			</div>
-			{taskHistory.slice(0, 3).map((item) => (
+			{tasks.slice(0, 3).map((item) => (
 				<div
 					key={item.id}
 					className="bg-vscode-toolbar-hoverBackground/50 hover:bg-vscode-toolbar-hoverBackground/75 rounded-xs relative overflow-hidden opacity-90 hover:opacity-100 cursor-pointer"
 					onClick={() => vscode.postMessage({ type: "showTaskWithId", text: item.id })}>
 					<div className="flex flex-col gap-2 p-3 pt-1">
 						<div className="flex justify-between items-center">
-							<span className="text-xs font-medium text-vscode-descriptionForeground uppercase">
-								{formatDate(item.ts)}
-							</span>
+							<div className="flex items-center gap-4">
+								<span className="text-xs font-medium text-vscode-descriptionForeground uppercase">
+									{formatDate(item.ts)}
+								</span>
+								{item.workspace && (
+									<span className="text-xs text-vscode-descriptionForeground flex items-center gap-1">
+										<span className="codicon codicon-folder" />
+										<span className="truncate max-w-[300px]">
+											{item.workspace.split("/").slice(-2).join("/") || item.workspace}
path: webview-ui/src/components/history/HistoryPreview.tsx
user: login: mrubens
body: Never mind, I think we can get rid of this. Working on it
created_at: 2025-04-13T02:48:15Z
author_association: COLLABORATOR

PR comments:
user: login: changeset-bot[bot]
created_at: 2025-04-12T10:24:53Z
body: ###  ⚠️  No Changeset found

Latest commit: 52b83b72193788eea39f84efcee677949b2ed35e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/samhvw8/Roo-Cline/new/feat/history-filter-by-workspace?filename=.changeset/real-dryers-laugh.md&value=---%0A%22roo-cline%22%3A%20patch%0A---%0A%0AFilter%20%26%20Search%20Workspace%20Task%20History%0A)


author_association: NONE
user: login: ElemTran
created_at: 2025-04-12T14:10:27Z
body: Can the subtasks of boomerang be filtered?
Reference #2267
author_association: NONE
user: login: ElemTran
created_at: 2025-04-12T14:12:37Z
body: Can the subtasks of boomerang be filtered? Reference #2267

This may involve some code related to new_task.
author_association: NONE
user: login: mrubens
created_at: 2025-04-12T14:23:32Z
body: > Can the subtasks of boomerang be filtered? Reference #2267
> 
> This may involve some code related to new_task.

I’m working on that separately!
author_association: COLLABORATOR
user: login: mrubens
created_at: 2025-04-13T02:35:50Z
body: I like the functionality but I think the UI needs a little love to not be so cramped

![Screenshot 2025-04-12 at 10 34 53 PM](https://github.com/user-attachments/assets/1e742377-5d82-4342-aed5-b41ac4ae66cf)

author_association: COLLABORATOR
user: login: mrubens
created_at: 2025-04-13T02:37:33Z
body: I'd argue that the history preview doesn't need the option to show tasks from other workspaces, so you could just remove it there.

And when we do show it because the user checks the box in the full history view, maybe put it at the very bottom of the element full width in a subtle color and don't show it if it's the current workspace. Make sense?
author_association: COLLABORATOR