From 12cc777e3cc66dbf1b7a54ebaed805560debc73f Mon Sep 17 00:00:00 2001 From: Everett Date: Thu, 19 Nov 2026 01:06:28 -0800 Subject: [PATCH] Mac editor: the Copilot panel's Apply button and manual-edit row fit the panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seen in a signed build: "Apply to Editor" was cut off to "Apply to E…" and "Go to This Version" wrapped beside "Code from the editor". The button is now "Apply" (the accessibility label keeps the full name) and the row is two lines. Co-Authored-By: Claude Fable 5.2 --- docs/ai-conversation.md | 2 +- .../AIGenerate/AIConversationTurnsView.swift | 3 ++- macOS/ScriptWidgetMac/Editor/EditorPanelView.swift | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/ai-conversation.md b/docs/ai-conversation.md index d9fd027c..fbffb2da 100644 --- a/docs/ai-conversation.md +++ b/docs/ai-conversation.md @@ -43,7 +43,7 @@ The **+** button holds Skills and examples. Skills chosen there apply to every t The **Copilot** tab of the editor is the conversation about the open widget. A widget made in the AI window continues the conversation it was made in; any other widget starts one when you first write to it. - The AI works on a copy of the widget. Each version it makes is drawn small in the panel, and the widget and the editor stay as they are. -- **Apply to Editor** writes the version on screen into the open document and saves it. If the document changed since the panel last looked, nothing is written and the conversation continues from the editor's code instead. Undo in the editor restores what was there. +- **Apply** writes the version on screen into the open document and saves it. If the document changed since the panel last looked, nothing is written and the conversation continues from the editor's code instead. Undo in the editor restores what was there. - Code the conversation has not seen (you typed in the editor, or used the Layout panel) is taken over as a version marked "Code from the editor" before your next request, so the AI always changes what you see. - The copy contains the widget's other files, so a widget that imports its own files or reads its own images runs as it does in the widget. A widget with more than 300 files or 20 MB is too large for this, and the panel says so. - The copy runs with the widget's own permissions. If a version declares a host the widget may not contact yet, Apply asks first and adds the network permission for that host to the widget. diff --git a/macOS/ScriptWidgetMac/AIGenerate/AIConversationTurnsView.swift b/macOS/ScriptWidgetMac/AIGenerate/AIConversationTurnsView.swift index e31a31d9..1fcc044b 100644 --- a/macOS/ScriptWidgetMac/AIGenerate/AIConversationTurnsView.swift +++ b/macOS/ScriptWidgetMac/AIGenerate/AIConversationTurnsView.swift @@ -29,7 +29,8 @@ struct AIConversationTurnsView: View { } private func manualEdit(_ turn: AIConversationTurn) -> some View { - HStack(spacing: 8) { + // Two lines: side by side they do not fit the editor's narrow panel. + VStack(alignment: .leading, spacing: 3) { Label("Code from the editor", systemImage: "pencil.line") .font(.caption) .foregroundStyle(.secondary) diff --git a/macOS/ScriptWidgetMac/Editor/EditorPanelView.swift b/macOS/ScriptWidgetMac/Editor/EditorPanelView.swift index 72349715..5de8c37c 100644 --- a/macOS/ScriptWidgetMac/Editor/EditorPanelView.swift +++ b/macOS/ScriptWidgetMac/Editor/EditorPanelView.swift @@ -353,11 +353,15 @@ private struct StudioCopilotConversationView: View { shownCode = ShownCode(title: "Version \(conversation.currentVersion?.number ?? 0)", code: session.currentSource) } .controlSize(.small) - Button("Apply to Editor", systemImage: "checkmark") { + // The panel is narrow: a longer title is cut off. + Button("Apply", systemImage: "checkmark") { if hostsToAllow.isEmpty { apply(allowingHosts: false) } else { confirmingNetwork = true } } .buttonStyle(.borderedProminent) .controlSize(.small) + .fixedSize() + .help("Write this version into the editor") + .accessibilityLabel("Apply to Editor") .disabled(isApplying || !canWork) } .padding(10)