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:
@@ -82,3 +82,31 @@ and reconnect. App tests drive the SSH-key fixture through keygen, sensitive art
|
||||
downloads (including 410), after sections, capture substitution, and authorize
|
||||
artifact provenance. Real tmux/Claude login and browser terminal rendering still
|
||||
need an interactive server check.
|
||||
|
||||
## Notebook management and authoring
|
||||
|
||||
The sidebar groups notebooks into folders and filters by title or path. **New notebook**
|
||||
asks for a name, optional folder and title, then opens a valid starter with a host
|
||||
parameter, a read-only check, and a confirmed run placeholder. **Rename / move** and
|
||||
**Duplicate** take a destination path relative to `notebooks/` (including `.md`).
|
||||
Folders are created automatically; empty folders disappear after moves or deletes.
|
||||
**Delete** requires explicit confirmation. Names use letters, numbers, spaces, dots,
|
||||
underscores and hyphens; traversal, absolute paths, symlinks and Windows device names
|
||||
are rejected. Management needs a real server; the demo reports that limitation.
|
||||
|
||||
In edit mode, the toolbar inserts Check, Run, Artifacts, Upload or Capture examples
|
||||
at the cursor, targeting the local ShellBook server or a declared host parameter.
|
||||
Review example commands and file names before execution. **Parameter** adds a YAML
|
||||
mapping via a form (including choice options and secret rules), preserving unrelated
|
||||
YAML and comments. **After step** selects an existing step for conditional instructions.
|
||||
**Format help** explains attributes and parameter references. Save and live preview
|
||||
continue to use the core parser. Attribute editing remains available in Markdown.
|
||||
|
||||
All mutations use authenticated, same-origin API calls. Save, move, duplicate and
|
||||
delete use optimistic versions (409 means stale content or an occupied destination).
|
||||
Files publish atomically, and the existing watcher refreshes other tabs' lists and
|
||||
clean open documents. External rename/delete retains the old open draft with a
|
||||
notice; select the new path from the refreshed list. Unsaved edits require confirmation
|
||||
before navigation or management. External filesystem writers must be trusted: as with
|
||||
other workspace operations, symlink checks cannot prevent a privileged local process
|
||||
from swapping path components between filesystem calls.
|
||||
|
||||
Reference in New Issue
Block a user