Skip to content

feat: add file explorer with built-in text editor#2

Open
balin-ar wants to merge 3 commits intoibelick:mainfrom
balin-ar:feat/file-explorer
Open

feat: add file explorer with built-in text editor#2
balin-ar wants to merge 3 commits intoibelick:mainfrom
balin-ar:feat/file-explorer

Conversation

@balin-ar
Copy link

@balin-ar balin-ar commented Feb 5, 2026

What

Adds a full File Explorer screen with a built-in text editor to WebClaw.

Screenshot

File Explorer

Features

  • 📁 File Explorer — Browse, upload, download, rename, and delete files/folders
  • ✏️ Text Editor — Edit 30+ file types (yaml, json, md, py, js, ts, sh, etc.) directly in the browser
  • 🔒 Direct filesystem access — Uses Node.js fs module via Nitro server endpoints (no FileBrowser dependency)
  • 🛡️ Security — Path jailing with symlink escape protection, null byte rejection, configurable FILES_ROOT
  • 🖱️ UX — Right-click context menu, double-click to open folders/edit files, Ctrl+S to save
  • 📝 Updated README — Docs for .env configuration and file explorer setup

New .env variable

# Root directory for file browsing (defaults to $HOME)
FILES_ROOT=/home/your_user

Architecture

  • Backend: src/server/filesystem.ts — Thin wrapper over node:fs/promises with path validation
  • API routes: src/routes/api/files/ — list, read, save, download, upload, delete, rename, mkdir, info
  • Frontend: src/screens/files/ — File explorer screen, sidebar, toolbar, breadcrumb, context menu, editor
  • Security: src/server/path-utils.ts — Path sanitization and traversal prevention

robbyczgw-cla added a commit to robbyczgw-cla/opencami that referenced this pull request Feb 6, 2026
Cherry-picked from ibelick#2
Original author: balin-ar <rutiaapp@gmail.com>

- File Explorer screen with sidebar navigation, breadcrumb, toolbar
- Browse, upload, download, rename, delete files and folders
- Built-in text editor for 30+ file types
- Path jailing with symlink escape protection
- Added FILES_ROOT config, updated README with credits
robbyczgw-cla added a commit to robbyczgw-cla/opencami that referenced this pull request Feb 6, 2026
@robbyczgw-cla
Copy link
Contributor

Hey @balin-ar! 👋

Just wanted to drop by and say thanks — your file explorer here is great, I adapted it for my own fork (OpenCami) and it's become one of the most-used features. Also grabbed your cron jobs panel from your fork and cleaned it up a bit.

Both credited in the changelog and source. Appreciate you sharing solid work! 🙌

@balin-ar
Copy link
Author

Hey! Appreciate the kind words 🙏 Glad the file explorer and cron panel are getting some love in OpenCami — that's exactly why we open source stuff. Cool project btw, will check it out!

Let's keep building together! 🤙

- File Explorer screen with sidebar navigation, breadcrumb, toolbar
- Browse, upload, download, rename, delete files and folders
- Built-in text editor for 30+ file types (yaml, json, md, py, js, etc.)
- Direct filesystem access via Node.js fs (no FileBrowser dependency)
- Path jailing with symlink escape protection (FILES_ROOT env var)
- Right-click context menu (Open, Edit, Download, Rename, Delete)
- Double-click to open folders or edit text files
- Ctrl+S to save, Esc to close editor
- Link to file explorer from chat sidebar
- Updated README with file explorer docs and .env configuration
- New /services route: service registry with health checks, status cards, add dialog
- New /bots route: cron job management with run history, enable/disable, run-now
- API endpoints: /api/services (CRUD + health ping), /api/cron (list, runs, trigger, toggle)
- Sidebar updated with Services and Bots navigation links
- All components follow existing webclaw patterns (TanStack Router, React Query, Tailwind)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants