Fix two layouts in the New loop dialog the templates work broke - #234
Merged
Conversation
Both from the design-fidelity pass, and both visible in one screenshot. **The applied strip was a scrambled sentence.** The shape sentence, the `Undo the shape` button and the clause after it sat in an `HStack`, so when the sentence wrapped, its second line went *under* the button and the words after it — what you read was "…and sets Undo the shape to keep just the prompt. a cadence." It is now one `Text` carrying an inline link, which flows with the words around it; the link is intercepted by the strip's own `OpenURLAction`. The type name is emphasised, as the canvas draws it. **The footer had no room.** The save notice sat between the Spacer and the primary button, and there is not enough width for both: the path truncated to "Saved…op.md", "Put it in the project instead" wrapped onto three lines, and `Create timed loop` itself wrapped onto two. A dialog's primary action must never wrap. The notice now has a full-width row of its own above the buttons, the button is `lineLimit(1)` and fixed-size, and the disabled-reason text truncates rather than squeezing it. Verified by rendering the dialog headless (`NSHostingView` → PNG) rather than by reading the code, which is how both of these got through in the first place. `NodeDraftForm` went over swiftlint's type-body limit with the fix, so the template chrome — the applied strip and the footer — moved to `NodeDraftTemplateBar.swift`, the way `ProjectFeature`'s template verbs already live beside it. 1482 tests pass, swiftlint 0 errors, swift-format clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MJR8Wuwc4qnaSBUMcYf7Af
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.
Both regressions came from the design-fidelity pass in #231, and both are visible in a single screenshot.
The applied strip was a scrambled sentence
The shape sentence, the
Undo the shapebutton and the clause after it sat in anHStack. When the sentence wrapped, its second line went under the button and the words after it, so what you actually read was:It is now one
Textcarrying an inline link, which flows with the words around it — the only spelling that survives wrapping. The link is intercepted by the strip's ownOpenURLAction, and the type name is emphasised the way the design canvas draws it.The footer had no room
The save notice sat between the
Spacerand the primary button, and there isn't enough width for both:Saved…op.mdCreate timed loopwrapped onto two linesA dialog's primary action must never wrap. The notice gets a row of its own above the buttons; the disabled-reason text truncates rather than squeezing the button.
How it was checked
By rendering the dialog headless (
NSHostingView→ PNG) and looking at it — not by reading the code, which is how both of these got through in the first place.NodeDraftFormwent over swiftlint's type-body limit with the fix, so the template chrome moved toNodeDraftTemplateBar.swift, the wayProjectFeature's template verbs already live beside it rather than inside it.Verification
swiftlint lint— 0 errors;swift format lint --strict— clean🤖 Generated with Claude Code
https://claude.ai/code/session_01MJR8Wuwc4qnaSBUMcYf7Af