feat(tui): Add Edge Management to Edit Form#25
Open
JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
Open
feat(tui): Add Edge Management to Edit Form#25JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
JasonWarrenUK wants to merge 1 commit intoexperiment/auto-execute-roadmapfrom
Conversation
Edit forms now show existing edges via a multi-select (uncheck to remove) and fields to create a new edge by type and target node ID. The index is threaded through edit constructors so edge queries work at form build time, and edge diffs are applied on submit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(tui): Add Edge Management to Edit Form
Overview
CP.11 — Edit forms now support viewing, removing, and creating edges directly from the form UI.
Summary
Like a switchboard operator who can now see all the lines plugged into a socket and unplug the dodgy ones while patching in fresh connections — the edit form has grown tentacles of awareness about its node's relationships in the graph.
Tip
No migration steps needed. The
indexparameter is nil-safe — edit forms degrade gracefully when no index is available.Changes
internal/tui/form.go— edge management in edit formsedgeEntrystruct to describe connected edges with direction, type, target, and labelindex types.GraphIndexfield toformPanestructexistingEdges,keptEdgeIDs,newEdgeType,newEdgeTargetbuildEdgeEntries()to query the index for all edges connected to a nodeshortNodeLabel()to resolve target node titles for displayappendEdgeFields()to build huh multi-select (existing edges) and select/input (new edge) fieldsapplyEdgeChanges()to diff kept vs existing edges and delete/create on submitnewEditTaskFormPane,newEditJournalFormPane,newEditNoteFormPane) to acceptindexparameter and callappendEdgeFieldsindexparameterinternal/tui/app.go— wire index into edit formshandleEditNode()now passesm.indexto all edit form constructorsinternal/tui/form_test.go— edge management testsformTestIndexstub implementingGraphIndexdeletedIDstracking toformTestStorenilindex)TestEditFormShowsExistingEdges— multi-select appears when edges existTestEditFormShowsAddEdgeType— add-edge fields always presentTestEditFormNilIndexNoEdgeFields— nil index does not panicTestEditFormEdgeLabelsShowTargetTitle— section renders with edgesTestEditFormIncomingEdgeShowsSection— incoming edges detectedTestEditJournalFormShowsEdgeFields— journal forms get edge fieldsTestEditNoteFormShowsEdgeFields— note forms get edge fieldsTestEditFormNoExistingEdgesSection— no multi-select when no edges🤖 Generated with Claude Code