Skip to content

Nod pane: keep the draft in view after narrowing, and use the canvas background - #620

Merged
scgopi merged 2 commits into
mainfrom
fix/nod-composer-width
Oct 3, 2026
Merged

scgopi merged 2 commits into
mainfrom
fix/nod-composer-width

Conversation

@scgopi

@scgopi scgopi commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Two Nod pane fixes.

  • Draft cut off after the pane narrows. NodComposerTextView.sizeThatFits measured 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.
  • Pane background. The chat pane was #1e1e22, lighter than the near-black canvas beside it. NodStyle.paneBackground is now Theme.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.

scgopi and others added 2 commits October 3, 2026 16:19
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 <[email protected]>
Signed-off-by: scgopi <[email protected]>
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 <[email protected]>
Signed-off-by: scgopi <[email protected]>
@scgopi
scgopi merged commit 60cacf0 into main Oct 3, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant