diff --git a/.changeset/cold-dingos-run.md b/.changeset/cold-dingos-run.md new file mode 100644 index 00000000..00d17378 --- /dev/null +++ b/.changeset/cold-dingos-run.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Recent task list is now collapsible, allowing users to hide their recent tasks (e.g. when sharing their screen). diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index 226edfb0..c62b46f3 100644 --- a/webview-ui/src/components/history/HistoryPreview.tsx +++ b/webview-ui/src/components/history/HistoryPreview.tsx @@ -1,7 +1,7 @@ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import { useExtensionState } from "@/context/ExtensionStateContext" import { vscode } from "@/utils/vscode" -import { memo } from "react" +import { memo, useState } from "react" import { TaskServiceClient } from "@/services/grpc-client" import { formatLargeNumber } from "@/utils/format" @@ -11,10 +11,16 @@ type HistoryPreviewProps = { const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { const { taskHistory } = useExtensionState() + const [isExpanded, setIsExpanded] = useState(true) + const handleHistorySelect = (id: string) => { TaskServiceClient.showTaskWithId({ value: id }).catch((error) => console.error("Error showing task:", error)) } + const toggleExpanded = () => { + setIsExpanded(!isExpanded) + } + const formatDate = (timestamp: number) => { const date = new Date(timestamp) return date @@ -48,16 +54,31 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { opacity: 1; pointer-events: auto; } + .history-header { + cursor: pointer; + user-select: none; + } + .history-header:hover { + opacity: 0.8; + } `}