From 69b7e4ffabe488a1e678c4ad4081776c5bf3e20c Mon Sep 17 00:00:00 2001 From: Tandy Date: Fri, 13 Nov 2026 09:50:34 -0600 Subject: [PATCH 1/5] The half under the fold is a desk, not empty space Half-folded like a laptop, the iPhone Duo reserved the whole bottom half for the message box: with no keyboard up that left the composer and the tab bar centred in a slab of nothing. The deck now says what the agent is doing and keeps New chat and Switch agent in reach above the message box, which sits at the bottom of the deck by the thumbs. Typing still gives the message box the keyboard. --- Bighelp/Chat/ChatView.swift | 91 +++++++++++++++++++++++++-- BighelpUITests/DuoLayoutUITests.swift | 10 +++ 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/Bighelp/Chat/ChatView.swift b/Bighelp/Chat/ChatView.swift index e4dba687..57272483 100644 --- a/Bighelp/Chat/ChatView.swift +++ b/Bighelp/Chat/ChatView.swift @@ -546,19 +546,25 @@ struct ChatView: View { // and the bar keep their own height. Spacer(minLength: headerHeight).layoutPriority(laptopDeckHeight > 0 ? 1 : 0) VStack(spacing: 0) { - // Half-folded like a laptop: everything under the fold is the message box's. - // Typing, it rests on the keyboard; otherwise it sits just under the fold. + // Half-folded like a laptop, the half under the fold is the desk: the message box + // sits just under the fold, by the hinge and above the keyboard, and the tray + // under it says what the agent is doing and keeps the usual next moves in reach, + // so that half of the screen works instead of standing empty. if laptopDeckHeight > 0, isDraftFocused { Spacer(minLength: 0) } composer .fixedSize(horizontal: false, vertical: !(referenceHub ?? fallbackReferenceHub).isPresented) #if targetEnvironment(macCatalyst) .popover(isPresented: sessionControlsPresented(from: .composer)) { macSessionControls } #endif - if laptopDeckHeight > 0, !isDraftFocused { Spacer(minLength: 0) } + if laptopDeckHeight > 0, !isDraftFocused { + laptopDeckTray + .frame(maxHeight: .infinity, alignment: .top) + } newChatChoices } - // The messages stop at the fold: the timeline keeps clear of all of this. - .frame(minHeight: laptopDeckHeight) + // The messages stop at the fold: the timeline keeps clear of all of this, and the + // message box starts at the fold itself. + .frame(minHeight: laptopDeckHeight, alignment: .top) // The Skills and commands list takes the room under the header before the spacer // does. Offered an equal share, a long list showed about two rows. .layoutPriority((referenceHub ?? fallbackReferenceHub).isPresented && laptopDeckHeight == 0 ? 1 : 0) @@ -664,6 +670,81 @@ struct ChatView: View { }) } + /// The desk under the fold on the iPhone Duo: who is working and on what, then the two moves a + /// person makes between turns. It fills the half of the screen the message box leaves, so the + /// laptop pose reads on top and acts on the bottom instead of leaving a slab of nothing. + @ViewBuilder + private var laptopDeckTray: some View { + VStack(spacing: BighelpTokens.space12) { + Spacer(minLength: 0) + if model.liveActivityKind != .idle { + HStack(spacing: BighelpTokens.space12) { + AgentLiveAvatar(agentID: homeAgentID, displayName: agentName, + imageURL: resolvedIdentityParticipants.first?.imageURL, + activity: model.liveActivityKind, size: 44) + VStack(alignment: .leading, spacing: 2) { + Text(agentName) + .bighelpFont(.label, weight: .semibold) + .foregroundStyle(theme.primaryText) + Text(model.liveActivityKind.label) + .bighelpFont(.metadata) + .foregroundStyle(theme.secondaryText) + } + .accessibilityElement(children: .combine) + Spacer(minLength: 0) + } + .padding(.horizontal, BighelpTokens.space16) + .padding(.vertical, BighelpTokens.space12) + .background(theme.surface, + in: RoundedRectangle(cornerRadius: BighelpTokens.radius16, style: .continuous)) + .accessibilityElement(children: .contain) + .accessibilityIdentifier("chat.laptop.activity") + } else { + // Nothing to report, so the desk is the agent itself: the same face the home carries, + // standing where the empty half of the screen would be. + VStack(spacing: BighelpTokens.space8) { + AgentLiveAvatar(agentID: homeAgentID, displayName: agentName, + imageURL: resolvedIdentityParticipants.first?.imageURL, + activity: .idle, size: 132) + Text(AgentActivityKind.idle.label) + .bighelpFont(.metadata) + .foregroundStyle(theme.secondaryText) + } + .accessibilityElement(children: .contain) + .accessibilityIdentifier("chat.laptop.agent") + } + HStack(spacing: BighelpTokens.space8) { + laptopDeckAction(String(localized: "New chat"), systemImage: "square.and.pencil", + identifier: "chat.laptop.new-chat", action: startNewChatFromBar) + laptopDeckAction(String(localized: "Switch agent"), systemImage: "arrow.left.arrow.right", + identifier: "chat.laptop.switch-agent", action: pickAgentsFromBar) + } + Spacer(minLength: 0) + } + .frame(maxWidth: .infinity) + .padding(.horizontal, BighelpTokens.space16) + .padding(.top, BighelpTokens.space12) + // A container element, so the tray's own id doesn't land on its buttons: an accessibility + // modifier on a plain container is applied to every child, and would replace theirs. + .accessibilityElement(children: .contain) + .accessibilityIdentifier("chat.laptop.deck") + } + + private func laptopDeckAction(_ title: String, systemImage: String, identifier: String, + action: @escaping () -> Void) -> some View { + Button(action: action) { + Label(title, systemImage: systemImage) + .labelStyle(.titleAndIcon) + .bighelpFont(.label, weight: .semibold) + .foregroundStyle(theme.primaryText) + .padding(.horizontal, BighelpTokens.space12) + .padding(.vertical, 10) + .bighelpNavigationGlass(in: Capsule(), isInteractive: true) + } + .buttonStyle(.bighelpTilePress) + .accessibilityIdentifier(identifier) + } + private var composer: some View { ChatComposerHost( model: model, diff --git a/BighelpUITests/DuoLayoutUITests.swift b/BighelpUITests/DuoLayoutUITests.swift index fe4a2a8a..b13cca3f 100644 --- a/BighelpUITests/DuoLayoutUITests.swift +++ b/BighelpUITests/DuoLayoutUITests.swift @@ -149,12 +149,22 @@ final class DuoLayoutUITests: BighelpUITestCase { let window = app.windows.firstMatch.frame XCTAssertGreaterThan(field.frame.minY, window.midY, "The message box sits under the fold") XCTAssertLessThan(field.frame.minY, window.midY + 120, "Just under it") + // The half under the fold is a desk: the agent's state and the two usual moves, under the + // message box, instead of an empty slab. + XCTAssertTrue(element("chat.laptop.deck", in: app).waitForExistence(timeout: 5), + "The half under the fold carries the desk") + let newChat = element("chat.laptop.new-chat", in: app) + XCTAssertTrue(newChat.waitForExistence(timeout: 5), "New chat is in reach under the fold") + XCTAssertGreaterThan(newChat.frame.minY, field.frame.maxY, "The desk sits under the message box") + XCTAssertLessThan(newChat.frame.maxY, window.maxY, "and on screen") sleep(1) save("laptop-chat-\(appearance)", app) if appearance == "light" { field.tap() XCTAssertTrue(app.keyboards.firstMatch.waitForExistence(timeout: 5)) XCTAssertGreaterThan(field.frame.minY, window.midY, "Typing, it rests on the keyboard, still under the fold") + XCTAssertFalse(element("chat.laptop.new-chat", in: app).exists, + "Typing, the desk gets out of the way") save("laptop-typing-light", app) } app.terminate() From d44d1d089f4863b727d58e24c1f99b65fed96eac Mon Sep 17 00:00:00 2001 From: Colt Coan <59135406+promptclickrun@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:42:55 -0600 Subject: [PATCH 2/5] The desk under the fold is the bot and what it's doing, with New chat and Bot page The tray called the chat's old tab bar actions, which are gone, and offered Switch agent, which the app no longer has. It is now a view of its own: the bot's face, large, with the step it is on or how it rests, then New chat and Bot page. A blank New chat and a group chat keep the half clear. Co-Authored-By: Claude Fable 5.2 --- Bighelp.xcodeproj/project.pbxproj | 4 ++ Bighelp/Chat/ChatLaptopDesk.swift | 88 ++++++++++++++++++++++++ Bighelp/Chat/ChatView.swift | 97 +++++---------------------- BighelpUITests/DuoLayoutUITests.swift | 24 ++++--- 4 files changed, 124 insertions(+), 89 deletions(-) create mode 100644 Bighelp/Chat/ChatLaptopDesk.swift diff --git a/Bighelp.xcodeproj/project.pbxproj b/Bighelp.xcodeproj/project.pbxproj index 0b270616..78010fe0 100644 --- a/Bighelp.xcodeproj/project.pbxproj +++ b/Bighelp.xcodeproj/project.pbxproj @@ -932,6 +932,7 @@ 6FA50C9ADBD201A9D77B2E1C /* ChatTextMarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF83F20547EB11C1B2BAB1BD /* ChatTextMarker.swift */; }; 6FB368A14E2F3F813298EDAA /* FleetSettingsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BD21A8FBBCA9AF95D546F15 /* FleetSettingsUITests.swift */; }; 6FE297B76DAD91CF09B8B40A /* BighelpActivityRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69F4FF8F2C5673B2E05F45CE /* BighelpActivityRow.swift */; }; + 7041695D14C809368E35D054 /* ChatLaptopDesk.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BEAC6C4370E624B097BE5A /* ChatLaptopDesk.swift */; }; 7047D95050E74D28B28CB9D6 /* NativeSessionResumeProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFEBF171A2809E675EBF2D40 /* NativeSessionResumeProgress.swift */; }; 70521F46E1A2AA90EC8031B0 /* ChatTimelineBuiltRows.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B5925D63EDF3AE6245630FA /* ChatTimelineBuiltRows.swift */; }; 705A1F88DB322FF588173B53 /* PermissionCenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A3548EA837BB0A869121EE7 /* PermissionCenterTests.swift */; }; @@ -3489,6 +3490,7 @@ 916705243B4D5728DB566B02 /* BighelpNotificationErrorCodes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BighelpNotificationErrorCodes.swift; sourceTree = ""; }; 916BA766E72BFBA579E1C614 /* AgentGoalsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgentGoalsView.swift; sourceTree = ""; }; 918B96E497E5895E812E63C3 /* BighelpRealtimeAudioPeer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BighelpRealtimeAudioPeer.swift; sourceTree = ""; }; + 91BEAC6C4370E624B097BE5A /* ChatLaptopDesk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatLaptopDesk.swift; sourceTree = ""; }; 91CB0EFA808DC2BC808C7B83 /* BighelpNotificationHostTrust.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BighelpNotificationHostTrust.swift; sourceTree = ""; }; 91D2DA6892F98C5DD30FDD10 /* DirectHermesAgentDirectoryClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectHermesAgentDirectoryClient.swift; sourceTree = ""; }; 91D4F8D182EE30C5C7CDB870 /* ChatToolPhrase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatToolPhrase.swift; sourceTree = ""; }; @@ -7256,6 +7258,7 @@ 3B3C1B0A38B1107EC89B232D /* ChatIdentityView.swift */, F01086DE6C5EB56F04C92807 /* ChatImageStack.swift */, 27A0BC27ED7C315F7B5D4FF1 /* ChatInterimReplies.swift */, + 91BEAC6C4370E624B097BE5A /* ChatLaptopDesk.swift */, 0F68F20978C0AB2C937FE171 /* ChatLiveWorkView.swift */, 0E9FCA4F43E5BEE8D4C5207C /* ChatMarkdownDocument.swift */, BC9944B9527C263AE1CAA797 /* ChatMarkdownTableView.swift */, @@ -8361,6 +8364,7 @@ ADD8D85A3D85748C039E35F3 /* ChatIdentityView.swift in Sources */, 7BFD261066C0ABA64B622CC9 /* ChatImageStack.swift in Sources */, A2C28C3449C8F395268E1BF0 /* ChatInterimReplies.swift in Sources */, + 7041695D14C809368E35D054 /* ChatLaptopDesk.swift in Sources */, 4B821EE1EFD8C51E964F110C /* ChatLayoutSettingsView.swift in Sources */, 0F6AB98EDF03574F11ECA589 /* ChatLiveWorkView.swift in Sources */, FF237C3721857F6489DE324D /* ChatMarkdownDocument.swift in Sources */, diff --git a/Bighelp/Chat/ChatLaptopDesk.swift b/Bighelp/Chat/ChatLaptopDesk.swift new file mode 100644 index 00000000..0cc95bec --- /dev/null +++ b/Bighelp/Chat/ChatLaptopDesk.swift @@ -0,0 +1,88 @@ +import SwiftUI + +/// The half under the fold of a chat on the iPhone Duo, half-folded like a small laptop +/// (`BighelpScreenGeometry.isLaptop`): the chat's bot, large, with what it is doing now, then New +/// chat and Bot page. `ChatView` shows it under the message box while the keyboard is down, in a +/// one-bot chat that has a message. Typing, a blank New chat and a group chat keep the half clear. +/// +/// A view of its own, so the bot's live step is read here and not in `ChatView`'s body. +struct ChatLaptopDesk: View { + let model: ChatModel + let agentID: String + let name: String + let imageURL: URL? + let onNewChat: () -> Void + let onBotPage: () -> Void + @BighelpThemeReader private var theme + + var body: some View { + let activity = model.liveActivityKind + VStack(spacing: BighelpTokens.space20) { + Spacer(minLength: 0) + // At large text the face moves beside its lines, so the buttons stay on screen. + ViewThatFits(in: .vertical) { + VStack(spacing: BighelpTokens.space8) { + face(activity, size: 112) + lines(activity, alignment: .center) + } + HStack(spacing: BighelpTokens.space12) { + face(activity, size: 56) + lines(activity, alignment: .leading) + } + } + .accessibilityElement(children: .combine) + .accessibilityIdentifier("chat.laptop.status") + // Side by side, or one over the other when the two names don't fit. + ViewThatFits(in: .horizontal) { + HStack(spacing: BighelpTokens.space12) { actions } + VStack(spacing: BighelpTokens.space8) { actions } + } + Spacer(minLength: 0) + } + .frame(maxWidth: .infinity) + .padding(.horizontal, BighelpTokens.space16) + .padding(.top, BighelpTokens.space12) + // A container, so its id doesn't replace the buttons' own. + .accessibilityElement(children: .contain) + .accessibilityIdentifier("chat.laptop.desk") + } + + private func face(_ activity: AgentActivityKind, size: CGFloat) -> some View { + AgentLiveAvatar(agentID: agentID, displayName: name, imageURL: imageURL, activity: activity, size: size) + } + + private func lines(_ activity: AgentActivityKind, alignment: HorizontalAlignment) -> some View { + VStack(alignment: alignment, spacing: 2) { + Text(name) + .font(.bighelp(.title3, weight: .semibold)) + .foregroundStyle(theme.primaryText) + // The step it is on, in its own words, else the kind of work. Never a guess. + Text(model.liveStepPhrase ?? activity.label) + .bighelpFont(.label) + .foregroundStyle(theme.secondaryText) + } + .multilineTextAlignment(alignment == .center ? .center : .leading) + } + + @ViewBuilder + private var actions: some View { + action("New chat", systemImage: "square.and.pencil", identifier: "chat.laptop.new-chat", action: onNewChat) + action("Bot page", systemImage: "person.crop.circle", identifier: "chat.laptop.bot-page", action: onBotPage) + } + + private func action(_ title: LocalizedStringKey, systemImage: String, identifier: String, + action: @escaping () -> Void) -> some View { + Button(action: action) { + Label(title, systemImage: systemImage) + .labelStyle(.titleAndIcon) + .bighelpFont(.label, weight: .semibold) + .foregroundStyle(theme.primaryText) + .padding(.horizontal, BighelpTokens.space16) + .frame(minHeight: BighelpTokens.hitTarget) + .contentShape(Capsule()) + .bighelpNavigationGlass(in: Capsule(), isInteractive: true) + } + .buttonStyle(.bighelpTilePress) + .accessibilityIdentifier(identifier) + } +} diff --git a/Bighelp/Chat/ChatView.swift b/Bighelp/Chat/ChatView.swift index 57272483..8e0009f5 100644 --- a/Bighelp/Chat/ChatView.swift +++ b/Bighelp/Chat/ChatView.swift @@ -547,9 +547,8 @@ struct ChatView: View { Spacer(minLength: headerHeight).layoutPriority(laptopDeckHeight > 0 ? 1 : 0) VStack(spacing: 0) { // Half-folded like a laptop, the half under the fold is the desk: the message box - // sits just under the fold, by the hinge and above the keyboard, and the tray - // under it says what the agent is doing and keeps the usual next moves in reach, - // so that half of the screen works instead of standing empty. + // sits just under the fold, and the bot with what it's doing fills the rest + // (`ChatLaptopDesk`). Typing, the box rests on the keyboard instead. if laptopDeckHeight > 0, isDraftFocused { Spacer(minLength: 0) } composer .fixedSize(horizontal: false, vertical: !(referenceHub ?? fallbackReferenceHub).isPresented) @@ -557,8 +556,15 @@ struct ChatView: View { .popover(isPresented: sessionControlsPresented(from: .composer)) { macSessionControls } #endif if laptopDeckHeight > 0, !isDraftFocused { - laptopDeckTray - .frame(maxHeight: .infinity, alignment: .top) + if showsLaptopDesk { + ChatLaptopDesk(model: model, agentID: homeAgentID, name: agentName, + imageURL: resolvedIdentityParticipants.first?.imageURL, + onNewChat: onNewChatTap, + onBotPage: { homeChrome.onProfile(homeAgentID) }) + .frame(maxHeight: .infinity, alignment: .top) + } else { + Spacer(minLength: 0) + } } newChatChoices } @@ -598,6 +604,12 @@ struct ChatView: View { return max(0, safeBottomInWindow - fold.maxY) } + /// The desk shows for a chat with one bot that the shell pushed. A blank New chat keeps its To + /// row, people list and choices, and a group chat has no one bot to show. + private var showsLaptopDesk: Bool { + homeChrome.isPushedChat && !model.isBotMode && newChat == nil + } + /// One home: the bots to pick from, over a new chat's empty messages until something is sent. private var showsNewChatPeople: Bool { newChat?.people != nil } @@ -670,81 +682,6 @@ struct ChatView: View { }) } - /// The desk under the fold on the iPhone Duo: who is working and on what, then the two moves a - /// person makes between turns. It fills the half of the screen the message box leaves, so the - /// laptop pose reads on top and acts on the bottom instead of leaving a slab of nothing. - @ViewBuilder - private var laptopDeckTray: some View { - VStack(spacing: BighelpTokens.space12) { - Spacer(minLength: 0) - if model.liveActivityKind != .idle { - HStack(spacing: BighelpTokens.space12) { - AgentLiveAvatar(agentID: homeAgentID, displayName: agentName, - imageURL: resolvedIdentityParticipants.first?.imageURL, - activity: model.liveActivityKind, size: 44) - VStack(alignment: .leading, spacing: 2) { - Text(agentName) - .bighelpFont(.label, weight: .semibold) - .foregroundStyle(theme.primaryText) - Text(model.liveActivityKind.label) - .bighelpFont(.metadata) - .foregroundStyle(theme.secondaryText) - } - .accessibilityElement(children: .combine) - Spacer(minLength: 0) - } - .padding(.horizontal, BighelpTokens.space16) - .padding(.vertical, BighelpTokens.space12) - .background(theme.surface, - in: RoundedRectangle(cornerRadius: BighelpTokens.radius16, style: .continuous)) - .accessibilityElement(children: .contain) - .accessibilityIdentifier("chat.laptop.activity") - } else { - // Nothing to report, so the desk is the agent itself: the same face the home carries, - // standing where the empty half of the screen would be. - VStack(spacing: BighelpTokens.space8) { - AgentLiveAvatar(agentID: homeAgentID, displayName: agentName, - imageURL: resolvedIdentityParticipants.first?.imageURL, - activity: .idle, size: 132) - Text(AgentActivityKind.idle.label) - .bighelpFont(.metadata) - .foregroundStyle(theme.secondaryText) - } - .accessibilityElement(children: .contain) - .accessibilityIdentifier("chat.laptop.agent") - } - HStack(spacing: BighelpTokens.space8) { - laptopDeckAction(String(localized: "New chat"), systemImage: "square.and.pencil", - identifier: "chat.laptop.new-chat", action: startNewChatFromBar) - laptopDeckAction(String(localized: "Switch agent"), systemImage: "arrow.left.arrow.right", - identifier: "chat.laptop.switch-agent", action: pickAgentsFromBar) - } - Spacer(minLength: 0) - } - .frame(maxWidth: .infinity) - .padding(.horizontal, BighelpTokens.space16) - .padding(.top, BighelpTokens.space12) - // A container element, so the tray's own id doesn't land on its buttons: an accessibility - // modifier on a plain container is applied to every child, and would replace theirs. - .accessibilityElement(children: .contain) - .accessibilityIdentifier("chat.laptop.deck") - } - - private func laptopDeckAction(_ title: String, systemImage: String, identifier: String, - action: @escaping () -> Void) -> some View { - Button(action: action) { - Label(title, systemImage: systemImage) - .labelStyle(.titleAndIcon) - .bighelpFont(.label, weight: .semibold) - .foregroundStyle(theme.primaryText) - .padding(.horizontal, BighelpTokens.space12) - .padding(.vertical, 10) - .bighelpNavigationGlass(in: Capsule(), isInteractive: true) - } - .buttonStyle(.bighelpTilePress) - .accessibilityIdentifier(identifier) - } - private var composer: some View { ChatComposerHost( model: model, diff --git a/BighelpUITests/DuoLayoutUITests.swift b/BighelpUITests/DuoLayoutUITests.swift index b13cca3f..e8ff6faa 100644 --- a/BighelpUITests/DuoLayoutUITests.swift +++ b/BighelpUITests/DuoLayoutUITests.swift @@ -149,23 +149,29 @@ final class DuoLayoutUITests: BighelpUITestCase { let window = app.windows.firstMatch.frame XCTAssertGreaterThan(field.frame.minY, window.midY, "The message box sits under the fold") XCTAssertLessThan(field.frame.minY, window.midY + 120, "Just under it") - // The half under the fold is a desk: the agent's state and the two usual moves, under the - // message box, instead of an empty slab. - XCTAssertTrue(element("chat.laptop.deck", in: app).waitForExistence(timeout: 5), + // The half under the fold is a desk: the bot and what it's doing, then New chat and Bot + // page, under the message box. + XCTAssertTrue(element("chat.laptop.desk", in: app).waitForExistence(timeout: 5), "The half under the fold carries the desk") - let newChat = element("chat.laptop.new-chat", in: app) - XCTAssertTrue(newChat.waitForExistence(timeout: 5), "New chat is in reach under the fold") - XCTAssertGreaterThan(newChat.frame.minY, field.frame.maxY, "The desk sits under the message box") - XCTAssertLessThan(newChat.frame.maxY, window.maxY, "and on screen") + XCTAssertTrue(element("chat.laptop.status", in: app).exists, "It says what the bot is doing") + for id in ["chat.laptop.new-chat", "chat.laptop.bot-page"] { + let button = app.buttons[id] + XCTAssertTrue(button.waitForExistence(timeout: 5), "\(id) is in reach under the fold") + XCTAssertGreaterThan(button.frame.minY, field.frame.maxY, "\(id) sits under the message box") + XCTAssertLessThan(button.frame.maxY, window.maxY, "\(id) is on screen") + } sleep(1) save("laptop-chat-\(appearance)", app) if appearance == "light" { field.tap() XCTAssertTrue(app.keyboards.firstMatch.waitForExistence(timeout: 5)) XCTAssertGreaterThan(field.frame.minY, window.midY, "Typing, it rests on the keyboard, still under the fold") - XCTAssertFalse(element("chat.laptop.new-chat", in: app).exists, - "Typing, the desk gets out of the way") + XCTAssertFalse(element("chat.laptop.desk", in: app).exists, "Typing, the desk gets out of the way") save("laptop-typing-light", app) + } else { + app.buttons["chat.laptop.bot-page"].tap() + XCTAssertTrue(app.buttons["simple-bots.profile.more"].waitForExistence(timeout: 10), + "Bot page opens the bot's page") } app.terminate() } From 0c315625270b0668919a5656b8c33d61c0477c50 Mon Sep 17 00:00:00 2001 From: Colt Coan <59135406+promptclickrun@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:51:06 -0600 Subject: [PATCH 3/5] The desk shows the same face as the chat's header Co-Authored-By: Claude Fable 5.2 --- Bighelp/Chat/ChatLaptopDesk.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bighelp/Chat/ChatLaptopDesk.swift b/Bighelp/Chat/ChatLaptopDesk.swift index 0cc95bec..0091726b 100644 --- a/Bighelp/Chat/ChatLaptopDesk.swift +++ b/Bighelp/Chat/ChatLaptopDesk.swift @@ -47,8 +47,11 @@ struct ChatLaptopDesk: View { .accessibilityIdentifier("chat.laptop.desk") } + /// The face the chat's header shows, so the bot looks the same above and below the fold. Its + /// line names the step; the face only shows that it works. private func face(_ activity: AgentActivityKind, size: CGFloat) -> some View { - AgentLiveAvatar(agentID: agentID, displayName: name, imageURL: imageURL, activity: activity, size: size) + SimpleBotFace(agentID: agentID, name: name, imageURL: imageURL, size: size, + activity: activity == .idle ? nil : .working(tool: nil)) } private func lines(_ activity: AgentActivityKind, alignment: HorizontalAlignment) -> some View { From fcca3ab6d1bbd1b394387051e23d4cfadecac42b Mon Sep 17 00:00:00 2001 From: Colt Coan <59135406+promptclickrun@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:57:19 -0600 Subject: [PATCH 4/5] VoiceOver says the desk's bot once Co-Authored-By: Claude Fable 5.2 --- Bighelp/Chat/ChatLaptopDesk.swift | 2 ++ BighelpUITests/DuoLayoutUITests.swift | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Bighelp/Chat/ChatLaptopDesk.swift b/Bighelp/Chat/ChatLaptopDesk.swift index 0091726b..889cc168 100644 --- a/Bighelp/Chat/ChatLaptopDesk.swift +++ b/Bighelp/Chat/ChatLaptopDesk.swift @@ -52,6 +52,8 @@ struct ChatLaptopDesk: View { private func face(_ activity: AgentActivityKind, size: CGFloat) -> some View { SimpleBotFace(agentID: agentID, name: name, imageURL: imageURL, size: size, activity: activity == .idle ? nil : .working(tool: nil)) + // Its name is in the lines beside it: VoiceOver would say it twice. + .accessibilityHidden(true) } private func lines(_ activity: AgentActivityKind, alignment: HorizontalAlignment) -> some View { diff --git a/BighelpUITests/DuoLayoutUITests.swift b/BighelpUITests/DuoLayoutUITests.swift index e8ff6faa..02a686f8 100644 --- a/BighelpUITests/DuoLayoutUITests.swift +++ b/BighelpUITests/DuoLayoutUITests.swift @@ -153,7 +153,8 @@ final class DuoLayoutUITests: BighelpUITestCase { // page, under the message box. XCTAssertTrue(element("chat.laptop.desk", in: app).waitForExistence(timeout: 5), "The half under the fold carries the desk") - XCTAssertTrue(element("chat.laptop.status", in: app).exists, "It says what the bot is doing") + XCTAssertEqual(element("chat.laptop.status", in: app).label, "Avery Park, Here for you", + "It says who the bot is and what it's doing, once") for id in ["chat.laptop.new-chat", "chat.laptop.bot-page"] { let button = app.buttons[id] XCTAssertTrue(button.waitForExistence(timeout: 5), "\(id) is in reach under the fold") From d92942cd2d68ea0c757ecdb16e24f6e4cffdbdde Mon Sep 17 00:00:00 2001 From: Colt Coan <59135406+promptclickrun@users.noreply.github.com> Date: Sat, 14 Nov 2026 04:00:22 -0600 Subject: [PATCH 5/5] The guide says what the Duo's lower half shows and that it has no island Co-Authored-By: Claude Fable 5.2 --- AGENTS.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c79ed1f5..037ef643 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -939,7 +939,12 @@ sections can crash only on devices ("Thread stack size exceeded"). (`splitColumnWidth`), and what it opens is pushed on the app's one stack beside it, so `path`, the active chat and every top-of-stack rule work as on iPhone. The list is the shell's own view, drawn again from its stores (`BighelpLiveColumn`); the stack's root shows `BighelpSplitPlaceholder` instead of a second copy of the list. -- Upright with the fold active (`isLaptop`): `ChatView` keeps everything under the fold for the message box. +- Upright with the fold active (`isLaptop`): `ChatView` keeps everything under the fold for the message box. Under + the box, a chat with one bot shows the bot's face, what it's doing, New chat and Bot page (`ChatLaptopDesk`). + Typing, a blank New chat and a group chat keep that half clear. +- The app draws no island of its own on the Duo (`AgentIslandAvailability`): the camera and the status are in the + trailing column, so nothing is across the top to cover. The connection pill and the drive overlay take their + places for a phone without an island there. - The Duo's simulator needs the iOS 27.1 runtime and starts folded; tests can't open or fold it, and DeviceHub's controls don't take scripted clicks. `-bighelp.debug.screen-posture` and `-bighelp.debug.fold-halfway` show the open and half-folded layouts on an iPad simulator (`DuoLayoutUITests`).