Couple trigger enabled state to workflow lifecycle#4900
Merged
Conversation
Trigger enabled was previously something a user could set directly from several surfaces, independently of a workflow's draft/live state. That let a draft workflow run a live trigger against production, contradicting the lifecycle contract. Trigger enabled now follows the lifecycle, with go live and switch to draft as the only controls that change it. - Route the dashboard on/off toggle through go live / switch to draft so state and triggers always move together (activation usage limit preserved). - Remove the standalone enable controls from the collaborative editor header and trigger inspector, and drop the now-dead client enable plumbing so the client can no longer desync triggers from state. - Infer workflow state from triggers on import so a live workflow exported and re-imported round-trips as live instead of silently reverting to draft. The legacy editor toggle is left untouched as it is being sunsetted. Carrying state in the project.yaml wire format, hardening the read-only lock on the sync channel, and the AI prompt cleanup are tracked as follow-ups.
Security Review ✅
|
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.
Closes a gap left by the lifecycle work: trigger enabled state could still be set directly, independently of a workflow's draft/live state. That allowed a draft workflow to run a live trigger against production, which contradicts the lifecycle contract that draft means "not processing data". Trigger enabled now follows the lifecycle, with go live and switch to draft as the only controls that change it.
What changed
Scope
The legacy LiveView editor toggle is intentionally left untouched since that editor is being sunsetted.
Three pieces that cannot be finished from this repo are tracked as follow-ups on the epic: carrying state in the project.yaml wire format (#4897), making the live read-only lock write-authoritative on the sync channel (#4898), and the AI prompt cleanup (#4899).
Additional notes for the reviewer