Przeglądaj źródła

fix: make Workspace and Favorites history filters independent (#8292)

* fix: make Workspace and Favorites history filters independent

Move Workspace and Favorites filters out of the VSCodeRadioGroup into
their own container. This fixes the regression where selecting one filter
would prevent selecting the other, since VSCodeRadioGroup enforces mutual
exclusivity. The filters now work as independent toggles while maintaining
visual continuity with the sort options above.

Fixes #8289

* add changeset
Saoud Rizwan 2 dni temu
rodzic
commit
99c85710e9

+ 5 - 0
.changeset/fix-history-filters.md

@@ -0,0 +1,5 @@
+---
+"claude-dev": patch
+---
+
+Fix Workspace and Favorites history filters to work independently instead of being mutually exclusive

+ 3 - 0
CLAUDE.md

@@ -14,6 +14,9 @@ This file is the secret sauce for working effectively in this codebase. It captu
 
 **What NOT to add:** Stuff you can figure out from reading a few files, obvious patterns, or standard practices. This file should be high-signal, not comprehensive.
 
+## Miscellaneous
+- This is a VS Code extension—check `package.json` for available scripts before trying to verify builds (e.g., `npm run compile`, not `npm run build`).
+
 ## gRPC/Protobuf Communication
 The extension and webview communicate via gRPC-like protocol over VS Code message passing.
 

+ 6 - 2
webview-ui/src/components/history/HistoryView.tsx

@@ -334,6 +334,8 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
 							<VSCodeRadio disabled={!searchQuery} style={{ opacity: searchQuery ? 1 : 0.5 }} value="mostRelevant">
 								Most Relevant
 							</VSCodeRadio>
+						</VSCodeRadioGroup>
+						<div className="flex flex-wrap" style={{ marginTop: -8 }}>
 							<VSCodeRadio
 								checked={showCurrentWorkspaceOnly}
 								onClick={() => setShowCurrentWorkspaceOnly(!showCurrentWorkspaceOnly)}>
@@ -342,13 +344,15 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
 									Workspace
 								</span>
 							</VSCodeRadio>
-							<VSCodeRadio checked={showFavoritesOnly} onClick={() => setShowFavoritesOnly(!showFavoritesOnly)}>
+							<VSCodeRadio
+								checked={showFavoritesOnly}
+								onClick={() => setShowFavoritesOnly(!showFavoritesOnly)}>
 								<span className="flex items-center gap-[3px]">
 									<span className="codicon codicon-star-full text-(--vscode-button-background)" />
 									Favorites
 								</span>
 							</VSCodeRadio>
-						</VSCodeRadioGroup>
+						</div>
 					</div>
 				</div>
 				<div style={{ flexGrow: 1, overflowY: "auto", margin: 0 }}>