Summary
ClawPad's web UI fails to load pages when the folder path contains spaces. The URL shows the encoded path (%20 for space), but the frontend doesn't decode it before looking up the file, resulting in a "Page not found" error.
Steps to Reproduce
-
Create a page with a space in the folder name via the API or agent:
clawpad_write path="WakeCap/Modon Prototype/PROJECT.md"
-
Files are created successfully on disk:
/pages/WakeCap/Modon Prototype/PROJECT.md ✅
-
API can read the file without issues:
clawpad_read path="WakeCap/Modon Prototype/PROJECT.md" ✅
-
Navigate to the page in ClawPad web UI
-
Result: "Page not found" error
Expected Behavior
The web UI should URL-decode the path and successfully load:
WakeCap/Modon%20Prototype/PROJECT.md → WakeCap/Modon Prototype/PROJECT.md
Actual Behavior
The web UI attempts to find a file at the literal encoded path:
Looking for: "WakeCap/Modon%20Prototype/PROJECT.md"
Actual file: "WakeCap/Modon Prototype/PROJECT.md"
Result: 404 / "Page not found"
Technical Analysis
The issue appears to be in the path resolution logic on the frontend. When the browser URL contains:
/page/WakeCap/Modon%20Prototype/PROJECT
The frontend extracts the path but doesn't apply decodeURIComponent() before:
- Looking up the file on disk
- Fetching page metadata
- Rendering breadcrumbs
Affected Areas
- Page viewing — Cannot view pages with spaces in folder names
- Navigation — Breadcrumbs may also be affected
- Page listing — Pages may appear in lists but fail when clicked
- Search results — Same issue if navigating from search
Workaround
Avoid spaces in folder/page names. Use:
ModonPrototype instead of Modon Prototype
my-folder instead of my folder
Suggested Fix
Apply URL decoding to the path parameter before file resolution:
// Before file lookup
const decodedPath = decodeURIComponent(rawPath);
// Or if using Next.js App Router params
const path = decodeURIComponent(params.path.join('/'));
Environment
- ClawPad Version: 0.3.1
- OS: macOS (Darwin 25.2.0 arm64)
- OpenClaw: Latest
Summary
ClawPad's web UI fails to load pages when the folder path contains spaces. The URL shows the encoded path (
%20for space), but the frontend doesn't decode it before looking up the file, resulting in a "Page not found" error.Steps to Reproduce
Create a page with a space in the folder name via the API or agent:
Files are created successfully on disk:
API can read the file without issues:
Navigate to the page in ClawPad web UI
Result: "Page not found" error
Expected Behavior
The web UI should URL-decode the path and successfully load:
Actual Behavior
The web UI attempts to find a file at the literal encoded path:
Technical Analysis
The issue appears to be in the path resolution logic on the frontend. When the browser URL contains:
The frontend extracts the path but doesn't apply
decodeURIComponent()before:Affected Areas
Workaround
Avoid spaces in folder/page names. Use:
ModonPrototypeinstead ofModon Prototypemy-folderinstead ofmy folderSuggested Fix
Apply URL decoding to the path parameter before file resolution:
Environment