Commit 1d917e5
committed
fix(cue): pipeline persistence, save UX, loader resilience, codex stdin banner
Fixes a cluster of Cue pipeline editor bugs around persistence and rendering:
- Pipeline vanish after save: createPipeline assigned timestamp ids; on
reload subscriptionsToPipelines regenerated name-based ids, leaving the
saved selectedPipelineId stale and convertToReactFlowNodes skipping every
pipeline. mergePipelinesWithSavedLayout now validates the saved selection
against the live pipeline ids and falls back to the first pipeline; a
live safety-net effect in usePipelineState resets selectedPipelineId to
null whenever it points at a pipeline that no longer exists.
- Save silently doing nothing: validatePipelines used to skip empty
pipelines, so 'create N pipelines, click save' returned success without
writing anything. Empty pipelines are now flagged ('add a trigger and an
agent before saving') and handleSave refuses to no-op when the editor
has pipelines but nothing partitions to a root.
- Lost-on-save trust gap: handleSave now write-back-verifies every
cue:writeYaml by reading the file and comparing bytes, throws on
mismatch, preserves isDirty on failure, and fires explicit success/
error toast notifications so the 2-second in-button flash can no longer
be missed.
- Trigger config caught at load instead of save: pipelineToYaml was happy
to write a time.scheduled subscription with no schedule_times (or
time.heartbeat with no interval_minutes, etc.), the loader then rejected
the entire YAML for every agent in that project root on Cue toggle.
validatePipelines now mirrors the YAML schema's per-event requirements,
blocking the bad save up front.
- One bad subscription killing a whole project's config: extracted
validateSubscription and added partitionValidSubscriptions; loader now
drops individual invalid subs as warnings instead of failing the entire
load. Config-level errors (missing subscriptions array, bad settings)
remain fatal.
- Codex 'Reading additional input from stdin...' in run output: cue
child processes spawn with stdio[0]='ignore' in local mode so codex
exec doesn't emit the stdin banner before observing EOF. SSH stdin
script and SSH small-prompt paths still get a writable pipe.
Also includes editor polish from the working branch: pendingSavedViewportRef
threaded from usePipelineLayout to CuePipelineEditor so viewport restore
waits for ReactFlow to measure nodes (no more empty canvas on first open),
plus PipelineCanvas + AllPipelinesView locking tweaks and matching tests.
Tests: 25,260 passing.1 parent 4cd4787 commit 1d917e5
17 files changed
Lines changed: 1423 additions & 278 deletions
File tree
- src
- __tests__
- main/cue
- renderer
- components/CuePipelineEditor
- utils
- hooks/cue
- main/cue
- config
- renderer
- components/CuePipelineEditor
- utils
- hooks/cue
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
344 | 370 | | |
345 | | - | |
346 | 371 | | |
347 | 372 | | |
348 | 373 | | |
349 | 374 | | |
350 | 375 | | |
351 | | - | |
352 | 376 | | |
353 | | - | |
| 377 | + | |
354 | 378 | | |
355 | 379 | | |
356 | 380 | | |
| |||
0 commit comments