Authoring (built-in editing)
Authoring is part of the product, not an admin-only afterthought. The goal is to replace the old workflow of building the web in The Brain.
Core idea
Users can:
- create a new web
- add nodes and links
- edit titles, summaries, bodies, time, and location
- save locally, export, import, and share
UX principles
- Editing should not break browsing.
- Preview vs commit still applies while editing.
- Changes should feel immediate.
- Undo/redo is highly desirable, even if minimal at first.
Editing modes
Browse mode
Default. Normal navigation and preview behavior.
Edit mode
A toggle or context action enables editing affordances:
- “Edit node”
- “Add connected node”
- “Add link”
- “Edit link description”
Edit mode must still allow browsing. It can be a side panel rather than a full-screen editor.
Drafts and commits
Recommended model:
- User edits a draft in
<kweb-editor>.
- Editor emits
kweb:node-update / kweb:link-update patches.
- App shell applies patch to in-memory state and persists.
For destructive actions, require confirmation.
Validation
On create/update:
- title is required
- kind is required
- links require from/to/type
Time and location are optional.
Conflict handling
In v1 local-first, there are no multi-user conflicts. Future:
- introduce version stamps per node/link
- surface “last write wins” vs merge UI
Publishing and review (optional)
If you want a curator workflow later:
- allow “pending” state per node/link
- optionally hide pending by default
- show status to the contributor
This is optional for v1.
Definition of done (authoring)
- [ ] Create web, node, and link works from UI.
- [ ] Edit node summary/body, time, location.
- [ ] Delete node/link with confirmation.
- [ ] Export/import round-trips.
✒️
edit (requires access)