fix: tidy web chat composer layout

This commit is contained in:
Peter Steinberger
2026-01-01 11:04:40 +01:00
parent 6ea10dd153
commit 3addd3420b
2 changed files with 28 additions and 28 deletions

View File

@@ -41,6 +41,7 @@
- Android Chat UI: use `onPrimary` for user bubble text to preserve contrast (thanks @Syhids). - Android Chat UI: use `onPrimary` for user bubble text to preserve contrast (thanks @Syhids).
- Control UI: sync sidebar navigation with the URL for deep-linking, and auto-scroll chat to the latest message. - Control UI: sync sidebar navigation with the URL for deep-linking, and auto-scroll chat to the latest message.
- Control UI: disable Web Chat + Talk when no iOS/Android node is connected; refreshed Web Chat styling and keyboard send. - Control UI: disable Web Chat + Talk when no iOS/Android node is connected; refreshed Web Chat styling and keyboard send.
- macOS Web Chat: fix composer layout so the connection pill and send button stay inside the input field.
- macOS: bundle Control UI assets into the app relay so the packaged app can serve them (thanks @mbelinky). - macOS: bundle Control UI assets into the app relay so the packaged app can serve them (thanks @mbelinky).
- Talk Mode: wait for chat history to surface the assistant reply before starting TTS (macOS/iOS/Android). - Talk Mode: wait for chat history to surface the assistant reply before starting TTS (macOS/iOS/Android).
- iOS Talk Mode: fix chat completion wait to time out even if no events arrive (prevents “Thinking…” hangs). - iOS Talk Mode: fix chat completion wait to time out even if no events arrive (prevents “Thinking…” hangs).

View File

@@ -131,15 +131,15 @@ struct ClawdisChatComposer: View {
} }
private var editor: some View { private var editor: some View {
RoundedRectangle(cornerRadius: 12, style: .continuous) VStack(alignment: .leading, spacing: 8) {
.strokeBorder(ClawdisChatTheme.composerBorder)
.background(
RoundedRectangle(cornerRadius: 12, style: .continuous)
.fill(ClawdisChatTheme.composerField))
.overlay {
VStack(alignment: .leading, spacing: 4) {
self.editorOverlay self.editorOverlay
HStack(alignment: .bottom, spacing: 6) {
Rectangle()
.fill(ClawdisChatTheme.divider)
.frame(height: 1)
.padding(.horizontal, 2)
HStack(alignment: .center, spacing: 8) {
if self.showsConnectionPill { if self.showsConnectionPill {
self.connectionPill self.connectionPill
} }
@@ -147,12 +147,15 @@ struct ClawdisChatComposer: View {
self.sendButton self.sendButton
} }
} }
} .padding(.horizontal, 10)
.padding(.vertical, 8)
.background(
RoundedRectangle(cornerRadius: 12, style: .continuous)
.fill(ClawdisChatTheme.composerField)
.overlay(
RoundedRectangle(cornerRadius: 12, style: .continuous)
.strokeBorder(ClawdisChatTheme.composerBorder)))
.padding(self.editorPadding) .padding(self.editorPadding)
.frame(
minHeight: self.editorMinHeight,
idealHeight: self.editorMinHeight,
maxHeight: self.editorMaxHeight)
} }
private var connectionPill: some View { private var connectionPill: some View {
@@ -192,6 +195,10 @@ struct ClawdisChatComposer: View {
TextEditor(text: self.$viewModel.input) TextEditor(text: self.$viewModel.input)
.font(.system(size: 15)) .font(.system(size: 15))
.scrollContentBackground(.hidden) .scrollContentBackground(.hidden)
.frame(
minHeight: self.textMinHeight,
idealHeight: self.textMinHeight,
maxHeight: self.textMaxHeight)
.padding(.horizontal, 4) .padding(.horizontal, 4)
.padding(.vertical, 4) .padding(.vertical, 4)
.focused(self.$isFocused) .focused(self.$isFocused)
@@ -268,14 +275,6 @@ struct ClawdisChatComposer: View {
self.style == .onboarding ? 5 : 6 self.style == .onboarding ? 5 : 6
} }
private var editorMinHeight: CGFloat {
self.style == .onboarding ? 34 : 40
}
private var editorMaxHeight: CGFloat {
self.style == .onboarding ? 60 : 84
}
private var textMinHeight: CGFloat { private var textMinHeight: CGFloat {
self.style == .onboarding ? 24 : 28 self.style == .onboarding ? 24 : 28
} }