Feat: decouple execution-mode switching from probing, unify the Run control, and supporting store refactors#210
Open
pcolt wants to merge 8 commits into
Open
Conversation
- feat: choose execution location/mode from interactive top-right dropdowns (ExecutionBadge); remove the standalone view toggle
- feat: keep coral registries and executable parameters per execution location, resolved by an internal activeLocation
- feat: unify the Run control in the sidebar (single job or pipeline) and move the pipeline toolbar there; PipelineCanvas becomes a pure canvas
- refactor: slim ProbeResult to status-only and return {status, metadata} from the probe IPC; route payload to the per-location store
- feat: pre-submit guard blocks runs for un-validated location/backend combinations
- refactor: SettingsModal drops the mode radios; Save & Sync becomes Validate & Sync for the current mode's paths
- test: per-location isolation coverage for the registry and parameters stores
- docs: CHANGELOG + CLAUDE.md for the overlay selector, per-location stores, and storage keys
- refactor: the renderer now sends { location, backendKind, target } to 'probe-sync-execution-settings' instead of the whole ExecutionSettings
- refactor: executionProbe helpers operate on the single target, decoupling the probe from the full settings shape
… selection store
- refactor: new persisted executionSelection store owns location/backendKind; AppSettings.execution is now a pure { local, remote } runner config (Electron reads no selection)
- refactor: settingsStore stays a pure config store — selection-dependent members take location/backendKind as explicit arguments instead of reading a store
- refactor: ExecutionBadge writes the leaf stores directly; drop the switchLocation/switchMode wrappers; keep a shared warnIfUnvalidated helper
- refactor: sshMessages exportAndEval* and the log/status read helpers take an explicit location argument
- test: isolation coverage for the executionSelection store
…ndent of the active mode - feat: Settings "Execution paths" accordion regains location/backend-kind radios that pick which combination to configure and Validate & Sync, seeded from the active selection on open — they do not change the active mode (set from the overlay) - refactor: per-location store writes take an explicit location (setRegistry(data, location), mergeRegistry(data, location), parametersStore.setValueFor); reads still resolve activeLocation, so validating a non-active combination never moves the active cursor - refactor: applySyncedMetadata routes the probe payload to the explicit location instead of mutating activeLocation - test: registry store coverage for explicit-location writes not moving the active cursor
- feat: dedicated plus icon (PlusIcon) for the Add stage button instead of the grid icon - refactor: rename the pipeline "Pipeline I/O" sidebar group to "Import / Export" - refactor: restyle ExecutionBadge as an elevated surface pill with larger, centered dropdowns; remove the focus ring on pointer click while keeping it for keyboard navigation - refactor: reorder the top-right overlay so the dark-mode toggle sits above the execution badge
- docs: CHANGELOG #204 entry now covers validating any mode from Settings (radios no longer change the active mode) and reopening in the last selected mode - docs: CLAUDE.md documents the executionSelection store, the pure arg-based settingsStore, explicit-location registry/params writes, the single|pipeline viewMode union, and the execution_selection storage key
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.
It closes #204
Overview
Lift execution-mode selection out of
SettingsModaland into the always-visible top-right overlay, unify the two Run controls into one, and make mode-switching both lightweight (no re-probe) and correct (never runs a stale configuration).Since #203, the submit primitives take a self-contained
configbag, so the active mode no longer needs to be committed through a probe. This PR turns the mode into a pair of overlay selectors — location (local/remote) and mode (coral/executable/pipeline) — and reorganises probe results so each target keeps its own validated payload.Data model
Each target's payload lives in its natural store keyed per location:
registryStoreholds alocaland aremotecoral node registry;parametersStoreholds alocaland aremoteexecutable parameter tree (now persisted).Only a small status per backend kind still lives on each target (
ExecutionTargetSettings.probes), giving 4 slots total acrosslocal/remote×coral/executable.Live getters resolve against an internal
activeLocationset by the switch orchestration, so switching location instantly changes what the palette / editor / submit see with no hydration copy, and per-location edits persist automatically. Executionlocation/backendKindare moved into their own persistedexecutionSelectionstore, decoupled from the{ local, remote }runner config insettingsStore(which never reads that selection — every selection-dependent member takes it as an explicit argument).UX
The overlay hosts the two selectors (replacing the read-only badge and the standalone view toggle);
pipelinerequiresremote(enforced by disabling the invalid option). Switching to a combination that was never validated raises a toast pointing to Settings, and runs are blocked by a pre-submit guard.SettingsModal's Save & Sync becomes an explicit Validate & Sync for the current mode's paths.The Run control is unified in the sidebar (single → job config; pipeline → run pipeline), and all the other buttons in the old pipeline toolbar move in sidebar too.
Cleanup riding along
ProbeResultis slimmed to{ ok, message, syncedAt }— probe status now lives per target × backend kind (ExecutionTargetSettings.probes), dropping the old flatAppSettings.lastProbe. Manual "Import Nodes" now merges into whichever location is active, rather than clobbering a single shared registry.resized-pipeline.mp4
Summary
ExecutionBadgebecomes interactive) replacing the standalone view toggle; the dropdowns write the two leaf stores directlylocation/backendKindmoved into a dedicated persisted Svelte selection store (executionSelection, keyexecution_selection), decoupled from the electron-persisted runner config; the app reopens in the last location+modesettingsStorestays a pure config store — selection-dependent members (getParametersFileName,saveParametersFileName,getProbe,recordProbe) takelocation/backendKindas explicit arguments; it never imports the selection storeregistryStore(internalactiveLocation, persisted{ local, remote }, best-effort migration from the old flatregistered_nodes)parametersStore, now persisted (execution_parameters)ProbeResultto{ ok, message, syncedAt }; probe status stored per target × backend kind (ExecutionTargetSettings.probes), droppingAppSettings.lastProbeProbeRequest { location, backendKind, target }(not the wholeExecutionSettings) and returns{ status, metadata }; the renderer routesmetadatato the per-location storeSidebarButtons;PipelineCanvasbecomes a pure canvasSettingsModal's location/backend-kind radios no longer change the active mode (that is now the overlay's job) — they select which combination to configure and Validate & Sync, seeded from the active selection when the accordion opens; Save & Sync → "Validate & Sync" with per-combo probe statusTest plan
npm run check,npm run check:electron,npm testpass (registry/graphParser tests adjusted for per-location load).--dependency;PipelineCanvashas no toolbar.pipelinedisabled while location is local;localdisabled while mode is pipeline.