Merge nucleic/clever-dewy-koala-vizm into dev

This commit is contained in:
2026-07-21 18:44:25 -07:00
parent f48ec7f621
commit 02574a764c
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -127,6 +127,8 @@ struct ChatInputField: NSViewRepresentable {
scroll.hasVerticalScroller = true
scroll.hasHorizontalScroller = false
scroll.autohidesScrollers = true
// Overlay from the start; the override above keeps AppKit from switching it back.
scroll.scrollerStyle = .overlay
context.coordinator.textView = textView
context.coordinator.scrollView = scroll
@@ -250,6 +252,22 @@ struct ChatInputField: NSViewRepresentable {
final class HeightTrackingScrollView: NSScrollView {
var onLayout: (() -> Void)?
/// Force overlay-style scrollers, rejecting the system's legacy style ("Show scroll
/// bars: Always", common with a mouse attached). A legacy scroller consumes layout
/// width when it appears, which re-wraps the text one line taller, which grows the
/// fitted height, which makes the content fit so the auto-hiding scroller disappears,
/// which widens the text back, re-wraps it shorter, shrinks the height, and brings the
/// scroller back an endless oscillation that reads as the floating (N/N) composer
/// bouncing/creeping downward with its text squashed (the sheet window resizes with
/// every cycle), and as a subtler jitter in the inline composers. Overlay scrollers
/// take no layout width, so scroller visibility can never feed back into text wrap.
/// AppKit re-applies the user's preferred style after init and on preference changes
/// through this setter, so coercing it here keeps the style pinned for good.
override var scrollerStyle: NSScroller.Style {
get { super.scrollerStyle }
set { _ = newValue; super.scrollerStyle = .overlay }
}
override func layout() {
super.layout()
onLayout?()
+1 -1
View File
@@ -95,7 +95,7 @@ struct NewChatComposer: View {
composerCore
}
.padding(20)
.frame(width: 640)
.frame(width: 720)
// The destination selector replaced the Cancel button on the project row, so carry
// Cancel's Escape-to-dismiss here (clicking outside the panel also dismisses see
// NewChatComposerSheet).