feat(web): inspector + widget controls (NF-UI-4) #355
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/334-nfui4-inspector"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Inspectorpanel with three tabs: Config (widget-drivenargsediting), Docs (Markdown fromnodeRegistry[type].ui.doc), Run (disabled, NF-UI-7 wires it up). Sticky 360px column, collapsible with persisted state.apps/web/src/features/flows/widgets/sharing a commonWidgetFieldwrapper:StringInput,TextArea,NumberInput(min/max clamp on blur),EnumSelect,BooleanToggle,LabelMultiSelect(free-form placeholder until NF-UI-5),JsonEditor(textarea +JSON.parseon blur — Monaco not inapps/web).RegistryNodegets optionalui?: { widgets?, doc? }. Widget decls populated onrouter.switch/router.filter/template.string/agent.dispatch/forge.add_labels/forge.merge_pull_request/util.log/util.delay. Every entry also gets a one-paragraphui.doc. Nodes without widget decls fall back to a raw JSON editor showing the fullargsobject.FlowCanvasmirrors React Flow's selection viaonNodesChange(selectchanges), exposes the selectedGraphNodeto the Inspector, and applies widget edits back to the existingnodeArgsmap — debounced at 300 ms with a flush-on-unmount safety. Dirty flag flips on every arg write; the existing Ctrl+S / Save path round-trips unchanged.Test plan
bun x vitest run src/features/flows/— 68 passed (29 new: 16 widget-level + 13 Inspector).bun x turbo run typecheck— 4/4 workspaces clean.bun x biome check— 6291 files, no fixes.bun run devonce rebased againstmain.Out of scope
<textarea>+ parse validation until Monaco lands in the workspace.LabelMultiSelecthitting/forge/repo-labels— deferred until NF-UI-5 / NF-7.Design notes
onChangeemitsundefinedon clear (not empty string / zero) so the graph body preserves the "missing vs. set-to-default" distinction the executor cares about.JsonEditorholds a separate draft string so mid-edit typing doesn't throw throughJSON.parseon every keystroke; blur parses + pretty-prints or exposes an inline error.nodeArgsMap plus anargsVersioncounter; keeps the save path (rfToGraph) untouched.Closes #334
🤖 Generated with Claude Code