Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ change in both repos.
`FleetID`). It is the one switch behind the old all-hosts view and Multi-gateway (the saved key is the old
all-hosts one). Pins live on each bot's own computer; the primary bot is kept on the device
(`simpleBotsMultiPrimary`). Acting on another computer's bot goes through `openFleet`; the Bots view stays
under the Noodle loader (`SimpleBotsOpeningOverlay`, with Cancel) until the bot opens. A computer that
under the lifter loader (`SimpleBotsOpeningOverlay`, with Cancel) until the bot opens. A computer that
doesn't answer gives the selection back to the one the tap came from (`FleetSwitchFallback`), so neither the
app nor its next launch is left on it. While it's on, the other computers stay connected
(`keepsFleetHostsConnected`), through the background grace too, so opening on one is instant.
Expand Down Expand Up @@ -263,7 +263,7 @@ change in both repos.
| `Bighelp/Spatial/` | Vision Pro: the agent in the room (`SpatialAvatarModel`, its volume and voice panel, its Settings section) |
| `BighelpWatch/`, `BighelpWatchShared/`, `Bighelp/Watch/` | The Watch app, the Watch–iPhone wire (`WatchWire`), and the iPhone's `WatchRelay` that answers it |
| `Bighelp/CarPlay/` | CarPlay's hands-free voice chat (`CarPlayVoiceSession`) and its scene |
| `Bighelp/DesignSystem/` | `BighelpTheme`, `BighelpTokens`, glass surfaces, fonts, provider logos, `BighelpDeferredSection`, the Noodle brand and its motions (`Noodle/`), the Thinking control and its looks (`ThinkingSlider/`) |
| `Bighelp/DesignSystem/` | `BighelpTheme`, `BighelpTokens`, glass surfaces, fonts, provider logos, `BighelpDeferredSection`, the lifter brand and its motions (`Lifter/`), the Thinking control and its looks (`ThinkingSlider/`) |
| `Bighelp/Hosts/`, `Bighelp/LiveActivity/`, `Bighelp/Notifications/`, `Bighelp/Shortcuts/` | Host setup, Live Activities, notifications, App Intents |
| `Bighelp/Telemetry/` | Usage and crash numbers (Settings › Help & feedback › Share usage and diagnostics): the client, MetricKit, the switch that also tells hosts |
| `BighelpTests/` (Swift Testing), `BighelpUITests/` (XCUITest) | Tests. The UI test base class `BighelpUITestCase` is in `ReferenceHubUITests.swift` |
Expand Down Expand Up @@ -1267,9 +1267,11 @@ New code uses Bighelp names. Don't "finish" the rename on this list.

### Avatars and art

