Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat(apps): keep the five bots full size on the welcome

leepokai4a54f24e441d
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt b/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
index d75e235f..1aa41aaa 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/WelcomeView.kt
@@ -20,7 +20,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
-import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
@@ -41,7 +40,6 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.graphics.graphicsLayer
-import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.painterResource
@@ -69,11 +67,8 @@ import kotlin.math.sin
LaunchedEffect(Unit) {
for (next in beat + 1..4) { delay(if (next == 1) 150 else 280); beat = next }
}
- val density = LocalDensity.current
- // What the pitch needs besides the crew, which shrinks into the rest.
- var textHeight by remember { mutableStateOf(0.dp) }
Column(Modifier.fillMaxSize().background(Palette.background).safeDrawingPadding()) {
- // The way forward stays on screen at any size: the pitch above it gives way.
+ // The way forward stays on screen at any size: the pitch scrolls above it on the smallest.
BoxWithConstraints(Modifier.weight(1f).fillMaxWidth()) {
val room = maxHeight
Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {
@@ -81,8 +76,8 @@ import kotlin.math.sin
Column(Modifier.fillMaxWidth().heightIn(min = room).padding(horizontal = 24.dp),
verticalArrangement = Arrangement.SpaceBetween) {
Spacer(Modifier.height(0.dp))
- Crew(beat >= 1, room - textHeight - 48.dp, Modifier.padding(top = 24.dp))
- Column(Modifier.padding(top = 24.dp).onSizeChanged { textHeight = with(density) { it.height.toDp() } }) {
+ Crew(beat >= 1, Modifier.padding(top = 24.dp))
+ Column(Modifier.padding(top = 24.dp)) {
ChatGlimpse(beat >= 2, Modifier.padding(bottom = 24.dp))
Column(Modifier.rise(beat >= 3), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Text(tr("Your coding agents,\nas teammates."), style = Type.system(34f, FontWeight.SemiBold).copy(letterSpacing = (-0.6).sp),
@@ -103,13 +98,11 @@ import kotlin.math.sin
Modifier.fillMaxWidth().padding(bottom = 4.dp), style = Type.footnote, color = Palette.secondary)
if (state.account.configured) {
SignInButtons(state, store)
- SecondaryButton(start, Modifier.fillMaxWidth()) {
- Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(tr("Continue without an account"), style = Type.subheadline.medium, color = Palette.text)
- // A little stronger than `Palette.secondary`, which is too faint for this size on the fill.
- Text(tr("Only on the same Wi-Fi or Tailscale as your computer"), style = Type.caption,
- color = Palette.text.copy(alpha = 0.7f), textAlign = TextAlign.Center)
- }
+ Column(Modifier.fillMaxWidth().heightIn(min = 44.dp).plainButton(action = start),
+ horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(2.dp, Alignment.CenterVertically)) {
+ Text(tr("Continue without an account"), style = Type.footnote.medium, color = Palette.text)
+ Text(tr("Only on the same Wi-Fi or Tailscale as your computer"), style = Type.caption2, color = Palette.secondary,
+ textAlign = TextAlign.Center)
}
} else WideButton("Get started", action = start)
// Restoring sign-in failed (the only account error): Clerk retries on its own with a backoff of up to a minute; Try again asks now.
@@ -124,35 +117,28 @@ import kotlin.math.sin
}
/** Five bots bobbing out of step: the "persistent, named" part of the pitch, without words. */
-@Composable private fun Crew(shown: Boolean, room: Dp, modifier: Modifier = Modifier) {
+@Composable private fun Crew(shown: Boolean, modifier: Modifier = Modifier) {
val still = reduceMotion()
- // It shrinks into the height the pitch leaves it, and goes when it would be too small to read.
- val fit = (room / CREW_HEIGHT).coerceAtMost(1f).takeIf { it >= 0.35f } ?: 0f
- val scale by animateFloatAsState(fit, Motion.fade(), label = "Crew")
var time by remember { mutableFloatStateOf(0f) }
if (shown && !still) LaunchedEffect(Unit) { while (true) withFrameNanos { time = it / 1e9f } }
val density = LocalDensity.current
- Box(modifier.fillMaxWidth().height(CREW_HEIGHT * scale), contentAlignment = Alignment.Center) {
- Box(Modifier.fillMaxWidth().requiredHeight(CREW_HEIGHT).graphicsLayer { scaleX = scale; scaleY = scale }, contentAlignment = Alignment.Center) {
- for ((index, member) in CREW.withIndex()) {
- val entry = remember { Animatable(if (still) 1f else 0f) }
- LaunchedEffect(shown) {
- if (shown) { delay(index * 70L); entry.animateTo(1f, Motion.spring(0.7f, 0.4f)) } else entry.snapTo(0f)
- }
- Box(Modifier.graphicsLayer {
- val bob = if (still) 0f else sin(time * 1.3f + index * 1.7f) * 5f
- translationX = with(density) { member.x.dp.toPx() }
- translationY = with(density) { (member.y + bob).dp.toPx() }
- val scale = 0.3f + 0.7f * entry.value
- scaleX = scale; scaleY = scale; alpha = entry.value.coerceIn(0f, 1f)
- }) { CharacterAvatar(member.shape, member.color, member.size.dp, member.mood) }
+ Box(modifier.fillMaxWidth().height(170.dp), contentAlignment = Alignment.Center) {
+ for ((index, member) in CREW.withIndex()) {
+ val entry = remember { Animatable(if (still) 1f else 0f) }
+ LaunchedEffect(shown) {
+ if (shown) { delay(index * 70L); entry.animateTo(1f, Motion.spring(0.7f, 0.4f)) } else entry.snapTo(0f)
}
+ Box(Modifier.graphicsLayer {
+ val bob = if (still) 0f else sin(time * 1.3f + index * 1.7f) * 5f
+ translationX = with(density) { member.x.dp.toPx() }
+ translationY = with(density) { (member.y + bob).dp.toPx() }
+ val scale = 0.3f + 0.7f * entry.value
+ scaleX = scale; scaleY = scale; alpha = entry.value.coerceIn(0f, 1f)
+ }) { CharacterAvatar(member.shape, member.color, member.size.dp, member.mood) }
}
}
}
-private val CREW_HEIGHT = 170.dp
-
private class CrewMember(val shape: String, val color: String, val size: Int, val x: Float, val y: Float, val mood: String)
private val CREW = listOf(
@@ -202,15 +188,15 @@ private val CREW = listOf(
val busy = "session" in state.busy
val enabled = state.account.ready && !busy
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(10.dp)) {
- WideButton(enabled = enabled, busy = busy, action = { store.signIn(SignInProvider.Apple) }) {
+ WideButton(enabled = enabled, busy = busy, height = SIGN_IN_HEIGHT, action = { store.signIn(SignInProvider.Apple) }) {
Symbol("apple.logo", size = 20.dp, tint = Palette.onAccent)
Text(tr("Continue with Apple"))
}
- WideButton(primary = false, enabled = enabled, busy = busy, action = { store.signIn(SignInProvider.Google) }) {
+ WideButton(primary = false, enabled = enabled, busy = busy, height = SIGN_IN_HEIGHT, action = { store.signIn(SignInProvider.Google) }) {
Image(painterResource(R.drawable.google_logo), null, Modifier.size(20.dp))
Text(tr("Continue with Google"))
}
- WideButton(primary = false, enabled = enabled, busy = busy, action = { store.signIn(SignInProvider.GitHub) }) {
+ WideButton(primary = false, enabled = enabled, busy = busy, height = SIGN_IN_HEIGHT, action = { store.signIn(SignInProvider.GitHub) }) {
Symbol("github.logo", size = 20.dp)
Text(tr("Continue with GitHub"))
}
@@ -223,10 +209,10 @@ private val CREW = listOf(
@Composable internal fun WideButton(title: String, primary: Boolean = true, enabled: Boolean = true, action: () -> Unit) =
WideButton(primary, enabled, action = action) { Text(tr(title)) }
-@Composable internal fun WideButton(primary: Boolean = true, enabled: Boolean = true, busy: Boolean = false, action: () -> Unit,
+@Composable internal fun WideButton(primary: Boolean = true, enabled: Boolean = true, busy: Boolean = false, height: Dp = WIDE_HEIGHT, action: () -> Unit,
label: @Composable () -> Unit) {
val content: @Composable () -> Unit = {
- Box(Modifier.fillMaxWidth().heightIn(min = WIDE_HEIGHT), contentAlignment = Alignment.Center) {
+ Box(Modifier.fillMaxWidth().heightIn(min = height), contentAlignment = Alignment.Center) {
Row(Modifier.graphicsLayer { alpha = if (busy) 0f else 1f }, verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(10.dp)) {
androidx.compose.runtime.CompositionLocalProvider(androidx.compose.material3.LocalTextStyle provides Type.headline) { label() }
@@ -239,6 +225,8 @@ private val CREW = listOf(
// The label's own 50-point frame, inside the style's 11-point vertical padding (72 in all, as on iOS).
private val WIDE_HEIGHT: Dp = 50.dp
+// 50 in all, so the welcome keeps its crew on small screens.
+private val SIGN_IN_HEIGHT: Dp = 28.dp
/** Fades up into place once `shown`. */
@Composable private fun Modifier.rise(shown: Boolean): Modifier {
diff --git a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
index 098796b9..cd12aaed 100644
--- a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
+++ b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
@@ -80,7 +80,7 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
return (
<div className="welcome">
<VStack className="welcome-column">
- {/* The way forward stays on screen at any size: the pitch above it gives way (account-welcome.css). */}
+ {/* The way forward stays on screen at any size: the pitch scrolls above it in a short window (account-welcome.css). */}
<VStack className="welcome-pitch">
<Spacer min={24} />
<WelcomeCrew shown={beat >= 1} />
@@ -97,14 +97,16 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
<ProviderButton provider="apple" mark={<Icon name="apple.logo" size={20} />} title="Continue with Apple" />
<ProviderButton provider="google" kind="secondary" mark={<img src={googleLogo} alt="" width={20} height={20} />} title="Continue with Google" />
<ProviderButton provider="github" kind="secondary" mark={<Icon name="github.logo" size={20} />} title="Continue with GitHub" />
- <Button kind="secondary" onClick={onContinue} className="welcome-button">
- {account.isConfigured ? (
+ {account.isConfigured ? (
+ <button className="welcome-continue" onClick={onContinue}>
<VStack as="span" align="center" gap={2}>
- <Text size="subheadline" weight="medium">{tr('Continue without an account')}</Text>
- <Text size="caption" weight="regular" className="welcome-continue-note">{tr('Phones then connect only over Wi-Fi or Tailscale.')}</Text>
+ <Text size="footnote" weight="medium">{tr('Continue without an account')}</Text>
+ <Text size="caption2" tone="secondary">{tr('Phones then connect only over Wi-Fi or Tailscale.')}</Text>
</VStack>
- ) : onThis}
- </Button>
+ </button>
+ ) : (
+ <Button kind="secondary" onClick={onContinue} className="welcome-button">{onThis}</Button>
+ )}
{!account.isConfigured ? (
<Text as="div" size="footnote" tone="tertiary">{tr(deviceName === 'Mac' ? "Sign-in isn't configured in this build. You can still use Codync on this Mac." : "Sign-in isn't configured in this build. You can still use Codync on this computer.")}</Text>
) : null}
diff --git a/apps/desktop/src/renderer/views/account-welcome.css b/apps/desktop/src/renderer/views/account-welcome.css
index d729fdaf..c92eb1e6 100644
--- a/apps/desktop/src/renderer/views/account-welcome.css
+++ b/apps/desktop/src/renderer/views/account-welcome.css
@@ -16,7 +16,7 @@
margin: 0 auto;
padding: 0 24px 12px;
}
-/* The way forward stays on screen at any window size: the pitch scrolls behind it, and gives up the crew first. */
+/* The way forward stays on screen at any window size: the pitch scrolls above it. */
.welcome-pitch {
flex: 1;
min-height: 0;
@@ -44,9 +44,16 @@
font-size: var(--text-body);
font-weight: 700;
}
-/* A little stronger than the secondary tone, which is too faint for this size on the button's fill. */
-.welcome-continue-note {
- opacity: 0.7;
+/* Short windows keep the crew and give up button height first. */
+@media (max-height: 720px) {
+ .styled-button.welcome-button {
+ min-height: 40px;
+ }
+}
+.welcome-continue {
+ width: 100%;
+ min-height: 44px;
+ color: var(--text);
}
.welcome-crew {
@@ -54,22 +61,6 @@
flex-shrink: 0;
height: 170px;
}
-@media (max-height: 720px) {
- .welcome-crew {
- height: 110px;
- transform: scale(0.65);
- }
-}
-@media (max-height: 640px) {
- .welcome-crew {
- display: none;
- }
-}
-@media (max-height: 540px) {
- .welcome-glimpse {
- display: none;
- }
-}
.welcome-crew-member {
position: absolute;
left: 50%;
diff --git a/apps/ios/Views/SignInButtons.swift b/apps/ios/Views/SignInButtons.swift
index a2d4af0d..a65e6252 100644
--- a/apps/ios/Views/SignInButtons.swift
+++ b/apps/ios/Views/SignInButtons.swift
@@ -40,7 +40,7 @@ private struct ProviderButton<Mark: View>: View {
if account.isBusy { Spinner(size: 18) }
}
.font(.headline)
- .frame(maxWidth: .infinity, minHeight: 50)
+ .frame(maxWidth: .infinity, minHeight: 28)
}
.disabled(account.isBusy)
.animation(Motion.fade, value: account.isBusy)
diff --git a/apps/ios/Views/WelcomeView.swift b/apps/ios/Views/WelcomeView.swift
index 292bfd95..3243b382 100644
--- a/apps/ios/Views/WelcomeView.swift
+++ b/apps/ios/Views/WelcomeView.swift
@@ -12,15 +12,13 @@ struct WelcomeView: View {
@Environment(\.accessibilityReduceMotion) private var reduceMotion
/// 0 = nothing yet … 4 = everything shown. Each beat enters in turn.
@State private var beat = 0
- /// What the pitch needs besides the crew, which shrinks into the rest.
- @State private var textHeight: CGFloat = 0
var body: some View {
VStack(spacing: 0) {
- // The way forward stays on screen at any size: the pitch above it gives way.
+ // The way forward stays on screen at any size: the pitch scrolls above it on the smallest.
GeometryReader { geometry in
ScrollView {
- pitch(room: geometry.size.height)
+ pitch
.frame(minHeight: geometry.size.height)
}
.scrollBounceBehavior(.basedOnSize)
@@ -38,11 +36,11 @@ struct WelcomeView: View {
}
}
- private func pitch(room: CGFloat) -> some View {
+ private var pitch: some View {
VStack(alignment: .leading, spacing: 0) {
Spacer(minLength: 24)
- Crew(shown: beat >= 1, room: room - textHeight - 48)
+ Crew(shown: beat >= 1)
.frame(maxWidth: .infinity)
Spacer(minLength: 24)
@@ -64,7 +62,6 @@ struct WelcomeView: View {
}
.rise(beat >= 3)
}
- .onGeometryChange(for: CGFloat.self) { $0.size.height } action: { textHeight = $0 }
}
.padding(.horizontal, 24)
}
@@ -86,17 +83,18 @@ struct WelcomeView: View {
SignInButtons().disabled(!account.isReady)
Button(action: start) {
VStack(spacing: 2) {
- Text(L10n.tr("Continue without an account")).font(.subheadline.weight(.medium))
- // A little stronger than `Palette.secondary`, which is too faint for this size on the fill.
+ Text(L10n.tr("Continue without an account")).font(.footnote.weight(.medium))
+ .foregroundStyle(Palette.text)
Text(L10n.tr("Only on the same Wi-Fi or Tailscale as your computer"))
- .font(.caption)
- .foregroundStyle(Palette.text.opacity(0.7))
+ .font(.caption2)
+ .foregroundStyle(Palette.secondary)
.fixedSize(horizontal: false, vertical: true)
}
.multilineTextAlignment(.center)
- .frame(maxWidth: .infinity)
+ .frame(maxWidth: .infinity, minHeight: 44)
+ .contentShape(Rectangle())
}
- .buttonStyle(.secondary)
+ .buttonStyle(PressScale())
} else {
Button(action: start) {
Text(L10n.tr("Get started")).font(.headline).frame(maxWidth: .infinity, minHeight: 50)
@@ -128,16 +126,8 @@ struct WelcomeView: View {
/// Five bots bobbing out of step: the "persistent, named" part of the pitch, without words.
private struct Crew: View {
let shown: Bool
- /// The height the pitch leaves it. It shrinks into that, and goes when it would be too small to read.
- let room: CGFloat
@Environment(\.accessibilityReduceMotion) private var reduceMotion
- private static let fullHeight: CGFloat = 170
- private var fit: CGFloat {
- let fit = min(1, room / Self.fullHeight)
- return fit < 0.35 ? 0 : fit
- }
-
private let members: [(shape: String, color: String, size: CGFloat, x: CGFloat, y: CGFloat, mood: CharacterAvatar.Mood)] = [
("blob", "blue", 92, 0, 0, .working),
("squircle", "orange", 64, -104, -34, .idle),
@@ -160,9 +150,7 @@ private struct Crew: View {
}
}
}
- .scaleEffect(fit)
- .frame(height: Self.fullHeight * fit)
- .animation(Motion.fade, value: fit)
+ .frame(height: 170)
}
}