Add "Change to…" for goal and time loops on the canvas - #495
Merged
Merged
Conversation
Right-clicking a goal loop now offers "Change to Timed…", and a time loop "Change to Goal…", opening the promotion form for the other type. A goal loop turning time-based is asked what each pass should do, since it has no note to repeat and its goal is withdrawn. Confirming sends the same promoteNode the CLI's `node promote` does. Stopped loops get no entry, matching the daemon's refusal. `retypeTarget` moves onto `LoopType` so the app and the daemon read one rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scgopi <scgopireddy@gmail.com>
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.
Summary
The canvas half of #492: goal and time loops can switch types from the app, not just the CLI.
/looppreview shows the composed line.promoteNodethatgraphcode node promotedoes, so there's no daemon change.retypeTargetmoves fromGraphStoreontoLoopType, so the app's menu and the daemon's guard read the same rule.Rendered headlessly (NSHostingView) and checked: the empty goal → timed form shows the hint and a disabled Change button, the filled one previews
/loop 1h check the flake hasn't come back, and time → goal shows the done-check field.Test plan
RED: xcodebuild test -only-testing:graphcodeTests/LoopRetypeFormTests with origin/main's app and Domain sources -> compile fails, no member retypeTarget / promotionTask / promotionSource (exit 65)
GREEN: xcodebuild test -only-testing:graphcodeTests/LoopRetypeFormTests,SketchPromotionTests,LoopRetypeTests -> 26 tests in 3 suites passed (exit 0)
REGRESSION: xcodebuild -scheme graphcode test with private DerivedData -> 1990 tests in 212 suites passed (exit 0); graphcode-cli and graphcoded build (exit 0); swiftlint 0 errors; swift format lint clean; portable Domain package builds