- The brand is the Noodle (DESIGN.md › Noodle). Its motions are the brand kit's Lottie files in
`Bighelp/Resources/Noodle`, drawn natively by `BighelpNoodleView`, which reads only what the kit's generator
writes. Replace them with the kit's own output, never hand-edited, and check them in the loader gallery.
- The brand is the lifter (DESIGN.md › Lifter). His motions are the brand kit's Lottie files in
`Bighelp/Resources/Lifter`, one for light pages and one for dark, drawn natively by `BighelpLifterView`, which
reads only what the kit writes (shape layers, rectangles, ellipses, paths, fills, strokes, transforms and the
intro, loop and outro markers). Replace them with the kit's own output, never hand-edited, and check them in the
loader gallery. Below 28 points he's the still mark.
- The chat plays one loader at a time, on its newest live folder (`BighelpActivityLoaderFocus`). A new live
indicator in the chat goes through that focus, not its own animation.
- The avatar kit's source is `Design/AvatarKit`. `tools/export_native.py` writes `Bighelp/Resources/AvatarKit.json`,
Expand Down
212 changes: 100 additions & 112 deletions Bighelp.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Bighelp/App/BighelpApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ struct BighelpApp: App {
.environment(\.bighelpUIV2Enabled, settings.uiV2Enabled)
.environment(\.bighelpUIV3Enabled, settings.interfaceVersion == .v3)
.environment(\.nerdModeEnabled, settings.nerdModeEnabled)
.progressViewStyle(BighelpNoodleProgressStyle())
.progressViewStyle(BighelpLifterProgressStyle())
.modifier(BighelpTextSizing())
#if os(visionOS)
.modifier(SpatialAvatarMainWindowHooks(model: spatialAvatar))
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/App/BighelpSplitColumn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct BighelpSplitPlaceholder: View {

var body: some View {
VStack(spacing: BighelpTokens.space16) {
BighelpNoodleMark(size: 44)
BighelpLifterMark(size: 44)
Text(message)
.bighelpFont(.body)
.foregroundStyle(theme.secondaryText)
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/App/RootSimpleBots.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI
// The Bots view of the first tab, the bot page, and the loader that covers a chat while it opens.
extension RootShellView {
/// Every computer shown: a bot on another gateway opens once that gateway is connected and its chats
/// are loaded, often a few seconds. The Noodle loader covers the whole wait, from the tap to
/// are loaded, often a few seconds. The lifter loader covers the whole wait, from the tap to
/// the chat, so the screen never looks stuck; Cancel goes back to where the tap came from.
@ViewBuilder var simpleBotsOpeningLoader: some View {
#if DEBUG
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Board/AgentBoardViews.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ struct IdeaDetailSheet: View {
} label: {
Group {
if isAccepting {
BighelpNoodleView(motion: .loader, size: 20, tint: theme.actionForeground)
BighelpLifterView(motion: .idle, size: 20, tint: theme.actionForeground)
} else {
Text(acceptFailed ? "Try again" : "Let's do it")
}
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Board/BoardBlocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ struct BoardActionPillLabel: View {
var body: some View {
Group {
if isBusy {
BighelpNoodleView(motion: .loader, size: 20, tint: theme.actionForeground)
BighelpLifterView(motion: .idle, size: 20, tint: theme.actionForeground)
} else if let systemImage {
Label(title, systemImage: systemImage)
} else {
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Chat/ChatLiveWorkView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct ChatLiveWorkView: View {
private func glyph(_ phase: BighelpActivityPhase) -> some View {
Group {
if phase.isLive, playsLoader {
BighelpNoodleView(motion: phase == .thinking ? .thinking : .loader, size: glyphSide)
BighelpLifterView(motion: phase == .thinking ? .thinking : .searching, size: glyphSide)
} else {
BighelpActivityGlyphView(glyph: BighelpActivitySummary.glyph(for: phase), side: glyphSide)
.foregroundStyle(waiting != nil ? theme.warning : phase.isLive ? theme.tertiaryText : theme.success)
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Chat/ChatReasoningMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct ChatReasoningMessageView: View {
HStack(spacing: BighelpTokens.space8) {
Group {
if playsLoader {
BighelpNoodleView(motion: .thinking, size: glyphSide)
BighelpLifterView(motion: .thinking, size: glyphSide)
} else {
BighelpActivityGlyphView(glyph: BighelpActivitySummary.glyph(for: message.phase), side: glyphSide)
.foregroundStyle(message.phase == .failed ? theme.danger : theme.tertiaryText)
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Chat/ChatWorkTrailCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct ChatWorkTrailCard: View {
accessibilityIdentifier: "chat.work-trail.\(turn.id)",
loaderID: ChatLoaderID.workTrail(turn),
// Helper agents keep going on their own: the kit's infinity.
loaderMotion: turn.events.last { $0.lifecycle == .running }?.kind == .subagent ? .infinity : nil
loaderMotion: turn.events.last { $0.lifecycle == .running }?.kind == .subagent ? .coding : nil
)
if isExpanded, rendersExpandedEvents {
ForEach(turn.events) { event in
Expand Down
9 changes: 1 addition & 8 deletions Bighelp/Code/CodeCards.swift
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ struct CodeWhereLine: View {
@BighelpThemeReader private var theme
}

/// A session's status as a still dot: working, waiting on you, ready. When a session
/// finishes while you watch, the kit's done plays once in its place.
/// A session's status as a still dot: working, waiting on you, ready.
struct CodeStatusDot: View {
let status: CodeSessionStatus

Expand All @@ -250,16 +249,10 @@ struct CodeStatusDot: View {
.frame(width: 10, height: 10)
.background(Circle().fill(color.opacity(0.22)).frame(width: 18, height: 18))
.frame(width: 18, height: 18)
.bighelpNoodleMoment(.done, when: isReady, size: 22)
.padding(.top, 2)
.accessibilityHidden(true)
}

private var isReady: Bool {
if case .ready = status { return true }
return false
}

private var color: Color {
switch status {
case .starting, .running: theme.action
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/Code/DevFactoryRunGroupView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ struct DevFactoryRunGroupView: View {
Spacer(minLength: 0)
CodePill(text: DevFactoryWords.state(run), tint: DevFactoryWords.tint(run, theme))
// A run that finishes while you watch gets the kit's done.
.bighelpNoodleMoment(.done, when: run.state == .succeeded, size: 28)
.bighelpLifterMoment(.success, when: run.state == .succeeded, size: 28)
}
if let stages = detail?.stages, !stages.isEmpty {
HStack(spacing: 4) {
Expand Down
4 changes: 2 additions & 2 deletions Bighelp/DesignSystem/AgentPersonaAvatar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum AgentLiveState: String, CaseIterable, Sendable {
case .listening: Color(hex: "007AFF")
case .thinking: Color(hex: "F28B32")
case .speaking, .happy: Color(hex: "1E7A4E")
case .nudge: BighelpBrand.ember
case .nudge: BighelpBrand.coral
}
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ struct AgentPersonaAvatar: View {
}
if state == .nudge {
let badge = CGRect(x: s * 0.73, y: s * 0.05, width: s * 0.22, height: s * 0.22)
context.fill(Path(ellipseIn: badge), with: .color(BighelpBrand.ember))
context.fill(Path(ellipseIn: badge), with: .color(BighelpBrand.coral))
context.stroke(Path(ellipseIn: badge), with: .color(.white), lineWidth: s * 0.03)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Bighelp/DesignSystem/AvatarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct AvatarView: View {
.clipShape(.circle)
.overlay(alignment: .topTrailing) {
if state == .nudge {
Circle().fill(BighelpBrand.ember)
Circle().fill(BighelpBrand.coral)
.frame(width: size * 0.24, height: size * 0.24)
.overlay(Circle().stroke(.white, lineWidth: max(1, size * 0.03)))
}
Expand Down
92 changes: 49 additions & 43 deletions Bighelp/DesignSystem/BighelpBrand.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import SwiftUI
import UIKit

/// The bighelp identity, the Noodle: one continuous stroke writes a lowercase b and kicks
/// out at the bottom left as a chat-bubble tail. It lives in chrome and loaders, never as
/// a chat participant. The kit's motions are `BighelpNoodleMotion`.
/// The Bighelp identity, the lifter: a coral helper holding a box overhead. The box turns
/// into what he's doing (a brain, a magnifying glass, a check). He lives in chrome and
/// loaders, never as a chat participant. His motions are `BighelpLifterMotion`.
enum BighelpBrand {
static let appName = "Bighelp"

static let ember = Color(hex: "FF8A7A")
static let ink = Color(hex: "1C1A19")
static let cream = Color(hex: "F5F2EF")
static let night = Color(hex: "121110")
/// The lifter, the app icon's background, accents.
static let coral = Color(hex: "FF5A36")
/// The box and text on dark pages.
static let cream = Color(hex: "FFF6EC")
/// The box on light pages, the lifter's eyes.
static let ink = Color(hex: "1A1420")
/// Dark surfaces.
static let night = Color(hex: "0E0E10")
}

extension Color {
/// Ink for text on a filled accent: white on the deep violet used by day,
/// Ember ink on the pale lavender used after dark. Every accent that passes
/// the brand's ink on the pale lavender used after dark. Every accent that passes
/// the theme's canvas-contrast contract reads correctly with this rule.
static let bighelpActionInk = Color(uiColor: UIColor { traits in
traits.userInterfaceStyle == .dark
? UIColor(red: 0x1C / 255, green: 0x1A / 255, blue: 0x19 / 255, alpha: 1)
? UIColor(red: 0x1A / 255, green: 0x14 / 255, blue: 0x20 / 255, alpha: 1)
: .white
})
}
Expand All @@ -32,53 +36,55 @@ extension View {
}
}

/// The wordmark: the mark stands in for the b, then "ighelp" in the kit's outlined
/// Nunito, ink by day and cream after dark. `height` is the kit's full wordmark box.
/// Pass a motion to play it in the b's place (the onboarding writes itself in).
/// The wordmark, as the kit's horizontal lockup: the lifter, then "Bighelp" in the kit's
/// outlined Bricolage Grotesque, ink by day and cream after dark. `height` is the lockup's
/// full height, the lifter's included. Pass a motion to play it once in the lifter's place
/// (the welcome, Settings' easter egg); without one the lifter is still.
struct BighelpWordmark: View {
var height: CGFloat = 26
var motion: BighelpNoodleMotion?
var playback: BighelpNoodlePlayback = .automatic
var height: CGFloat = 36
var motion: BighelpLifterMotion?
var playback: BighelpLifterPlayback = .once
var onFinish: (() -> Void)?

@BighelpThemeReader private var theme

/// The kit's wordmark geometry, in its own units: the box is 915 tall, the mark's cell
/// 726.9 wide (the stroke plus the gap to the i), the letters 2870 wide. The mark's
/// center sits at (345, 411.1) in its cell and its stroke is 786.2 tall.
/// The kit's lockup in its own units: 608.7 by 192. The lifter's 200-unit artboard starts
/// at (-16, -8) and the letters, 444.7 by 148.8, at (156, 30).
private enum Kit {
static let height: CGFloat = 915
static let markCell: CGFloat = 726.9
static let letters: CGFloat = 2870
static let markCenter = CGPoint(x: 345, y: 411.1)
static let markHeight: CGFloat = 786.2
static let size = CGSize(width: 608.7, height: 192)
static let mark = CGPoint(x: -16, y: -8)
static let markSide: CGFloat = 200
static let letters = CGRect(x: 156, y: 30, width: 444.7, height: 148.8)
}

var body: some View {
let unit = height / Kit.height
HStack(spacing: 0) {
BighelpNoodleView(motion: motion ?? .idle,
size: Kit.markHeight * unit * BighelpNoodleAnimation.markBox / 274.4,
playback: playback, isPaused: motion == nil, onFinish: onFinish)
.position(x: Kit.markCenter.x * unit, y: Kit.markCenter.y * unit)
.frame(width: Kit.markCell * unit, height: height)
Image("BighelpWordmarkLetters")
.resizable()
.renderingMode(.template)
.foregroundStyle(theme.isDarkPalette ? BighelpBrand.cream : BighelpBrand.ink)
.frame(width: Kit.letters * unit, height: height)
}
.fixedSize()
.accessibilityElement(children: .ignore)
.accessibilityLabel(BighelpBrand.appName)
let unit = height / Kit.size.height
Color.clear
.frame(width: Kit.size.width * unit, height: height)
.overlay(alignment: .topLeading) {
BighelpLifterView(motion: motion ?? .idle, size: Kit.markSide * unit, playback: playback,
isPaused: motion == nil, onFinish: onFinish)
.offset(x: Kit.mark.x * unit, y: Kit.mark.y * unit)
}
.overlay(alignment: .topLeading) {
Image("BighelpWordmark")
.resizable()
.renderingMode(.template)
.foregroundStyle(theme.isDarkPalette ? BighelpBrand.cream : BighelpBrand.ink)
.frame(width: Kit.letters.width * unit, height: Kit.letters.height * unit)
.offset(x: Kit.letters.minX * unit, y: Kit.letters.minY * unit)
}
.fixedSize()
.accessibilityElement(children: .ignore)
.accessibilityLabel(BighelpBrand.appName)
}
}

#Preview("Noodle") {
#Preview("Lifter") {
VStack(spacing: 24) {
BighelpWordmark(height: 40)
BighelpWordmark(height: 52, motion: .reveal)
BighelpNoodleMark(size: 96)
BighelpWordmark(height: 48)
BighelpWordmark(height: 72, motion: .success)
BighelpLifterMark(size: 96)
}
.padding()
.background(BighelpBrand.cream)
Expand Down
17 changes: 10 additions & 7 deletions Bighelp/DesignSystem/BighelpLogo.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI

/// The logo for setup screens: the wordmark, or the mark alone. A motion plays in the
/// mark's place (the onboarding's reveal, host setup's launch); without one it's still.
/// The logo for setup screens: the wordmark, or the lifter alone. A motion plays in the
/// lifter's place (the welcome's success, host setup's idle); without one he's still.
struct BighelpLogo: View {
enum Presentation {
case full
Expand All @@ -10,24 +10,27 @@ struct BighelpLogo: View {

let presentation: Presentation
let height: CGFloat
let motion: BighelpNoodleMotion?
let motion: BighelpLifterMotion?
let playback: BighelpLifterPlayback
let onFinish: (() -> Void)?

init(presentation: Presentation = .full, height: CGFloat = 32, motion: BighelpNoodleMotion? = nil,
onFinish: (() -> Void)? = nil) {
init(presentation: Presentation = .full, height: CGFloat = 32, motion: BighelpLifterMotion? = nil,
playback: BighelpLifterPlayback = .once, onFinish: (() -> Void)? = nil) {
self.presentation = presentation
self.height = height
self.motion = motion
self.playback = playback
self.onFinish = onFinish
}

var body: some View {
Group {
switch presentation {
case .full:
BighelpWordmark(height: height, motion: motion, onFinish: onFinish)
BighelpWordmark(height: height, motion: motion, playback: playback, onFinish: onFinish)
case .mark:
BighelpNoodleView(motion: motion ?? .idle, size: height, isPaused: motion == nil, onFinish: onFinish)
BighelpLifterView(motion: motion ?? .idle, size: height, playback: playback,
isPaused: motion == nil, onFinish: onFinish)
}
}
.fixedSize(horizontal: true, vertical: true)
Expand Down
1 change: 0 additions & 1 deletion Bighelp/DesignSystem/BighelpModelPickerSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,6 @@ struct BighelpModelPickerSheet: View {
.reflectiveVisionIcon()
.font(.system(size: 18, weight: .semibold))
.foregroundStyle(pinned ? theme.action : theme.secondaryText)
.bighelpNoodleMoment(.heart, when: pinned, size: 26)
.frame(width: BighelpTokens.hitTarget, height: BighelpTokens.hitTarget)
.contentShape(Rectangle())
.accessibilityHidden(true)
Expand Down
Loading