Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Remove the Show all files sidebar toggle (Open Knowledge) (#2034)

Andrew Mikofalvyda669a5923b2
diff --git a/.changeset/remove-show-all-files-toggle.md b/.changeset/remove-show-all-files-toggle.md
new file mode 100644
index 000000000..94ce338dc
--- /dev/null
+++ b/.changeset/remove-show-all-files-toggle.md
@@ -0,0 +1,7 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Remove the "Show all files" sidebar toggle; the file tree now always lists everything on disk except dotfiles.
+
+The sidebar previously had two visibility toggles — "Show hidden files" (dot-prefixed entries) and "Show all files" (files excluded by `.gitignore` / `.okignore`). "Show all files" is gone from every surface: the folder right-click menu, the sidebar empty-space menu, and the desktop View menu. The tree now always shows every file on disk — the previous "Show all files: on" default — so there is no way to scope it back to indexed/linked content. "Show hidden files" remains the single visibility toggle: off by default, revealing dot-prefixed entries when on. VCS and tooling internals (`.git`, `.ok`, `node_modules`) stay hidden in every mode, as before.
diff --git a/docs/content/features/editor.mdx b/docs/content/features/editor.mdx
index 11198cf46..4cc479cf1 100644
--- a/docs/content/features/editor.mdx
+++ b/docs/content/features/editor.mdx
@@ -62,7 +62,7 @@ A folder can describe itself (its own properties, just like a doc's) and offer t
## File sidebar
-The sidebar lists every doc in your project that isn't excluded by `.gitignore` or `.okignore`. Folder rows expand and collapse; file rows open in a tab on click. The toolbar at the top of the sidebar has buttons to create files, create folders, and search.
+The sidebar lists every file in your project on disk, including files excluded by `.gitignore` / `.okignore`, except dot-prefixed entries and tooling internals (`.git/`, `.ok/`, `node_modules/`). Turn on **Show Hidden Files** to reveal the dot-prefixed entries. Folder rows expand and collapse; file rows open in a tab on click. The toolbar at the top of the sidebar has buttons to create files, create folders, and search.
### Right-click context menus
@@ -78,7 +78,6 @@ Right-click anywhere in the sidebar to get a context-aware menu. Three shapes sh
| Open in Terminal | yes (project root) | yes (folder) | yes (parent dir) |
| Copy full path / Copy Path ▸ | yes (full path of project root) | yes (Full / Relative) | yes (Full / Relative) |
| Show Hidden Files | yes | yes | no |
-| Show all files | yes | yes | no |
| Expand all / Collapse all | yes (tree-scoped) | yes (subtree-scoped) | no |
| Rename | no | yes | yes |
| Hide folder / Hide this file | no | yes | yes |
@@ -98,15 +97,15 @@ Right-click on empty space drops the new item at the project root. Right-click o
**Hide this file** on a file row, or **Hide folder** on a folder row, appends a matching pattern to `.okignore`. See [Ignore patterns](/docs/features/ignore-patterns) for the full pattern syntax. The item disappears from the tree, search, and the agent's MCP tools immediately; nothing is deleted on disk.
-### Show Hidden Files / Show all files
+### Show Hidden Files
-Two toggle items on the empty-space and folder menus surface the corresponding file-tree visibility modes. They persist per-project per-machine in `.ok/local/config.yml` under `appearance.sidebar`. The toggles also live in the macOS **View** menu.
+The sidebar always lists every file on disk under the content directory (including files excluded by `.gitignore` / `.okignore`), except synthetic system docs. A single **Show Hidden Files** toggle on the empty-space and folder menus controls whether dot-prefixed entries are shown. It persists per-project per-machine in `.ok/local/config.yml` under `appearance.sidebar`, and also lives in the macOS **View** menu.
| Toggle | Effect |
| --- | --- |
-| **Show Hidden Files** | Stops the client from hiding paths that start with `.` (recovers allowed dotfiles like `brain/.archived/note.md`). Server filters still apply, so `.git/`, `.ok/`, and `node_modules/` stay hidden. |
-| **Show all files** | On by default. Bypasses every filter (client dot-segment drop AND the server's `.gitignore` / `.okignore` / built-in exclusions), so the tree shows literally everything on disk under the content directory, except synthetic system docs. Turn it off to scope the tree to indexed / linked content (`.gitignore` / `.okignore` honored). On very large trees the walk is capped, and the sidebar shows a notice telling you the list is partial so you can use search to find the rest. |
-When both are on, **Show all files** supersedes.
+| **Show Hidden Files** | Off by default. When on, stops the client from hiding paths that start with `.` (recovers allowed dotfiles like `brain/.archived/note.md`). Tooling internals (`.git/`, `.ok/`, `node_modules/`) stay hidden in every mode. |
+
+On very large trees the disk walk is capped per level, and the sidebar shows a notice telling you the list is partial.
### Deleting via Trash
@@ -210,7 +209,6 @@ Before the existing Zoom and Toggle Fullscreen items, the View menu gets:
| **Show / Hide Sidebar** | `Cmd+Option+S` | Toggles the file sidebar (left). Label flips between Show and Hide based on current state, matching Finder. |
| **Show / Hide Document Panel** | `Cmd+Option+B` | Toggles the document panel (right). |
| **Show Hidden Files** | (none) | `appearance.sidebar.showHiddenFiles`; same toggle as the sidebar's right-click menu. |
-| **Show All Files** | (none) | `appearance.sidebar.showAllFiles`. |
| **Expand All** | (none) | Expands every folder in the tree. Hidden when nothing is collapsed. |
| **Collapse All** | (none) | Collapses every folder in the tree. Hidden when nothing is expanded. |
diff --git a/docs/content/features/ignore-patterns.mdx b/docs/content/features/ignore-patterns.mdx
index 04f3d7eb4..e9dabe351 100644
--- a/docs/content/features/ignore-patterns.mdx
+++ b/docs/content/features/ignore-patterns.mdx
@@ -81,12 +81,11 @@ The negation is an Open Knowledge behavior; `git` itself only reads `.gitignore`
## Temporarily surfacing hidden files
-The sidebar's right-click menu and the macOS **View** menu carry two project-local visibility toggles for when you need to see hidden content without permanently editing `.okignore`:
+The sidebar always lists every file on disk under the content directory, including files excluded by `.gitignore` / `.okignore`. Dot-prefixed entries are the exception, so the sidebar's right-click menu and the macOS **View** menu carry a project-local **Show Hidden Files** toggle for when you need to see them without permanently editing `.okignore`:
-- **Show Hidden Files** stops the client from hiding paths that start with `.` (recovers allowed dotfiles like `brain/.archived/note.md`). Server-side `.gitignore` / `.okignore` filters still apply.
-- **Show all files** is on by default: it bypasses every filter (both client and server) and surfaces every file on disk under the content directory. Turn it off to scope the tree to indexed / linked content, with your `.gitignore` / `.okignore` honored.
+- **Show Hidden Files** stops the client from hiding paths that start with `.` (recovers allowed dotfiles like `brain/.archived/note.md`). Tooling internals (`.git/`, `.ok/`, `node_modules/`) stay hidden in every mode.
-Both settings persist per-project per-machine. See [Editor → Show Hidden Files / Show all files](/docs/features/editor#show-hidden-files--show-all-files) for the full UX.
+The setting persists per-project per-machine. See [Editor → Show Hidden Files](/docs/features/editor#show-hidden-files) for the full UX.
## See also
diff --git a/docs/content/reference/configuration.mdx b/docs/content/reference/configuration.mdx
index ae3fd3ee2..f6fdeaaa2 100644
--- a/docs/content/reference/configuration.mdx
+++ b/docs/content/reference/configuration.mdx
@@ -27,8 +27,7 @@ The **Scope** column says which file a setting belongs in: **project** → `.ok/
| --- | --- | --- | --- | --- |
| `content.dir` | string | `"."` | project | Content directory, relative to project root. Defaults to `.` (the project root) even when `.ok/` is scaffolded at the git working-tree root from a sub-folder, so opened folder and content scope align by default. To narrow scope to a sub-folder, uncomment `content.dir` in `.ok/config.yml` post-init. Excluded paths live in `.okignore`; see [Ignore patterns](/docs/features/ignore-patterns). |
| `appearance.theme` | `"light" \| "dark" \| "system"` | (unset) | user | Editor theme. |
-| `appearance.sidebar.showHiddenFiles` | boolean | `false` | project-local | Show files whose path segments start with `.`. Server-side `.gitignore` / `.okignore` filters still apply. Toggled from the sidebar's right-click menu or the macOS **View → Show Hidden Files** item. |
-| `appearance.sidebar.showAllFiles` | boolean | `true` | project-local | On by default: the sidebar surfaces every file on disk under the content directory (synthetic system docs stay hidden), bypassing every ignore filter — both the client dot-segment drop and the server's `.gitignore` / `.okignore` / built-in exclusions. Set to `false` to scope the tree to indexed / linked content. Toggled from the sidebar's right-click menu or the macOS **View → Show All Files** item. |
+| `appearance.sidebar.showHiddenFiles` | boolean | `false` | project-local | Show files whose path segments start with `.`. The sidebar otherwise lists every file on disk under the content directory; tooling internals (`.git/`, `.ok/`, `node_modules/`) stay hidden regardless. Toggled from the sidebar's right-click menu or the macOS **View → Show Hidden Files** item. |
| `autoSync.enabled` | `boolean \| null` | `null` | project-local | Per-machine git auto-sync toggle. `null` means "unanswered"; the editor's onboarding modal triggers on first remote-detected open. |
| `editor.wordWrap` | boolean | `true` | user | Soft-wrap long lines in the source-mode CodeMirror editor. A personal preference, not project-shared. Toggle from the Settings pane. |
| `appearance.preview.autoOpen` | boolean | `true` | user | Whether the agent should open or refresh the Open Knowledge preview when it edits a doc through the MCP. Default `true` lets the agent route the preview by host capability: the host's in-app browser (Cursor preview pane, Codex's built-in browser, Claude Code Desktop) when one exists, the system browser otherwise. Set `false` to keep the agent's hands off your preview window. This is useful when you're already viewing the doc in OK Desktop, a browser tab on a second display, a non-default browser, or any flow where your extensions / accessibility tooling only work in your own browser. The agent then surfaces the URL on request but does not navigate. The change takes effect on the next preview-related tool call. Toggle from **Settings → Preferences → "Open preview when agent edits"**. |
@@ -71,7 +70,7 @@ Most users never set these — the schema settings above cover the common cases.
| Variable | Sets |
| --- | --- |
| `OPEN_KNOWLEDGE_GITHUB_CLIENT_ID` | Override the GitHub OAuth App client ID |
-| `OK_SHOWALL_MAX_ENTRIES` | Max entries the **Show all files** disk walk returns before it stops and marks the list truncated (default `50000`) |
+| `OK_SHOWALL_MAX_ENTRIES` | Max entries the sidebar's disk-walk listing returns per level before it stops and marks the list truncated (default `50000`) |
| `OK_BRIDGE_TOLERANCE_TELEMETRY` | Set to `1` to record each bridge-tolerance-class fire as a JSONL line in `<project>/.ok/local/tolerance-telemetry.jsonl` (opt-in, local-only, off by default; unstable diagnostic for triaging markdown-fidelity incidents). **Records doc paths in cleartext** — independent of `telemetry.localSink`'s `attributeDenylist`, which redacts span/log attributes, not this file. Deliberately outside the `.ok/local/telemetry/` subtree `ok diagnose bundle` harvests, so the unredacted paths never ship in a bug bundle. |
| `OTEL_SDK_DISABLED` | OpenTelemetry OTLP push gate. Inverted sense: set to `false` to **enable** push (it is off by default). |
| `OK_EMBEDDINGS_API_KEY` | Fallback embeddings provider API key for [semantic search](#semantic-search), used when none is stored on disk. Prefer `ok embeddings set-key` (writes `~/.ok/secrets.yml`) for normal use; the env var is convenient for CI / scripted runs. |
diff --git a/packages/app/src/components/FileSidebar.dom.test.tsx b/packages/app/src/components/FileSidebar.dom.test.tsx
index b6ff702f2..723526bd8 100644
--- a/packages/app/src/components/FileSidebar.dom.test.tsx
+++ b/packages/app/src/components/FileSidebar.dom.test.tsx
@@ -71,9 +71,9 @@ let activeTarget: { kind: 'folder'; folderPath: string } | null = {
let folderState: FolderState = { folderCount: 2, expandedCount: 1 };
let hasTemplates = true;
let mergedConfig: {
- appearance?: { sidebar?: { showHiddenFiles?: boolean; showAllFiles?: boolean } };
+ appearance?: { sidebar?: { showHiddenFiles?: boolean } };
} | null = {
- appearance: { sidebar: { showHiddenFiles: false, showAllFiles: true } },
+ appearance: { sidebar: { showHiddenFiles: false } },
};
let sidebarSearchThrows = false;
let projectPatchResult: { ok: true } | { ok: false; error: unknown } = { ok: true };
@@ -380,7 +380,7 @@ describe('FileSidebar runtime behavior', () => {
activeTarget = { kind: 'folder', folderPath: 'docs' };
folderState = { folderCount: 2, expandedCount: 1 };
hasTemplates = true;
- mergedConfig = { appearance: { sidebar: { showHiddenFiles: false, showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: { showHiddenFiles: false } } };
sidebarSearchThrows = false;
projectPatchResult = { ok: true };
openInAgentSubmenuProps = [];
@@ -527,7 +527,6 @@ describe('FileSidebar runtime behavior', () => {
'open-in-agent-empty-space-submenu',
'empty-space-menu-copy-full-path',
'empty-space-menu-show-hidden-files',
- 'empty-space-menu-show-all-files',
'empty-space-menu-expand-all',
'empty-space-menu-collapse-all',
];
@@ -555,13 +554,9 @@ describe('FileSidebar runtime behavior', () => {
expect(toastSuccesses[0]?.[0]).toBe('Copied full path');
fireEvent.click(screen.getByTestId('empty-space-menu-show-hidden-files'));
- fireEvent.click(screen.getByTestId('empty-space-menu-show-all-files'));
expect(projectLocalPatch).toHaveBeenCalledWith({
appearance: { sidebar: { showHiddenFiles: true } },
});
- expect(projectLocalPatch).toHaveBeenCalledWith({
- appearance: { sidebar: { showAllFiles: false } },
- });
expect(openInAgentSubmenuProps.at(-1)?.input).toEqual({
docContext: null,
@@ -592,7 +587,6 @@ describe('FileSidebar runtime behavior', () => {
sidebarVisible: true,
canCollapseAll: true,
canExpandAll: true,
- showAllFiles: true,
showHiddenFiles: false,
}),
),
@@ -606,7 +600,6 @@ describe('FileSidebar runtime behavior', () => {
sidebarVisible: true,
canCollapseAll: true,
canExpandAll: false,
- showAllFiles: true,
showHiddenFiles: false,
}),
),
diff --git a/packages/app/src/components/FileSidebar.menu-action.dom.test.tsx b/packages/app/src/components/FileSidebar.menu-action.dom.test.tsx
index 7000a63fb..69403817b 100644
--- a/packages/app/src/components/FileSidebar.menu-action.dom.test.tsx
+++ b/packages/app/src/components/FileSidebar.menu-action.dom.test.tsx
@@ -192,7 +192,7 @@ mock.module('@/hooks/use-folder-config', () => ({
mock.module('@/lib/config-provider', () => ({
useConfigContext: () => ({
projectLocalBinding: { patch: projectLocalPatch },
- merged: { appearance: { sidebar: { showHiddenFiles: false, showAllFiles: true } } },
+ merged: { appearance: { sidebar: { showHiddenFiles: false } } },
}),
}));
@@ -358,13 +358,9 @@ describe('FileSidebar menu-action runtime routing', () => {
);
menuActionCallback?.('toggle-show-hidden-files' as MenuAction);
- menuActionCallback?.('toggle-show-all-files' as MenuAction);
expect(projectLocalPatch).toHaveBeenCalledWith({
appearance: { sidebar: { showHiddenFiles: true } },
});
- expect(projectLocalPatch).toHaveBeenCalledWith({
- appearance: { sidebar: { showAllFiles: false } },
- });
});
test('pushes View menu state to the desktop bridge with merged visibility and tree gates', async () => {
@@ -375,7 +371,6 @@ describe('FileSidebar menu-action runtime routing', () => {
expect.objectContaining({
canCollapseAll: true,
canExpandAll: true,
- showAllFiles: true,
showHiddenFiles: false,
sidebarVisible: true,
}),
diff --git a/packages/app/src/components/FileSidebar.tsx b/packages/app/src/components/FileSidebar.tsx
index ed09166a0..bac5e025b 100644
--- a/packages/app/src/components/FileSidebar.tsx
+++ b/packages/app/src/components/FileSidebar.tsx
@@ -183,7 +183,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
const emptySpaceHandoffInput = buildProjectScopedHandoffInput({ workspace });
const { projectLocalBinding, merged } = useConfigContext();
const showHiddenFiles = merged?.appearance?.sidebar?.showHiddenFiles ?? false;
- const showAllFiles = merged?.appearance?.sidebar?.showAllFiles ?? true;
const showEmptySpaceExpandAll = hasFolders && !allExpanded;
const showEmptySpaceCollapseAll = hasFolders && !noneExpanded;
const showEmptySpaceTreeStateSection = showEmptySpaceExpandAll || showEmptySpaceCollapseAll;
@@ -233,18 +232,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
});
}
};
- const handleEmptySpaceShowAllFilesToggle = (checked: boolean) => {
- if (projectLocalBinding === null) return;
- const result = projectLocalBinding.patch({
- appearance: { sidebar: { showAllFiles: checked } },
- });
- if (!result.ok) {
- console.warn('[FileSidebar] showAllFiles toggle rejected:', humanFormat(result.error));
- toast.error(t`Could not update sidebar settings`, {
- description: humanFormat(result.error),
- });
- }
- };
const handleEmptySpaceExpandAll = () => {
tree?.expandAll();
};
@@ -256,19 +243,11 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
if (!bridge) return;
bridge.editor.notifyViewMenuStateChanged({
showHiddenFiles,
- showAllFiles,
canExpandAll: showEmptySpaceExpandAll,
canCollapseAll: showEmptySpaceCollapseAll,
sidebarVisible: sidebarState === 'expanded',
});
- }, [
- bridge,
- showHiddenFiles,
- showAllFiles,
- showEmptySpaceExpandAll,
- showEmptySpaceCollapseAll,
- sidebarState,
- ]);
+ }, [bridge, showHiddenFiles, showEmptySpaceExpandAll, showEmptySpaceCollapseAll, sidebarState]);
useEffect(() => {
if (!bridge) return;
@@ -368,22 +347,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
}
return;
}
- case 'toggle-show-all-files': {
- if (projectLocalBinding === null) return;
- const result = projectLocalBinding.patch({
- appearance: { sidebar: { showAllFiles: !showAllFiles } },
- });
- if (!result.ok) {
- console.warn(
- '[FileSidebar] toggle-show-all-files rejected:',
- humanFormat(result.error),
- );
- toast.error(t`Could not update sidebar settings`, {
- description: humanFormat(result.error),
- });
- }
- return;
- }
case 'expand-all-tree': {
tree?.expandAll();
return;
@@ -416,7 +379,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
initialCreateDir,
projectLocalBinding,
showHiddenFiles,
- showAllFiles,
handoffInstallStates,
dispatchHandoff,
toggleSidebar,
@@ -767,14 +729,6 @@ function FileSidebarInner({ onOpenSearch }: FileSidebarProps) {
>
<Trans>Show hidden files</Trans>
</ContextMenuCheckboxItem>
- <ContextMenuCheckboxItem
- checked={showAllFiles}
- onCheckedChange={handleEmptySpaceShowAllFilesToggle}
- disabled={projectLocalBinding === null}
- data-testid="empty-space-menu-show-all-files"
- >
- <Trans>Show all files</Trans>
- </ContextMenuCheckboxItem>
{showEmptySpaceTreeStateSection ? <ContextMenuSeparator /> : null}
{showEmptySpaceExpandAll ? (
<ContextMenuItem
diff --git a/packages/app/src/components/FileTree.duplicate.dom.test.tsx b/packages/app/src/components/FileTree.duplicate.dom.test.tsx
index 0f4fedd20..520ab45e2 100644
--- a/packages/app/src/components/FileTree.duplicate.dom.test.tsx
+++ b/packages/app/src/components/FileTree.duplicate.dom.test.tsx
@@ -206,13 +206,14 @@ let duplicateStatus = 200;
let duplicateGate: Promise<void> | null = null;
let duplicateFetchError: Error | null = null;
let fetchCalls: FetchCall[] = [];
+let extraDocuments: FileEntry[] = [];
let okignoreBindingMock: {
current: () => string;
patch: ReturnType<typeof mock>;
} | null = null;
let projectLocalBindingMock: { patch: ReturnType<typeof mock> } | null = null;
let mergedConfigMock: {
- appearance?: { sidebar?: { showHiddenFiles?: boolean; showAllFiles?: boolean } };
+ appearance?: { sidebar?: { showHiddenFiles?: boolean } };
} | null = null;
function jsonResponse(body: unknown, status = 200): Response {
@@ -244,7 +245,8 @@ function makeFetchMock() {
return mock(async (input: RequestInfo | URL, init?: RequestInit) => {
const url = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;
fetchCalls.push({ url, init });
- if (url.startsWith('/api/documents')) return jsonResponse({ documents: DOCUMENTS });
+ if (url.startsWith('/api/documents'))
+ return jsonResponse({ documents: [...DOCUMENTS, ...extraDocuments] });
if (url === '/api/workspace') {
return jsonResponse({
contentDir: '/tmp/open-knowledge',
@@ -255,6 +257,12 @@ function makeFetchMock() {
if (url === '/api/duplicate-path') {
if (duplicateGate) await duplicateGate;
if (duplicateFetchError) throw duplicateFetchError;
+ const dup = duplicateResponse as { kind?: string; path?: string } | undefined;
+ if (duplicateStatus === 200 && dup?.kind === 'folder' && typeof dup.path === 'string') {
+ extraDocuments = [
+ { kind: 'folder', path: dup.path, size: 0, modified: '2026-05-18T00:00:00.000Z' },
+ ];
+ }
return jsonResponse(duplicateResponse, duplicateStatus);
}
throw new Error(`unexpected fetch: ${url}`);
@@ -434,9 +442,10 @@ describe('FileTree duplicate action runtime behavior', () => {
duplicateGate = null;
duplicateFetchError = null;
fetchCalls = [];
+ extraDocuments = [];
okignoreBindingMock = null;
projectLocalBindingMock = null;
- mergedConfigMock = { appearance: { sidebar: { showAllFiles: false } } };
+ mergedConfigMock = null;
globalThis.fetch = makeFetchMock() as unknown as typeof fetch;
toastSuccessMock.mockClear();
toastErrorMock.mockClear();
@@ -559,7 +568,7 @@ describe('FileTree duplicate action runtime behavior', () => {
expect(closeMenuMock).toHaveBeenCalled();
});
- test('folder context menu exposes runtime order, subtree actions, visibility toggles, and folder hide', async () => {
+ test('folder context menu exposes runtime order, subtree actions, visibility toggle, and folder hide', async () => {
menuItem = { kind: 'directory', path: 'notes/' };
okignoreBindingMock = {
current: () => '',
@@ -567,7 +576,7 @@ describe('FileTree duplicate action runtime behavior', () => {
};
projectLocalBindingMock = { patch: mock(() => ({ ok: true })) };
mergedConfigMock = {
- appearance: { sidebar: { showHiddenFiles: true, showAllFiles: false } },
+ appearance: { sidebar: { showHiddenFiles: true } },
};
const user = userEvent.setup();
renderFileTree();
@@ -580,7 +589,6 @@ describe('FileTree duplicate action runtime behavior', () => {
/Open with AI/,
/Copy path/,
/Show hidden files/,
- /Show all files/,
/Expand all/,
/Duplicate/,
/Rename/,
@@ -589,14 +597,8 @@ describe('FileTree duplicate action runtime behavior', () => {
]);
const showHidden = screen.getByTestId('file-tree-menu-show-hidden-files');
- const showAll = screen.getByTestId('file-tree-menu-show-all-files');
expect(showHidden.getAttribute('aria-checked')).toBe('true');
- expect(showAll.getAttribute('aria-checked')).toBe('false');
- await user.click(showAll);
- expect(projectLocalBindingMock.patch).toHaveBeenCalledWith({
- appearance: { sidebar: { showAllFiles: true } },
- });
await user.click(showHidden);
expect(projectLocalBindingMock.patch).toHaveBeenCalledWith({
appearance: { sidebar: { showHiddenFiles: false } },
diff --git a/packages/app/src/components/FileTree.showall-lazy.dom.test.tsx b/packages/app/src/components/FileTree.showall-lazy.dom.test.tsx
index 96c9adfe3..dc55c3a91 100644
--- a/packages/app/src/components/FileTree.showall-lazy.dom.test.tsx
+++ b/packages/app/src/components/FileTree.showall-lazy.dom.test.tsx
@@ -13,7 +13,7 @@ function PassThrough({ children }: { children?: ReactNode }) {
const SHOW_ALL_DEPTH1_URL = '/api/documents?showAll=true&dir=&depth=1';
-let mergedConfig: unknown = { appearance: { sidebar: { showAllFiles: true } } };
+let mergedConfig: unknown = { appearance: { sidebar: {} } };
let showAllResponseFactory: () => Response = () => jsonResponse({ documents: [] });
let responseByUrl = new Map<string, (init?: RequestInit) => Response | Promise<Response>>();
const fetchUrls: string[] = [];
@@ -258,7 +258,7 @@ describe('FileTree showAll lazy root seed', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () => jsonResponse({ documents: [] });
responseByUrl = new Map();
fetchUrls.length = 0;
@@ -293,7 +293,7 @@ describe('FileTree showAll lazy root seed', () => {
);
});
- test('unresolved config still seeds the showAll root — Show all files is the default', async () => {
+ test('unresolved config still seeds the disk-walk root — it is the only listing mode', async () => {
mergedConfig = null;
showAllResponseFactory = () =>
jsonResponse({
@@ -308,6 +308,26 @@ describe('FileTree showAll lazy root seed', () => {
await waitFor(() => expect([...model.items.keys()].sort()).toEqual(['README.md', 'team/']));
});
+ test('Show hidden files alone gates dot-segment entries in the disk-walk listing', async () => {
+ mergedConfig = { appearance: { sidebar: { showHiddenFiles: false } } };
+ showAllResponseFactory = () =>
+ jsonResponse({
+ documents: [docEntry('README'), docEntry('.secret-note')],
+ truncated: false,
+ });
+ const view = render(<FileTree />);
+
+ await screen.findByTestId('fake-pierre-tree');
+ await waitFor(() => expect(model.items.has('README.md')).toBe(true));
+ expect(model.items.has('.secret-note.md')).toBe(false);
+
+ mergedConfig = { appearance: { sidebar: { showHiddenFiles: true } } };
+ view.rerender(<FileTree />);
+
+ await waitFor(() => expect(model.items.has('.secret-note.md')).toBe(true));
+ expect(model.items.has('README.md')).toBe(true);
+ });
+
test('seeded folders are directory items for both hasChildren values; documents are files', async () => {
showAllResponseFactory = () =>
jsonResponse({
@@ -371,23 +391,13 @@ describe('FileTree showAll lazy root seed', () => {
await screen.findByText('Folder walk failed mid-stream');
expect(screen.queryByText('Could not reach server')).toBeNull();
});
-
- test('Show All OFF keeps the index-backed fetch byte-for-byte unchanged', async () => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: false } } };
- render(<FileTree />);
-
- await screen.findByTestId('fake-pierre-tree');
- expect(fetchUrls).toContain('/api/documents');
- expect(fetchUrls.some((u) => u.includes('showAll') || u.includes('depth='))).toBe(false);
- expect([...model.items.keys()]).toEqual(['notes/a.md']);
- });
});
describe('FileTree showAll lazy folder expansion', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () =>
jsonResponse({
documents: [folderEntry('team', true), folderEntry('empty', false), docEntry('README')],
@@ -595,7 +605,7 @@ describe('FileTree showAll scoped refresh', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () =>
jsonResponse({
documents: [folderEntry('team', true), folderEntry('empty', false), docEntry('README')],
@@ -689,29 +699,6 @@ describe('FileTree showAll scoped refresh', () => {
expect(model.getItem('team/')?.isExpanded()).toBe(true);
});
- test('toggling Show All OFF returns to the index listing; back ON re-seeds the lazy root (QA-007)', async () => {
- const view = await renderTreeWithTeamLoaded();
-
- mergedConfig = { appearance: { sidebar: { showAllFiles: false } } };
- const beforeOff = fetchUrls.length;
- view.rerender(<FileTree />);
-
- await waitFor(() => expect([...model.items.keys()]).toEqual(['notes/a.md']));
- expect(fetchUrls.slice(beforeOff).filter((url) => url.startsWith('/api/documents'))).toEqual([
- '/api/documents',
- ]);
-
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
- const beforeOn = fetchUrls.length;
- view.rerender(<FileTree />);
-
- await waitFor(() => expect(model.items.has('team/')).toBe(true));
- expect([...model.items.keys()].sort()).toEqual(['README.md', 'empty/', 'team/']);
- expect(fetchUrls.slice(beforeOn).filter((url) => url.startsWith('/api/documents'))).toEqual([
- SHOW_ALL_DEPTH1_URL,
- ]);
- });
-
test('a burst of files signals coalesces into one trailing revalidation pass', async () => {
await renderTreeWithTeamLoaded();
responseByUrl.set(
@@ -795,7 +782,7 @@ describe('FileTree relaunch-aware reconnect (desktop auto-update)', () => {
let detachRelaunch: () => void;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () =>
jsonResponse({ documents: [docEntry('README')], truncated: false });
responseByUrl = new Map();
diff --git a/packages/app/src/components/FileTree.showall-lifecycle.dom.test.tsx b/packages/app/src/components/FileTree.showall-lifecycle.dom.test.tsx
index 236fed1d6..54eca62f5 100644
--- a/packages/app/src/components/FileTree.showall-lifecycle.dom.test.tsx
+++ b/packages/app/src/components/FileTree.showall-lifecycle.dom.test.tsx
@@ -13,7 +13,7 @@ function PassThrough({ children }: { children?: ReactNode }) {
const SHOW_ALL_DEPTH1_URL = '/api/documents?showAll=true&dir=&depth=1';
-let mergedConfig: unknown = { appearance: { sidebar: { showAllFiles: true } } };
+let mergedConfig: unknown = { appearance: { sidebar: {} } };
let showAllResponseFactory: () => Response = () => jsonResponse({ documents: [] });
let responseByUrl = new Map<string, (init?: RequestInit) => Response | Promise<Response>>();
const fetchUrls: string[] = [];
@@ -256,7 +256,7 @@ describe('FileTree showAll notice lifecycle', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () =>
jsonResponse({
documents: [folderEntry('capped', true), folderEntry('uncapped', true), docEntry('README')],
@@ -371,7 +371,7 @@ describe('FileTree showAll interrupted NDJSON seed', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () => jsonResponse({ documents: [] });
responseByUrl = new Map();
fetchUrls.length = 0;
@@ -459,7 +459,7 @@ describe('FileTree showAll deep-link progressive drill-down', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllResponseFactory = () =>
jsonResponse({ documents: [folderEntry('a', true)], truncated: false });
responseByUrl = new Map();
diff --git a/packages/app/src/components/FileTree.showall-truncation.dom.test.tsx b/packages/app/src/components/FileTree.showall-truncation.dom.test.tsx
index ce67023dd..fb0284820 100644
--- a/packages/app/src/components/FileTree.showall-truncation.dom.test.tsx
+++ b/packages/app/src/components/FileTree.showall-truncation.dom.test.tsx
@@ -12,7 +12,7 @@ function PassThrough({ children }: { children?: ReactNode }) {
const SHOW_ALL_DEPTH1_URL = '/api/documents?showAll=true&dir=&depth=1';
-let mergedConfig: unknown = { appearance: { sidebar: { showAllFiles: true } } };
+let mergedConfig: unknown = { appearance: { sidebar: {} } };
let showAllBody: unknown = { documents: [], truncated: true };
let showAllStatus = 200;
const fetchUrls: string[] = [];
@@ -221,7 +221,7 @@ describe('FileTree showAll truncation notice', () => {
let consoleWarnSpy: ReturnType<typeof spyOn>;
beforeEach(() => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: true } } };
+ mergedConfig = { appearance: { sidebar: {} } };
showAllBody = { documents: [], truncated: true };
showAllStatus = 200;
fetchUrls.length = 0;
@@ -286,17 +286,6 @@ describe('FileTree showAll truncation notice', () => {
expect(screen.queryByRole('status')).toBeNull();
});
- test('does NOT render the notice when Show All Files is off, even if a stray truncated flag is present (QA-002 negative)', async () => {
- mergedConfig = { appearance: { sidebar: { showAllFiles: false } } };
- showAllBody = { documents: [docEntry('a')], truncated: true };
- render(<FileTree />);
-
- await screen.findByTestId('fake-pierre-tree');
- expect(fetchUrls).toContain('/api/documents');
- expect(fetchUrls.some((u) => u.includes('showAll=true'))).toBe(false);
- expect(screen.queryByRole('status')).toBeNull();
- });
-
test('the truncation notice is a polite, non-interactive live region (QA-004 a11y)', async () => {
showAllBody = { documents: [docEntry('a'), docEntry('b')], truncated: true };
render(<FileTree />);
diff --git a/packages/app/src/components/FileTree.superseded-refresh.dom.test.tsx b/packages/app/src/components/FileTree.superseded-refresh.dom.test.tsx
index b95616f31..c8437e842 100644
--- a/packages/app/src/components/FileTree.superseded-refresh.dom.test.tsx
+++ b/packages/app/src/components/FileTree.superseded-refresh.dom.test.tsx
@@ -6,7 +6,7 @@ function PassThrough({ children }: { children?: ReactNode }) {
return <>{children}</>;
}
-let mergedConfig: unknown = { appearance: { sidebar: { showAllFiles: false } } };
+let mergedConfig: unknown = null;
const documentsFetchPlan: Array<
(signal: AbortSignal | null | undefined) => Response | Promise<Response>
> = [];
@@ -243,7 +243,7 @@ describe('FileTree superseded documents refresh', () => {
beforeEach(() => {
model = new StubModel();
- mergedConfig = { appearance: { sidebar: { showAllFiles: false } } };
+ mergedConfig = null;
documentsFetchPlan.length = 0;
documentsCallCount = 0;
resolveTrailingDocuments = null;
diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsx
index ffe616f83..dae34cc1a 100644
--- a/packages/app/src/components/FileTree.tsx
+++ b/packages/app/src/components/FileTree.tsx
@@ -200,7 +200,7 @@ import {
import { OK_SIDEBAR_DRAG_MIME, serializeSidebarDragPayload } from '@/lib/sidebar-drag';
import { cn } from '@/lib/utils';
import { joinWorkspacePath } from '@/lib/workspace-paths';
-import { mergeAndPruneRecentLocalAdds, spliceLazyFolderChildren } from './file-tree-merge';
+import { spliceLazyFolderChildren } from './file-tree-merge';
import { OpenInAgentContextSubmenu } from './handoff/OpenInAgentContextSubmenu';
import {
buildFolderHandoffInput,
@@ -484,12 +484,12 @@ interface FileTreeMenuProps {
};
model: PierreFileTreeModel;
okignoreBinding: OkignoreBinding | null;
- /** Project-local config binding for the `Show hidden files` / `Show all files`
- * folder-menu toggles. Patched directly here (mirrors the okignore Hide
- * flow); `null` during cold-start disables the toggle items. */
+ /** Project-local config binding for the `Show hidden files` folder-menu
+ * toggle. Patched directly here (mirrors the okignore Hide flow); `null`
+ * during cold-start disables the toggle item. */
projectLocalBinding: ConfigBinding | null;
- /** Layered config view, source for the two toggle check-states
- * (`appearance.sidebar.{showHiddenFiles,showAllFiles}`). */
+ /** Layered config view, source for the toggle check-state
+ * (`appearance.sidebar.showHiddenFiles`). */
mergedConfig: Config | null;
onStartCreating: (kind: 'file' | 'folder', parentDir: string) => void;
/** Inline create-from-template for the given parent dir + template name —
@@ -625,7 +625,6 @@ function FileTreeMenu({
const canHide = okignoreTarget !== null && okignoreBinding !== null;
const hideLabel = isFolder ? t`Hide folder` : t`Hide this file`;
const showHiddenFiles = mergedConfig?.appearance?.sidebar?.showHiddenFiles ?? false;
- const showAllFiles = mergedConfig?.appearance?.sidebar?.showAllFiles ?? true;
const canToggleVisibility = projectLocalBinding !== null;
const folderConfig = useFolderConfig(isFolder ? treeDirectoryPathToFolderPath(item.path) : null);
const folderHasTemplates =
@@ -666,19 +665,6 @@ function FileTreeMenu({
});
}
};
- const handleShowAllFilesToggle = (checked: boolean) => {
- if (projectLocalBinding === null) return;
- const result = projectLocalBinding.patch({
- appearance: { sidebar: { showAllFiles: checked } },
- });
- if (!result.ok) {
- console.warn('[FileTree] showAllFiles toggle rejected:', humanFormat(result.error));
- toast.error(t`Could not update sidebar settings`, {
- description: humanFormat(result.error),
- });
- }
- };
-
let subtreeFolderCount = 0;
let subtreeExpandedCount = 0;
if (isFolder) {
@@ -796,9 +782,8 @@ function FileTreeMenu({
</DropdownMenuSubContent>
</DropdownMenuSub>
<DropdownMenuSeparator />
- {/* These toggles only flip the persisted config; the filter
- pipeline (client dot-segment bypass / server showAll) reads it
- from a separate seam. */}
+ {/* Flips the persisted `showHiddenFiles` config; the client-side
+ dot-segment filter reads it from a separate seam. */}
<DropdownMenuCheckboxItem
checked={showHiddenFiles}
onCheckedChange={handleShowHiddenFilesToggle}
@@ -807,14 +792,6 @@ function FileTreeMenu({
>
<Trans>Show hidden files</Trans>
</DropdownMenuCheckboxItem>
- <DropdownMenuCheckboxItem
- checked={showAllFiles}
- onCheckedChange={handleShowAllFilesToggle}
- disabled={!canToggleVisibility}
- data-testid="file-tree-menu-show-all-files"
- >
- <Trans>Show all files</Trans>
- </DropdownMenuCheckboxItem>
{/* Subtree-scoped Expand/Collapse, smart-hidden. The divider only
renders when the section is non-empty so a fully-expanded or
fully-collapsed subtree collapses to a single divider before
@@ -1210,7 +1187,6 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
const detectLazyFolderExpansionsRef = useRef<() => void>(() => {});
const revalidateExpandedLazyDirsRef = useRef<() => void>(() => {});
const showHiddenFilesRef = useRef<boolean>(false);
- const showAllFilesRef = useRef<boolean>(true);
const refreshDocsScheduleRef = useRef<(() => void) | null>(null);
const fileTreeHostRef = useRef<HTMLDivElement | null>(null);
const handleSelectionChangeRef = useRef<(selectedPaths: readonly string[]) => void>(() => {});
@@ -1250,7 +1226,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
}
const isFirstRelaunchEffectRunRef = useRef(true);
- // biome-ignore lint/correctness/useExhaustiveDependencies: relaunchInFlight is a transition trigger, not a read — the body calls the hoisted scheduler ref only. Sibling pattern at the showHiddenFiles / showAllFiles flip effects below.
+ // biome-ignore lint/correctness/useExhaustiveDependencies: relaunchInFlight is a transition trigger, not a read — the body calls the hoisted scheduler ref only. Sibling pattern at the showHiddenFiles flip effect below.
useEffect(() => {
if (isFirstRelaunchEffectRunRef.current) {
isFirstRelaunchEffectRunRef.current = false;
@@ -1390,7 +1366,6 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
};
const { okignoreBinding, projectLocalBinding, merged } = useConfigContext();
const showHiddenFiles = merged?.appearance?.sidebar?.showHiddenFiles ?? false;
- const showAllFiles = merged?.appearance?.sidebar?.showAllFiles ?? true;
const isAvailable = () => busyPathRef.current === null;
@@ -1540,7 +1515,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
reportServerReachableError(result.title);
return;
}
- const bypassClientDotDrop = showHiddenFilesRef.current || showAllFilesRef.current;
+ const bypassClientDotDrop = showHiddenFilesRef.current;
const children = filterVisibleEntries(result.entries, bypassClientDotDrop);
lazyLoadedDirTreePathsRef.current.add(folderTreePath);
setDocuments((prev) =>
@@ -1555,7 +1530,6 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
const expanded = collectExpandedFolderTreePaths();
const previous = prevExpandedFolderTreePathsRef.current;
prevExpandedFolderTreePathsRef.current = expanded;
- if (!showAllFilesRef.current) return;
for (const folderTreePath of expanded) {
if (previous.has(folderTreePath)) continue;
if (lazyLoadedDirTreePathsRef.current.has(folderTreePath)) continue;
@@ -1841,16 +1815,14 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
lazyChildFetchControllersRef.current.clear();
lazyLoadedDirTreePathsRef.current.clear();
try {
- const showAll = showAllFilesRef.current;
- const url = showAll ? '/api/documents?showAll=true&dir=&depth=1' : '/api/documents';
- const res = await fetch(url, {
+ const res = await fetch('/api/documents?showAll=true&dir=&depth=1', {
signal: controller.signal,
- headers: showAll ? SHOW_ALL_NDJSON_ACCEPT : undefined,
+ headers: SHOW_ALL_NDJSON_ACCEPT,
});
- if (showAll && isNdjsonResponse(res)) {
+ if (isNdjsonResponse(res)) {
const { entries, truncated } = await consumeShowAllStream(res);
if (!active) return;
- const bypassClientDotDrop = showHiddenFilesRef.current || showAll;
+ const bypassClientDotDrop = showHiddenFilesRef.current;
const serverEntries = filterVisibleEntries(toFileEntries(entries), bypassClientDotDrop);
setDocuments((prev) =>
spliceLazyFolderChildren(prev, '', serverEntries, recentLocalAddsRef.current),
@@ -1871,29 +1843,20 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
reportServerReachableError(t`Documents response did not match expected shape.`);
setTruncatedShownCount(null);
} else {
- const bypassClientDotDrop = showHiddenFilesRef.current || showAll;
+ const bypassClientDotDrop = showHiddenFilesRef.current;
const serverEntries = filterVisibleEntries(
toFileEntries(success.data.documents),
bypassClientDotDrop,
);
- if (showAll) {
- setDocuments((prev) =>
- spliceLazyFolderChildren(prev, '', serverEntries, recentLocalAddsRef.current),
- );
- } else {
- const merged = mergeAndPruneRecentLocalAdds(
- serverEntries,
- documentsRef.current,
- recentLocalAddsRef.current,
- );
- setDocuments(merged);
- }
+ setDocuments((prev) =>
+ spliceLazyFolderChildren(prev, '', serverEntries, recentLocalAddsRef.current),
+ );
setError(null);
noteConnectivityRecovered();
setTruncatedShownCount(
- showAll && success.data.truncated === true ? success.data.documents.length : null,
+ success.data.truncated === true ? success.data.documents.length : null,
);
- if (showAll) revalidateExpandedLazyDirsRef.current();
+ revalidateExpandedLazyDirsRef.current();
}
}
}
@@ -1950,16 +1913,6 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
refreshDocsScheduleRef.current?.();
}, [showHiddenFiles]);
- const isFirstShowAllFilesEffectRunRef = useRef(true);
- // biome-ignore lint/correctness/useExhaustiveDependencies: showAllFiles is a flip-detection trigger, not a read — the effect body reads refs only. Sibling pattern at the treePathsSignature reset effect above.
- useEffect(() => {
- if (isFirstShowAllFilesEffectRunRef.current) {
- isFirstShowAllFilesEffectRunRef.current = false;
- return;
- }
- refreshDocsScheduleRef.current?.();
- }, [showAllFiles]);
-
useEffect(() => {
let active = true;
fetch('/api/workspace')
@@ -2676,7 +2629,6 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
assetTreePathsRef.current = assetTreePaths;
busyPathRef.current = busyPath;
showHiddenFilesRef.current = showHiddenFiles;
- showAllFilesRef.current = showAllFiles;
treePathsRef.current = treePaths;
folderTreePathsRef.current = folderTreePaths;
activeAncestorTreePathsRef.current = activeAncestorTreePaths;
@@ -3429,8 +3381,8 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {
if (truncatedShownCount !== null) {
const formattedCount = new Intl.NumberFormat(i18n.locale).format(truncatedShownCount);
truncationNotice = plural(truncatedShownCount, {
- one: 'Showing the first item in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.',
- other: `Showing the first ${formattedCount} items in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.`,
+ one: 'Showing the first item in one folder — the rest of that folder is hidden.',
+ other: `Showing the first ${formattedCount} items in one folder — the rest of that folder is hidden.`,
});
}
return (
diff --git a/packages/app/src/lib/desktop-bridge-types.ts b/packages/app/src/lib/desktop-bridge-types.ts
index b39f4766d..f3dbc50ba 100644
--- a/packages/app/src/lib/desktop-bridge-types.ts
+++ b/packages/app/src/lib/desktop-bridge-types.ts
@@ -139,7 +139,6 @@ type OkMenuAction =
| 'copy-full-path'
| 'copy-relative-path'
| 'toggle-show-hidden-files'
- | 'toggle-show-all-files'
| 'expand-all-tree'
| 'collapse-all-tree'
| 'toggle-doc-panel'
@@ -385,7 +384,6 @@ type OkEditorActiveTargetSnapshot =
interface OkEditorViewMenuStateSnapshot {
readonly showHiddenFiles: boolean;
- readonly showAllFiles: boolean;
readonly canExpandAll: boolean;
readonly canCollapseAll: boolean;
readonly sidebarVisible: boolean;
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index e303b22e1..53bb30d68 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -722,6 +722,20 @@
"LtI9AS": ["Owner"],
"LtSYdi": ["Reveal in Finder"],
"LtVw4J": ["Claude CLI, ", ["hint"]],
+ "LuoJWu": [
+ [
+ "truncatedShownCount",
+ "plural",
+ {
+ "one": ["Showing the first item in one folder — the rest of that folder is hidden."],
+ "other": [
+ "Showing the first ",
+ ["formattedCount"],
+ " items in one folder — the rest of that folder is hidden."
+ ]
+ }
+ ]
+ ],
"M1OfV9": ["Next source diagnostic"],
"M3ytY_": [
"This looks like a drive root (e.g., C:\\). Scaffolding here will scan an entire drive."
@@ -1375,7 +1389,6 @@
"hynz2K": ["Download started"],
"i1flq_": ["Wiki link suggestions"],
"i3f2kh": ["No matching commands."],
- "i8dKs-": ["Show all files"],
"i92eAT": ["We'll create a repository and start syncing — no terminal needed."],
"i9OyGp": ["Undo or redo"],
"i9toLO": ["Agent configuration file"],
@@ -1506,22 +1519,6 @@
"Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."
],
"mSJ3Rn": ["Computing scaffold plan"],
- "mSpqzP": [
- [
- "truncatedShownCount",
- "plural",
- {
- "one": [
- "Showing the first item in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view."
- ],
- "other": [
- "Showing the first ",
- ["formattedCount"],
- " items in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view."
- ]
- }
- ]
- ],
"mU3j1b": ["Remove item ", ["0"]],
"mWVJRX": ["Collapsible section with a clickable summary."],
"mYGY3B": ["Date"],
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index f0b6ca975..1e499be18 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -330,8 +330,8 @@ msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {token} other {tokens}}"
#: src/components/FileTree.tsx
-msgid "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.}}"
-msgstr "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.}}"
+msgid "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden.}}"
+msgstr "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden.}}"
#: src/components/FileTree.tsx
msgid "{uploadedCount, plural, one {Uploaded one file} other {Uploaded {uploadedCount} files}}"
@@ -5136,11 +5136,6 @@ msgstr "Show {hidden} more"
msgid "Show advanced"
msgstr "Show advanced"
-#: src/components/FileSidebar.tsx
-#: src/components/FileTree.tsx
-msgid "Show all files"
-msgstr "Show all files"
-
#: src/components/GraphPanel.tsx
msgid "Show external URL nodes"
msgstr "Show external URL nodes"
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index ca0170788..314079630 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -722,6 +722,20 @@
"LtI9AS": ["Ōŵńēŕ"],
"LtSYdi": ["Ŕēvēàĺ ĩń Ƒĩńďēŕ"],
"LtVw4J": ["Ćĺàũďē ĆĹĨ, ", ["hint"]],
+ "LuoJWu": [
+ [
+ "truncatedShownCount",
+ "plural",
+ {
+ "one": ["Śĥōŵĩńĝ ţĥē ƒĩŕśţ ĩţēḿ ĩń ōńē ƒōĺďēŕ — ţĥē ŕēśţ ōƒ ţĥàţ ƒōĺďēŕ ĩś ĥĩďďēń."],
+ "other": [
+ "Śĥōŵĩńĝ ţĥē ƒĩŕśţ ",
+ ["formattedCount"],
+ " ĩţēḿś ĩń ōńē ƒōĺďēŕ — ţĥē ŕēśţ ōƒ ţĥàţ ƒōĺďēŕ ĩś ĥĩďďēń."
+ ]
+ }
+ ]
+ ],
"M1OfV9": ["Ńēxţ śōũŕćē ďĩàĝńōśţĩć"],
"M3ytY_": [
"Ţĥĩś ĺōōķś ĺĩķē à ďŕĩvē ŕōōţ (ē.ĝ., Ć:\\). Śćàƒƒōĺďĩńĝ ĥēŕē ŵĩĺĺ śćàń àń ēńţĩŕē ďŕĩvē."
@@ -1375,7 +1389,6 @@
"hynz2K": ["Ďōŵńĺōàď śţàŕţēď"],
"i1flq_": ["Ŵĩķĩ ĺĩńķ śũĝĝēśţĩōńś"],
"i3f2kh": ["Ńō ḿàţćĥĩńĝ ćōḿḿàńďś."],
- "i8dKs-": ["Śĥōŵ àĺĺ ƒĩĺēś"],
"i92eAT": ["Ŵē'ĺĺ ćŕēàţē à ŕēƥōśĩţōŕŷ àńď śţàŕţ śŷńćĩńĝ — ńō ţēŕḿĩńàĺ ńēēďēď."],
"i9OyGp": ["Ũńďō ōŕ ŕēďō"],
"i9toLO": ["Àĝēńţ ćōńƒĩĝũŕàţĩōń ƒĩĺē"],
@@ -1506,22 +1519,6 @@
"Ōŕĝàńĩźē ḿŷ ēxĩśţĩńĝ śƥēćś ĩńţō à ĺĩńķēď ĩńďēx ĝŕōũƥēď ƀŷ àŕēà, àńď ƒĺàĝ àńŷ ţĥàţ ĥàvē ďŕĩƒţēď ōũţ ōƒ śŷńć ŵĩţĥ ţĥē ćũŕŕēńţ ćōďē."
],
"mSJ3Rn": ["Ćōḿƥũţĩńĝ śćàƒƒōĺď ƥĺàń"],
- "mSpqzP": [
- [
- "truncatedShownCount",
- "plural",
- {
- "one": [
- "Śĥōŵĩńĝ ţĥē ƒĩŕśţ ĩţēḿ ĩń ōńē ƒōĺďēŕ — ţĥē ŕēśţ ōƒ ţĥàţ ƒōĺďēŕ ĩś ĥĩďďēń. Ţũŕń ōƒƒ Śĥōŵ àĺĺ ƒĩĺēś ƒōŕ ţĥē ƒĩĺţēŕēď vĩēŵ."
- ],
- "other": [
- "Śĥōŵĩńĝ ţĥē ƒĩŕśţ ",
- ["formattedCount"],
- " ĩţēḿś ĩń ōńē ƒōĺďēŕ — ţĥē ŕēśţ ōƒ ţĥàţ ƒōĺďēŕ ĩś ĥĩďďēń. Ţũŕń ōƒƒ Śĥōŵ àĺĺ ƒĩĺēś ƒōŕ ţĥē ƒĩĺţēŕēď vĩēŵ."
- ]
- }
- ]
- ],
"mU3j1b": ["Ŕēḿōvē ĩţēḿ ", ["0"]],
"mWVJRX": ["Ćōĺĺàƥśĩƀĺē śēćţĩōń ŵĩţĥ à ćĺĩćķàƀĺē śũḿḿàŕŷ."],
"mYGY3B": ["Ďàţē"],
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 9bdcdaa3c..77a6d6553 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -330,7 +330,7 @@ msgid "{tokens, plural, one {token} other {tokens}}"
msgstr ""
#: src/components/FileTree.tsx
-msgid "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden. Turn off Show all files for the filtered view.}}"
+msgid "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden.}}"
msgstr ""
#: src/components/FileTree.tsx
@@ -5131,11 +5131,6 @@ msgstr ""
msgid "Show advanced"
msgstr ""
-#: src/components/FileSidebar.tsx
-#: src/components/FileTree.tsx
-msgid "Show all files"
-msgstr ""
-
#: src/components/GraphPanel.tsx
msgid "Show external URL nodes"
msgstr ""
diff --git a/packages/app/tests/stress/showall-lazy-tree.e2e.ts b/packages/app/tests/stress/showall-lazy-tree.e2e.ts
index b8c33c3da..a3cd637ad 100644
--- a/packages/app/tests/stress/showall-lazy-tree.e2e.ts
+++ b/packages/app/tests/stress/showall-lazy-tree.e2e.ts
@@ -44,23 +44,6 @@ async function collapseFolder(page: Page, folderName: string): Promise<void> {
await expect(row).toHaveAttribute('aria-expanded', 'false');
}
-async function setShowAllFiles(page: Page, enabled: boolean): Promise<void> {
- const anchor = folderRow(page, 'sidebar-folder');
- await expect(anchor).toBeVisible({ timeout: 15_000 });
- await anchor.click({ button: 'right' });
- const toggle = page.getByTestId('file-tree-menu-show-all-files');
- await expect(toggle).toBeVisible({ timeout: 5_000 });
- await expect(toggle).not.toHaveAttribute('aria-disabled', 'true', { timeout: 10_000 });
- const alreadyEnabled = (await toggle.getAttribute('aria-checked')) === 'true';
- if (alreadyEnabled === enabled) {
- await page.keyboard.press('Escape');
- await expect(toggle).toBeHidden();
- return;
- }
- await toggle.click();
- await expect(toggle).toBeHidden();
-}
-
test('Show All seeds the root lazily and loads folder children on expand', async ({
page,
api,
@@ -70,7 +53,7 @@ test('Show All seeds the root lazily and loads folder children on expand', async
const rootDoc = `showall-root-${stamp}`;
const folder = `showall-dir-${stamp}`;
const nested = `nested-${stamp}`;
- const hiddenDir = `.showall-ghost-${stamp}`;
+ const diskOnlyDir = `showall-disk-${stamp}`;
await api.seedDocs([
{ name: rootDoc, markdown: '# root\n' },
@@ -79,8 +62,8 @@ test('Show All seeds the root lazily and loads folder children on expand', async
]);
mkdirSync(join(workerServer.contentDir, folder, nested), { recursive: true });
writeFileSync(join(workerServer.contentDir, folder, nested, 'deep-doc.md'), '# deep\n', 'utf-8');
- mkdirSync(join(workerServer.contentDir, hiddenDir), { recursive: true });
- writeFileSync(join(workerServer.contentDir, hiddenDir, 'ghost.md'), '# ghost\n', 'utf-8');
+ mkdirSync(join(workerServer.contentDir, diskOnlyDir), { recursive: true });
+ writeFileSync(join(workerServer.contentDir, diskOnlyDir, 'ghost.md'), '# ghost\n', 'utf-8');
const showAllListingUrls: string[] = [];
page.on('request', (request) => {
@@ -93,14 +76,7 @@ test('Show All seeds the root lazily and loads folder children on expand', async
await page.goto('/');
await page.waitForLoadState('domcontentloaded');
- await setShowAllFiles(page, false);
- await expect(fileRow(page, `${rootDoc}.md`)).toBeVisible({ timeout: 15_000 });
- await expect(folderRow(page, folder)).toBeVisible();
- await expect(folderRow(page, hiddenDir)).toBeHidden();
-
- await setShowAllFiles(page, true);
-
- await expect(folderRow(page, hiddenDir)).toBeVisible({ timeout: 15_000 });
+ await expect(folderRow(page, diskOnlyDir)).toBeVisible({ timeout: 15_000 });
await expect(fileRow(page, `${rootDoc}.md`)).toBeVisible();
await expect(fileRow(page, 'child-a.md')).toBeHidden();
expect(showAllListingUrls.some((url) => url.includes(`dir=${encodeURIComponent(folder)}`))).toBe(
@@ -160,7 +136,6 @@ test('truncation banner appears for an overflowing level while every root entry
await page.goto('/');
await page.waitForLoadState('domcontentloaded');
- await setShowAllFiles(page, true);
const banner = page.getByRole('status').filter({ hasText: 'Showing the first' });
diff --git a/packages/core/src/config/field-registry.test.ts b/packages/core/src/config/field-registry.test.ts
index fcd04f15f..ae7cf8b1b 100644
--- a/packages/core/src/config/field-registry.test.ts
+++ b/packages/core/src/config/field-registry.test.ts
@@ -160,7 +160,6 @@ describe('ConfigSchema coverage (NR3 — every leaf has fieldRegistry metadata)'
.map((l) => l.path.join('.'))
.sort();
expect(projectLocalStrict).toEqual([
- 'appearance.sidebar.showAllFiles',
'appearance.sidebar.showHiddenFiles',
'autoSync.enabled',
'search.semantic.baseUrl',
diff --git a/packages/core/src/config/removed-keys.ts b/packages/core/src/config/removed-keys.ts
index 0ca8141c4..bf70388fb 100644
--- a/packages/core/src/config/removed-keys.ts
+++ b/packages/core/src/config/removed-keys.ts
@@ -102,6 +102,14 @@ export const REMOVED_KEYS: readonly RemovedKey[] = [
MIGRATE_HINT,
].join(' '),
},
+ {
+ path: ['appearance', 'sidebar', 'showAllFiles'],
+ redirect: [
+ 'appearance.sidebar.showAllFiles has been removed.',
+ 'The sidebar now always lists every file on disk; dot-prefixed entries are still gated by appearance.sidebar.showHiddenFiles. There is no longer a way to scope the tree to indexed/linked content.',
+ MIGRATE_HINT,
+ ].join(' '),
+ },
];
function isPlainObject(value: unknown): value is Record<string, unknown> {
diff --git a/packages/core/src/config/schema.ts b/packages/core/src/config/schema.ts
index 80b1ffc67..bf4b21e55 100644
--- a/packages/core/src/config/schema.ts
+++ b/packages/core/src/config/schema.ts
@@ -73,16 +73,6 @@ export const ConfigSchema = z.looseObject({
'Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.',
})
.default(false),
- showAllFiles: z
- .boolean()
- .register(fieldRegistry, {
- scope: 'project-local',
- agentSettable: false,
- defaultScope: 'project-local',
- description:
- 'Show every file, including those excluded by .gitignore / .okignore. On by default; turn off to scope the tree to indexed/linked content. Per-machine (project-local) — not shared.',
- })
- .default(true),
})
.optional(),
})
diff --git a/packages/core/src/constants/menu-labels.ts b/packages/core/src/constants/menu-labels.ts
index c4d37e64e..08edcc776 100644
--- a/packages/core/src/constants/menu-labels.ts
+++ b/packages/core/src/constants/menu-labels.ts
@@ -10,7 +10,6 @@ export const MENU_LABELS = {
fullPath: 'Full path',
relativePath: 'Relative path',
showHiddenFiles: 'Show hidden files',
- showAllFiles: 'Show all files',
expandAll: 'Expand all',
collapseAll: 'Collapse all',
} as const;
diff --git a/packages/core/src/desktop-bridge.ts b/packages/core/src/desktop-bridge.ts
index 147fc99e9..241cea2ef 100644
--- a/packages/core/src/desktop-bridge.ts
+++ b/packages/core/src/desktop-bridge.ts
@@ -36,7 +36,6 @@ type OkMenuAction =
| 'copy-full-path'
| 'copy-relative-path'
| 'toggle-show-hidden-files'
- | 'toggle-show-all-files'
| 'expand-all-tree'
| 'collapse-all-tree'
| 'toggle-doc-panel'
@@ -377,7 +376,6 @@ type OkEditorActiveTargetSnapshot =
interface OkEditorViewMenuStateSnapshot {
readonly showHiddenFiles: boolean;
- readonly showAllFiles: boolean;
readonly canExpandAll: boolean;
readonly canCollapseAll: boolean;
readonly sidebarVisible: boolean;
diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.ts
index 17fa8ba6a..a540aa223 100644
--- a/packages/desktop/src/main/index.ts
+++ b/packages/desktop/src/main/index.ts
@@ -438,7 +438,6 @@ let editorActiveTarget: EditorActiveTargetSnapshot = { kind: null };
let editorViewMenuState: EditorViewMenuStateSnapshot = {
showHiddenFiles: false,
- showAllFiles: true,
canExpandAll: true,
canCollapseAll: true,
sidebarVisible: true,
@@ -1262,7 +1261,6 @@ async function runApplicationMenuRefresh(): Promise<void> {
onCopyFullPath: () => sendMenuActionToFocused('copy-full-path'),
onCopyRelativePath: () => sendMenuActionToFocused('copy-relative-path'),
showHiddenFilesChecked: editorViewMenuState.showHiddenFiles,
- showAllFilesChecked: editorViewMenuState.showAllFiles,
canExpandAll: editorViewMenuState.canExpandAll,
canCollapseAll: editorViewMenuState.canCollapseAll,
sidebarVisible: editorViewMenuState.sidebarVisible,
@@ -1270,7 +1268,6 @@ async function runApplicationMenuRefresh(): Promise<void> {
terminalVisible: editorViewMenuState.terminalVisible,
terminalLive: editorViewMenuState.terminalLive,
onToggleShowHiddenFiles: () => sendMenuActionToFocused('toggle-show-hidden-files'),
- onToggleShowAllFiles: () => sendMenuActionToFocused('toggle-show-all-files'),
onToggleSidebar: () => sendMenuActionToFocused('toggle-sidebar'),
onToggleDocPanel: () => sendMenuActionToFocused('toggle-doc-panel'),
onToggleTerminal: () => sendMenuActionToFocused('toggle-terminal'),
diff --git a/packages/desktop/src/main/menu.ts b/packages/desktop/src/main/menu.ts
index a7a211eea..64a2f122b 100644
--- a/packages/desktop/src/main/menu.ts
+++ b/packages/desktop/src/main/menu.ts
@@ -35,9 +35,7 @@ export interface MenuDeps {
onCopyFullPath?(): void;
onCopyRelativePath?(): void;
showHiddenFilesChecked?: boolean;
- showAllFilesChecked?: boolean;
onToggleShowHiddenFiles?(): void;
- onToggleShowAllFiles?(): void;
sidebarVisible?: boolean;
onToggleSidebar?(): void;
docPanelVisible?: boolean;
@@ -310,13 +308,6 @@ export function buildMenuTemplate(deps: MenuDeps): MenuItemConstructorOptions[]
enabled: deps.onToggleShowHiddenFiles !== undefined,
click: () => deps.onToggleShowHiddenFiles?.(),
},
- {
- label: MENU_LABELS.showAllFiles,
- type: 'checkbox',
- checked: deps.showAllFilesChecked ?? false,
- enabled: deps.onToggleShowAllFiles !== undefined,
- click: () => deps.onToggleShowAllFiles?.(),
- },
{ type: 'separator' },
{
label: MENU_LABELS.expandAll,
diff --git a/packages/desktop/src/main/view-menu-state.test.ts b/packages/desktop/src/main/view-menu-state.test.ts
index d092799f5..151144e6a 100644
--- a/packages/desktop/src/main/view-menu-state.test.ts
+++ b/packages/desktop/src/main/view-menu-state.test.ts
@@ -4,7 +4,6 @@ import { mergeViewMenuState } from './view-menu-state';
describe('mergeViewMenuState — multi-publisher non-clobbering contract', () => {
const initial = {
showHiddenFiles: false,
- showAllFiles: false,
canExpandAll: true,
canCollapseAll: true,
sidebarVisible: true,
@@ -14,7 +13,6 @@ describe('mergeViewMenuState — multi-publisher non-clobbering contract', () =>
test('EditorArea push (docPanelVisible only) preserves FileSidebar fields', () => {
const afterFileSidebar = mergeViewMenuState(initial, {
showHiddenFiles: true,
- showAllFiles: true,
canExpandAll: false,
canCollapseAll: false,
sidebarVisible: false,
@@ -26,7 +24,6 @@ describe('mergeViewMenuState — multi-publisher non-clobbering contract', () =>
expect(afterEditorArea).toEqual({
showHiddenFiles: true,
- showAllFiles: true,
canExpandAll: false,
canCollapseAll: false,
sidebarVisible: false,
@@ -41,7 +38,6 @@ describe('mergeViewMenuState — multi-publisher non-clobbering contract', () =>
const afterFileSidebar = mergeViewMenuState(afterEditorArea, {
showHiddenFiles: true,
- showAllFiles: false,
canExpandAll: false,
canCollapseAll: true,
sidebarVisible: false,
diff --git a/packages/desktop/src/shared/bridge-contract.ts b/packages/desktop/src/shared/bridge-contract.ts
index 9e6b54917..3a270ba51 100644
--- a/packages/desktop/src/shared/bridge-contract.ts
+++ b/packages/desktop/src/shared/bridge-contract.ts
@@ -102,7 +102,6 @@ export type OkMenuAction =
| 'copy-full-path'
| 'copy-relative-path'
| 'toggle-show-hidden-files'
- | 'toggle-show-all-files'
| 'expand-all-tree'
| 'collapse-all-tree'
| 'toggle-doc-panel'
@@ -379,7 +378,6 @@ export type OkEditorActiveTargetSnapshot =
export interface OkEditorViewMenuStateSnapshot {
readonly showHiddenFiles: boolean;
- readonly showAllFiles: boolean;
readonly canExpandAll: boolean;
readonly canCollapseAll: boolean;
readonly sidebarVisible: boolean;
diff --git a/packages/desktop/src/shared/ipc-channels.ts b/packages/desktop/src/shared/ipc-channels.ts
index 92ecb80fe..3d8f9126a 100644
--- a/packages/desktop/src/shared/ipc-channels.ts
+++ b/packages/desktop/src/shared/ipc-channels.ts
@@ -246,7 +246,6 @@ export type EditorActiveTargetSnapshot =
export interface EditorViewMenuStateSnapshot {
readonly showHiddenFiles: boolean;
- readonly showAllFiles: boolean;
readonly canExpandAll: boolean;
readonly canCollapseAll: boolean;
readonly sidebarVisible: boolean;
diff --git a/packages/desktop/tests/integration/m1-smoke.test.ts b/packages/desktop/tests/integration/m1-smoke.test.ts
index fa20aae41..c50f87bbd 100644
--- a/packages/desktop/tests/integration/m1-smoke.test.ts
+++ b/packages/desktop/tests/integration/m1-smoke.test.ts
@@ -438,9 +438,10 @@ describe('M1 smoke', () => {
expect(desktopMembers.size).toBeGreaterThan(0);
expect(coreMembers.size).toBeGreaterThan(0);
expect(appMembers.size).toBeGreaterThan(0);
- expect(desktopMembers.size).toBe(27);
+ expect(desktopMembers.size).toBe(26);
expect(desktopMembers).toEqual(coreMembers);
expect(desktopMembers).toEqual(appMembers);
+ expect(desktopMembers.has('toggle-show-hidden-files')).toBe(true);
});
test('M1 invariant: EntryPoint / OkProjectEntryPoint literal-union drift catcher', async () => {
diff --git a/packages/desktop/tests/main/menu.test.ts b/packages/desktop/tests/main/menu.test.ts
index 6cb1d81e8..b9509a472 100644
--- a/packages/desktop/tests/main/menu.test.ts
+++ b/packages/desktop/tests/main/menu.test.ts
@@ -614,19 +614,9 @@ describe('buildMenuTemplate — View menu visibility toggles + tree-scoped expan
expect(findByLabel(template, 'Show hidden files')?.accelerator).toBe('CmdOrCtrl+Shift+.');
});
- test('Show all files renders as a checkbox-type item with checked state from deps', () => {
- const template = buildMenuTemplate(
- makeDeps({ onToggleShowAllFiles: mock(() => {}), showAllFilesChecked: true }),
- );
- const item = findByLabel(template, 'Show all files');
- expect(item?.type).toBe('checkbox');
- expect(item?.checked).toBe(true);
- });
-
test('Show hidden files DISABLED when toggle handler missing (unit-test default)', () => {
const template = buildMenuTemplate(makeDeps());
expect(findByLabel(template, 'Show hidden files')?.enabled).toBe(false);
- expect(findByLabel(template, 'Show all files')?.enabled).toBe(false);
});
test('Expand all / Collapse all render with visible=true by default', () => {
@@ -653,21 +643,17 @@ describe('buildMenuTemplate — View menu visibility toggles + tree-scoped expan
test('View menu click handlers dispatch to deps', () => {
const onToggleShowHiddenFiles = mock(() => {});
- const onToggleShowAllFiles = mock(() => {});
const onExpandAll = mock(() => {});
const onCollapseAll = mock(() => {});
const template = buildMenuTemplate(
makeDeps({
onToggleShowHiddenFiles,
- onToggleShowAllFiles,
onExpandAll,
onCollapseAll,
}),
);
(findByLabel(template, 'Show hidden files')?.click as (() => void) | undefined)?.();
expect(onToggleShowHiddenFiles).toHaveBeenCalledTimes(1);
- (findByLabel(template, 'Show all files')?.click as (() => void) | undefined)?.();
- expect(onToggleShowAllFiles).toHaveBeenCalledTimes(1);
(findByLabel(template, 'Expand all')?.click as (() => void) | undefined)?.();
expect(onExpandAll).toHaveBeenCalledTimes(1);
(findByLabel(template, 'Collapse all')?.click as (() => void) | undefined)?.();