Nod pane: keep the draft in view after narrowing, and use the canvas background - #620
Merged
Merged
Conversation
sizeThatFits measured by resizing the live text container. SwiftUI also asks for sizes it does not use, and after the pane narrowed the box was left one line tall while the draft wrapped to four, so only its last line showed. It now measures on a scratch layout and ignores an unbounded proposed width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: scgopi <scgopireddy@gmail.com>
The chat pane was a lighter #1e1e22 than the near-black canvas beside it. It now uses Theme.canvasBackground, so the canvas and a Nod chat share one ground; cards and the composer keep their lighter fills on top. 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
Two Nod pane fixes.
NodComposerTextView.sizeThatFitsmeasured by resizing the live text container. SwiftUI also asks for sizes it does not use, and after a narrowing the box was left one line (16pt) tall while the draft wrapped to four (64pt), so only the last line showed. It now measures on a scratch layout and ignores an unbounded proposed width. Typing at a fixed width was never affected, which is why Nod composer: show every line while typing, up to five, then scroll #617's tests passed.#1e1e22, lighter than the near-black canvas beside it.NodStyle.paneBackgroundis nowTheme.canvasBackground; cards and the composer keep their lighter fills.Evidence
RED: xcodebuild test -only-testing NodComposerHeightTests with main's NodComposerView.swift -> exit 65; aDraftStillFitsAfterThePaneNarrows fails for 520 to 360 and 760 to 360 (box 16pt, text 64pt)
GREEN: xcodebuild test -only-testing NodComposerHeightTests and NodChatRenderTests on this branch -> exit 0, 15 tests passed
REGRESSION: xcodebuild test (full graphcode scheme) -> 2239 tests, 1 failure in MessageDeliveryTests.aSessionWhoseTaskEndedIsNeverTypedInto, which fails identically on main; make check -> exit 0
Headless renders (NSHostingView) of the composer at 360/520/760pt and after each resize show the whole draft; the pane renders on the canvas tone.