diff --git a/src/workspaces/officerdev/src/apps/ChatHistory/DirPickerModal.tsx b/src/workspaces/officerdev/src/apps/ChatHistory/DirPickerModal.tsx
index bf60bd70..01b92e60 100644
--- a/src/workspaces/officerdev/src/apps/ChatHistory/DirPickerModal.tsx
+++ b/src/workspaces/officerdev/src/apps/ChatHistory/DirPickerModal.tsx
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
-import { Folder, ChevronRight, Loader2, FolderPlus, Check } from 'lucide-react';
+import { Folder, ChevronRight, Loader2, FolderPlus, Check, Eye, EyeOff } from 'lucide-react';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { useFilesAPI, type DirEntry } from '../../hooks/useFilesAPI';
@@ -17,6 +17,10 @@ export const DirPickerModal = ({ open, onClose, onSelect }: DirPickerModalProps)
const [path, setPath] = useState('/'); // root-relative, always starts with '/'
const [creating, setCreating] = useState(false);
const [newName, setNewName] = useState('');
+ // Off by default. The server does not filter these — `readdir` returns everything — so a home
+ // directory opened straight onto `.cache`, `.local`, `.npm` and thirty more before anything you
+ // recognise. They are still reachable, just not in the way by default.
+ const [showHidden, setShowHidden] = useState(false);
const { data, isLoading, refetch } = useQuery({
queryKey: ['dir-picker', path],
@@ -25,9 +29,11 @@ export const DirPickerModal = ({ open, onClose, onSelect }: DirPickerModalProps)
});
const rootDir = data?.rootDir ?? '';
- const dirs = ((data?.entries ?? []) as DirEntry[])
+ const allDirs = ((data?.entries ?? []) as DirEntry[])
.filter((e) => e.type === 'directory')
.sort((a, b) => a.name.localeCompare(b.name));
+ const hiddenCount = allDirs.filter((d) => d.name.startsWith('.')).length;
+ const dirs = showHidden ? allDirs : allDirs.filter((d) => !d.name.startsWith('.'));
const absCurrent = path === '/' ? rootDir : `${rootDir}${path}`;
const segments = path.split('/').filter(Boolean);
@@ -72,7 +78,13 @@ export const DirPickerModal = ({ open, onClose, onSelect }: DirPickerModalProps)