Decisions
- Decided: CSS-based approach (inject styles to hide folders)
- Pending: Does CSS data-path selector work on Obsidian Mobile?
User Tasks
- Test plugin on Obsidian Mobile after pull
- Report what the file explorer DOM looks like on mobile
Summary
Custom Obsidian plugin that hides all top-level folders except
vault/in the file explorer, so the user only sees vault content.
Problem / Motivation
When the Opus git repo is opened as an Obsidian vault, the file explorer shows all top-level folders (src/, .claude/, .github/, tests/, etc.). Obsidian’s built-in “Excluded folders” feature doesn’t work reliably. A custom plugin is needed to filter the explorer view.
Proposed Solution
A minimal Obsidian plugin (“Vault Focus”) that injects CSS to hide all top-level items in the file explorer except the configured root folder (default: vault).
Current implementation: .obsidian/plugins/vault-focus/
manifest.json— Plugin metadatamain.js— CSS injection logic + settings tabstyles.css— Placeholder
Approach: Uses CSS selectors targeting .nav-folder.mod-root > .nav-folder-children > .tree-item[data-path] to hide/show folders.
Phase Overview
| Phase | Description | Status |
|---|---|---|
| Phase 1 | Basic CSS-based folder hiding | WIP |
| Phase 2 | Polish and edge cases | — |
Phase 1: Basic Folder Hiding — WIP
Goal: Hide all top-level folders except vault/ in the file explorer.
| File / Feature | Details | Owner | Status |
|---|---|---|---|
| Plugin scaffold | manifest.json, main.js, styles.css | opus | done |
| CSS injection | Hide folders via data-path selectors | opus | done |
| Settings tab | Configurable root folder | opus | done |
| Test on desktop | Verify it works on Obsidian desktop | mv | — |
| Test on mobile | Verify it works on Obsidian Mobile (Android) | mv | WIP |
| Debug mobile | Fix if CSS selectors differ on mobile | opus | — |
Phase 2: Polish — —
Goal: Handle edge cases and improve UX.
| File / Feature | Details | Owner | Status |
|---|---|---|---|
| Multiple folders | Support showing multiple folders | opus | — |
| Auto-detect | Auto-detect vault/ if it exists | opus | — |
| Collapse root | Auto-expand vault/ on startup | opus | — |
Test
Manual tests
| Test | Expected | Owner | Actual | Last |
|---|---|---|---|---|
| Plugin loads on desktop | No errors, folders hidden | mv | pending | - |
| Plugin loads on mobile | No errors, folders hidden | mv | pending | - |
| Settings change | Changing root folder updates explorer | mv | pending | - |
| Plugin disable | All folders visible again | mv | pending | - |
History
| Date | Event | Details |
|---|---|---|
| 2026-03-22 | Created | Initial plugin with CSS-based folder hiding |
References
- FR-021 (Obsidian Setup) — plugin is part of Obsidian configuration
- FR-020 (Vault Sync) — plugin needed for clean mobile experience