Commit Graph

21 Commits

Author SHA1 Message Date
gsxdsm
75867c4002 fix(FN-0000): address workflow loop review feedback 2026-06-08 00:19:50 -07:00
gsxdsm
a504238d26 feat(FN-0000): add workflow loop nodes 2026-06-07 23:56:25 -07:00
gsxdsm
1922b5efc2 merge: main (workflow editor 109 / cli_sessions 110-111 / workflow_settings 112) — renumber PR-entity migration to 113, union core exports, TaskCard prNode + cliSessionState badges, executor PrNodeDeps + CliAgentRuntime options 2026-06-05 23:06:46 -07:00
gsxdsm
8a6a67a305 feat(pr): dashboard PR view, routes, node-state UI + user controls (U7)
Adds /api/pull-requests routes (list, detail, merge/approve/retry/close/
automerge — all re-fetch authoritative state before acting), a
PullRequestView rendering every entity state distinctly (creating/failed/
unverified/responding/await-review/conflict) with the action bar, live
auto-merge gate reason, and conflict CTA; TaskCard PR node-state badge +
link; and the R16 column-move-backward guard. User actions route through
the existing releaseHeldTaskByEvent primitives. Maps the new PR node kinds
in the workflow editor's kind resolver. 13 route tests + lazy-view guard
green; component test runs in CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 22:18:34 -07:00
gsxdsm
6d16c07197 merge: main (editor consolidation #1433, fast-tests, learnings) — renumber workflow_settings migration to 110, settings panel joins the sidebar disclosures, full-workspace literal sweep 2026-06-05 15:23:15 -07:00
gsxdsm
11fb9f1325 merge main: per-column agent assignment (binding validation, policy-escalation handshake, override notes) into workflow editor consolidation
Resolved 4 conflicts preserving both feature sets:
- WorkflowNodeEditor.tsx: kept card-node/edge/dialog/dirty-guard/auto-layout/
  onboarding/template/AI-edit features; wired main's columnAgentsEnabled flag
  gate, override-column agent registry load, and policy-escalation save retry
  (finishSave helper wraps both update payloads).
- WorkflowNodeEditor.test.tsx: kept U2/U4/AI-design describes plus main's U6
  column-agent describe; merged api mock + import lists.
- register-workflow-routes.ts: merged import sets (design DI seam + column-agent
  validators).
- agent-tools.ts: strip-approval-flags and column-agent binding assertion now
  both run in create/update tools.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:43:02 -07:00
gsxdsm
b7fa21c25e merge: main (column-agent assignment #1432) into workflow-settings — union executor/agent-tools/routes imports, both tool-description texts, both route helpers 2026-06-05 14:41:43 -07:00
gsxdsm
563cb5b372 Address PR review feedback (#1433)
- always dispose AI design session (try/finally) + rejecting-agent test
- prune expired design rate-limit entries per check
- apply workflowId precedence in createTaskWithReservedId
- compare-and-set migrated project default (no pre-transaction snapshot)
- reject fragment ids in setDefaultWorkflowId at the write boundary
- guard stripApprovalBypassFlags against malformed template nodes
- hoist duplicate stepToFragmentIr call in migration loop
- auto-layout preserves unplaced nodes (strictColumnForY)
- second same-pair connection births a failure edge for condition-capable sources
- insertFragment expands foreach templates into child nodes (lossless round-trip)
- copyIrWithFreshIds remaps namespaced foreach child layout keys
- discard stale AI-edit results after workflow switch
- i18n: returnEmptyString:false so empty locale placeholders fall back to en
- test fixes: schema-version titles, migrate idempotency assertion, TaskForm post-resolve + cross-mode regression, deterministic waits
2026-06-05 13:56:05 -07:00
gsxdsm
75ebe23b4f feat(dashboard): column agent picker, override visibility, write-time validation
U6: WorkflowColumnPanel agent picker + defer/override toggle with specified
interaction states (flags-off hint, loading, fetch-error, stale-agent
warning, bound-column badge); WorkflowNodeEditor overridden-by-column-agent
note + stale-id treatment; assertColumnAgentsExist + confirmPolicyEscalation
gate (R13) on workflow save routes; flowToIr now preserves column agent
bindings through the editor round-trip.
2026-06-04 23:53:22 -07:00
gsxdsm
7bbb8b650a feat(dashboard): fragment insertion, seam-conflict, and graph-copy helpers 2026-06-04 23:02:50 -07:00
gsxdsm
9089e18705 feat(dashboard): WorkflowSettingsPanel — definitions/values tabs, setting-value routes, flow-mapping round-trip 2026-06-04 22:57:01 -07:00
gsxdsm
f67a2542b9 feat(dashboard): node/edge deletion with safe cascade semantics 2026-06-04 19:45:44 -07:00
gsxdsm
ffc4d8a6ed feat(dashboard): success/failure edge authoring with cycle guard and interpreter-only banner 2026-06-04 19:35:34 -07:00
gsxdsm
297a00d3de feat(dashboard): redesign workflow nodes as card-style with config summaries 2026-06-04 19:26:55 -07:00
gsxdsm
3ebaa321f8 fix(review): apply code-review fixes — runId/foreachNodeId wiring, worktree-leak cleanup, rework re-execution, instance pruning, SIGKILL fallback, type dedup, board memo split, agent-native field-schema context + fn_workflow_get
17 findings from 12-reviewer code review applied:
- P1 runId trio (pin-probe/resume/markIntegrated used placeholder runId; 4-reviewer corroboration) + production-wiring tests
- P1 worktree/branch release on instance failure/exhaustion/abort
- P2 runGraphTaskStep no longer masks step-session failures; rejected memo cleared so rework re-executes
- P2 clearStaleInstanceStates wired at run start/end (mirrors branch pruning)
- P2 code-node timeout killSignal SIGKILL; dead template-recursion removed
- P1/P2 field-type re-declarations replaced with @fusion/core imports (stale comments removed)
- P2 Board memo split + TaskCard comparator stringify guard + modal prop-driven field defs
- HIGH agent-native: executor prompt injects custom-field schema/values; self-correcting rejection text; fn_workflow_get; fn_task_update bare-call guard; integration-conflict task log

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:01:55 -07:00
gsxdsm
e87e745379 feat(dashboard): WorkflowFieldsPanel — field-definition authoring with live badge preview (U13 completion)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:44:43 -07:00
gsxdsm
ad5cd579be feat(dashboard): U8 — node editor authoring for foreach/step-review/parse-steps/code, rework edge inspector, template round-trip
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:50:45 -07:00
gsxdsm
e5a0a199ea feat(dashboard): node editor authors columns, traits, hold and split/join nodes with inline validation (U10) 2026-06-04 01:46:51 -07:00
gsxdsm
eb67d08213 Address PR review feedback (#1363)
Greptile + CodeRabbit findings across core/engine/dashboard. Stale findings
(written against earlier commits) verified and skipped; valid ones fixed.

Engine:
- await-input: do not clear pausedReason in the /input route (the node's
  marker must survive unpause); the node clears it after consuming input.
  Embed a colon-free epoch watermark in the marker so only post-pause steering
  comments count as the reply (ISO timestamps collided with the colon
  separator and the dashboard question parser).
- gate nodes without a registered runner now fail closed (throw) instead of
  silently passing.
- a thrown interpreter error in maybeExecuteWorkflowGraph now falls back to the
  legacy pipeline instead of stranding the task in-progress.
- approved-CLI path clears the stale awaiting-cli-approval status/marker.

Core:
- persist+cascade workflow selection: purge task_workflow_selection rows and
  compiled workflow_steps on physical task deletes; migration 105 cleans
  already-orphaned rows; catch-cleanup for materialized steps when the owner
  write fails; WF-id allocation now in a BEGIN IMMEDIATE transaction.
- compiler validates the canonical execute->review->merge seam order (rejects
  duplicate/misordered seams).
- disk-backed reopen round-trip + tightened updatedAt/list assertions.

Dashboard:
- WorkflowSelector clears stale default/options across project changes and on
  fetch failure; InlineCreateCard/NewTaskModal reset the workflow on all
  clear/discard paths and include it in dirty-state.
- WorkflowNodeEditor: config-key deletion now persists; removed an invalid
  eslint-disable that was itself a hard lint error.
- TaskCard: single status badge for awaiting-input (no duplicate).
- WorkflowResultsTab: reset paused-action UI between pauses; surface
  resume/approve failures inline.
- TaskDetailModal: treat awaiting-user-input/awaiting-cli-approval/paused as
  not-in-progress for the live-log subscription.
- workflow-flow-mapping: don't write synthetic node names back into IR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 17:32:12 -07:00
gsxdsm
5502025001 fix: apply safe_auto code-review fixes
- runner: report visited nodes on mid-run interpreter errors
- handleGraphFailure: clear completed-task watchdog + untrack stuck detector
- getDefaultWorkflowId: use getSettingsFast (drop per-create listWorkflowSteps read)
- db: index workflows(createdAt) in base schema + migration 103
- store: hoist workflow-definition type imports; mapping: single editorKind call
- executor: drop backwards TaskDetail->Task cast in execute seam
2026-06-03 12:26:49 -07:00
gsxdsm
d071aecda6 feat(dashboard): visual graph node editor for workflows (U6, U7)
Add a React Flow (@xyflow/react) based WorkflowNodeEditor: a lazy-loaded modal
with a workflow list, a node palette (prompt/script/gate/merge-boundary),
drag-to-connect edges, a per-node inspector, and save with compile-validation
that surfaces non-linear graphs as a banner. Pure irToFlow/flowToIr mapping
round-trips the v1 IR plus editor layout. Reachable via a Graph editor button in
the Workflow Steps manager; mounted in AppModals behind a new modal-manager
flag. Adds a vendor-reactflow Vite chunk and a feature changeset.
2026-06-03 09:45:26 -07:00