Summary
Add a register_drop Rhai hook that lets schemas handle external data dropped or pasted onto tree nodes. When a URL is dragged from a browser, an image is pasted from a screenshot, or text is pasted while a tree node has focus, the system classifies the data, finds matching schemas, enforces parent/child constraints, pre-fetches metadata, and invokes the schema's handler to create and populate a child note.
Design Spec
Full spec committed at docs/superpowers/specs/2026-05-13-register-drop-design.md
Key Features
register_drop(schema, [data_types], handler) — child schema declares which data types it can be created from
- Data types:
url, image, text, html, file — each with pre-processing (URL metadata fetch, temp file storage for images/files)
- Unified trigger: drag-and-drop and paste-on-tree-node share the same flow
- Constraint enforcement: standard
allowed_children_schemas / allowed_parent_schemas checks, no bypasses — mismatch shows a toast error
- Multi-match picker: when multiple schemas handle the same data type, a dialog lets the user choose
- Pre-fetch model: metadata is fetched by the Rust/Tauri layer before invoking the Rhai handler — sandbox stays network-free
attach() Rhai built-in: wraps existing ChaCha20-Poly1305 attachment pipeline for image/file drops
System Scripts
Ships with two script pairs:
- BookmarkFolder + Bookmark — URL capture with status tracking (to-read/reading/read/archived), folder views by date/site/unread
- ScreenshotFolder + Screenshot — image paste capture with thumbnail grid view, caption field
Scope
- Core engine:
register_drop hook registration, handler dispatch, attach() Rhai function, new display helpers (thumbnail, thumbnail_grid, domain)
- Desktop crate:
reqwest + scraper for URL metadata fetching, temp file management, two new Tauri commands (handle_drop, execute_drop_handler)
- Frontend: external drop/paste detection on tree nodes, loading state, picker dialog, error toasts, i18n keys
- System scripts: 4 new
.rhai files (02–05)
Summary
Add a
register_dropRhai hook that lets schemas handle external data dropped or pasted onto tree nodes. When a URL is dragged from a browser, an image is pasted from a screenshot, or text is pasted while a tree node has focus, the system classifies the data, finds matching schemas, enforces parent/child constraints, pre-fetches metadata, and invokes the schema's handler to create and populate a child note.Design Spec
Full spec committed at
docs/superpowers/specs/2026-05-13-register-drop-design.mdKey Features
register_drop(schema, [data_types], handler)— child schema declares which data types it can be created fromurl,image,text,html,file— each with pre-processing (URL metadata fetch, temp file storage for images/files)allowed_children_schemas/allowed_parent_schemaschecks, no bypasses — mismatch shows a toast errorattach()Rhai built-in: wraps existing ChaCha20-Poly1305 attachment pipeline for image/file dropsSystem Scripts
Ships with two script pairs:
Scope
register_drophook registration, handler dispatch,attach()Rhai function, new display helpers (thumbnail,thumbnail_grid,domain)reqwest+scraperfor URL metadata fetching, temp file management, two new Tauri commands (handle_drop,execute_drop_handler).rhaifiles (02–05)