Skip to content

Run dialog: decision-model picker, final result from the run record; decision example loads whole - #8

Merged
lpalbou merged 1 commit into
mainfrom
fix/decision-run-dialog
Nov 3, 2026
Merged

lpalbou merged 1 commit into
mainfrom
fix/decision-run-dialog

Conversation

@lpalbou

@lpalbou lpalbou commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Run dialog and decision example: three fixes found by the decision end-to-end check

  1. Decision model picker in the Run dialog. A flow input whose every wire ends on a Decision model input (the example's On Flow Start model) is now scoped decision (utils/decisionPins.ts decisionModelPinIds, read from the graph only) and offers every provider/model handle on the output.decision route through the same useDecisionCatalog the Decision card uses (decisionModelOptions, moved from BaseNode to share it). The handle carries its provider, so no provider input is needed. Before: a disabled text-model picker reading "Pick provider…". A model input of a form with no provider input is no longer disabled; it waits for a provider only when the form has one (modelPickerWaitsForProvider).
  2. Example loads with every wire drawn. scripts/build_decision_workflow.py: the end pin model (text: the provider/model that answered) became a model-typed picker on load (the load migration promotes string pins named model), so department.model -> end.model was kept hidden ("cannot connect string to model"). The end output is now answered_by (string); example JSON rebuilt; decision_workflow_smoke.py updated.
  3. Final result from the run record, no invented end row. A run that finished before the ledger stream delivered its On Flow End showed a synthesized "On Flow End" row and the last Decision's answer as Final Result. flow_complete from the run summary now carries summary.output (ledgerEvents.flowCompleteEventFromSummary), and a graph that has an On Flow End never gets an invented row (flowCompletionRow); a graph without one keeps its implicit end row.

Tests

  • New src/components/runDecisionModel.test.ts (7 tests). Each fix checked RED when removed: old example JSON (hidden edge), no decision scope, always-implicit end row, flow_complete without the output.
  • Full vitest: 145 files, 1371 passed. npm run lint, npm run build, tsc --noEmit: clean. decision_workflow_smoke.py: all checks pass (AbstractRuntime 0.16 from main).

Browser run (scratch gateway with AbstractCore #41, real models)

Example saved to the gateway, loaded from the Library (no hidden-connection notice), Run dialog model = decision picker (15 handles incl. typesafe/jev-latest), run, result shown: 1440 dark with mlx/AbstractFramework/kev-0.8b-mlx-8bit (300 ms run: steps Ticket, Department, Escalate, Frustration, Triage; Final Result = run output with answered_by), 1440 light / 400 dark / 400 light with typesafe/jev-latest (answered_by jev-1.14.0). Screenshots kept locally with the worker.

Docs: docs/web-editor.md (Decision node: Run dialog), CHANGELOG Unreleased, llms-full.txt regenerated.

…, final result from the run record (no invented On Flow End), decision example loads with every wire drawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant