feat(notebooks): manage and author notebooks in the web UI (#9)

Add atomic, versioned notebook mutations, a searchable folder tree, and editor insertion forms. Validate notebook paths and symlink roots and retain drafts after external changes.

Add yaml as a direct web dependency, reusing the existing workspace library for comment-preserving frontmatter edits.
This commit is contained in:
Florian Schmidt
2026-11-16 10:16:43 +01:00
parent 4fe7e4e376
commit 911387264b
22 changed files with 1302 additions and 23 deletions
+2
View File
@@ -8,4 +8,6 @@
- [2026-11-16] **Secrets on SSH:** exported via `export NAME=<shellQuote>` lines on stdin before the script (sshd AcceptEnv unreliable); redacted from streamed output, captures and audit.
- [2026-11-16] **Deploy:** Node 22 from the official nodejs.org tarball verified against SHASUMS256; node-pty 1.1.0 has no Linux prebuilds, so the installer adds build-essential + python3.
- [2026-11-16] **Notebook management (#9):** a shared mutation queue serializes saves/create/move/duplicate/delete. Exclusive hard-link publication prevents target replacement; saves use temp+rename. The recursive watcher updates lists; deleted open drafts are retained. Frontmatter helpers use YAML document nodes.
## Archive
+2
View File
@@ -7,4 +7,6 @@
- [2026-11-16] **Env names:** single data dir variable is `SHELLBOOK_DATA_DIR` (server config, auth, CLI, installer). SSH key: `SHELLBOOK_SSH_KEY`.
- [2026-11-16] **Exit codes vs errors:** a non-zero script exit is a normal result (check ❌) and goes only in run.finished; run.error is for transport/setup failures.
- [2026-11-16] **Notebook root symlinks (#9):** validating only child components after realpath(root) permits a symlinked notebooks root. Notebook reads and mutations validate the root itself before walking children; regression-covered. Workspace CLI/filesystem writers remain trusted against concurrent path swaps.
## Archive
+2 -2
View File
@@ -14,7 +14,7 @@
- Notebooks stay plain, readable Markdown.
## Table of Contents
- `architecture.md` — 7 entries — why custom app, stack, AI integration, workspace split
- `architecture.md` — 8 entries — why custom app, stack, AI integration, workspace split
- `attempts.md` — 2 entries — marimo + marimo-pair trial and why it was dropped
- `open.md` — 2 entries — open design questions
- `gotchas.md` — 5 entries — integration foot-guns (CRLF scripts, host-key event order, tmux vs systemd, env names)
- `gotchas.md` — 6 entries — integration foot-guns (CRLF scripts, host-key event order, tmux vs systemd, env names)