Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(onboarding): limit to two emails, handle overflow on connect summary (#5256)

teof2f46e162789
diff --git a/apps/web/src/features/setup/flow/EmailStep.tsx b/apps/web/src/features/setup/flow/EmailStep.tsx
index ae5dcc954a..f7069bf264 100644
--- a/apps/web/src/features/setup/flow/EmailStep.tsx
+++ b/apps/web/src/features/setup/flow/EmailStep.tsx
@@ -61,11 +61,15 @@ export function EmailStep(props: {
);
});
- const connectSlots = createMemo(() =>
- links().length === 0
+ // Connecting more than two accounts is a premium feature, and the plan
+ // step hasn't happened yet — past two, stop offering connect slots.
+ const connectSlots = createMemo(() => {
+ const connected = links().length;
+ if (connected >= 2) return [];
+ return connected === 0
? ['Connect primary account', 'Connect secondary account']
- : ['Connect another email']
- );
+ : ['Connect another email'];
+ });
// Detects a landed link via the persisted pre-redirect baseline (the
// OAuth round-trip reloads the page, so in-memory state won't survive).
diff --git a/apps/web/src/features/setup/flow/OnboardingFlow.tsx b/apps/web/src/features/setup/flow/OnboardingFlow.tsx
index 7213a1a6ed..ab67e6fc94 100644
--- a/apps/web/src/features/setup/flow/OnboardingFlow.tsx
+++ b/apps/web/src/features/setup/flow/OnboardingFlow.tsx
@@ -462,7 +462,7 @@ function FlowContent() {
});
return (
- <div class="relative size-full overflow-y-auto bg-surface font-sans text-ink">
+ <div class="relative size-full overflow-hidden bg-surface font-sans text-ink">
<style>{
/*css*/ `
@keyframes obf-card-in {
@@ -486,98 +486,104 @@ function FlowContent() {
<NoiseBackground />
- <div class="relative z-10 flex min-h-full items-center justify-center px-6 py-12">
- <div
- class={cn(
- 'w-full obf-card transition-[max-width] duration-300',
- currentStep().wide ? 'sm:max-w-xl' : 'sm:max-w-lg'
- )}
- >
- <div class="flex flex-col gap-8">
- <Show when={currentStep().title}>
- <div class="flex flex-col gap-1.5">
- {/* Hero module above the title — desktop only. Nudged left by
- the module's built-in viewBox padding (reserved for the
- click-burst trail) so its at-rest artwork left-aligns with
- the title text. */}
- <Show when={currentStep().module}>
- {(mod) => (
- <StepModule
- logo={mod().logo}
- state={heroState()}
- class="mb-1 hidden size-32 -ml-8 sm:block"
+ {/* The backdrop layers are viewport-sized absolutes, so scrolling has
+ to happen inside them — a tall step (the summary's pill cloud)
+ would otherwise scroll the wash and grain away with the content,
+ and the grain's 100vw width would add a horizontal scrollbar. */}
+ <div class="relative z-10 size-full overflow-y-auto overscroll-contain">
+ <div class="flex min-h-full items-center justify-center px-6 py-12">
+ <div
+ class={cn(
+ 'w-full obf-card transition-[max-width] duration-300',
+ currentStep().wide ? 'sm:max-w-xl' : 'sm:max-w-lg'
+ )}
+ >
+ <div class="flex flex-col gap-8">
+ <Show when={currentStep().title}>
+ <div class="flex flex-col gap-1.5">
+ {/* Hero module above the title — desktop only. Nudged left by
+ the module's built-in viewBox padding (reserved for the
+ click-burst trail) so its at-rest artwork left-aligns with
+ the title text. */}
+ <Show when={currentStep().module}>
+ {(mod) => (
+ <StepModule
+ logo={mod().logo}
+ state={heroState()}
+ class="mb-1 hidden size-32 -ml-8 sm:block"
+ />
+ )}
+ </Show>
+ {/* Landing slot for the loading-graphic → logo handoff. Kept
+ hidden while the overlay is mid-flight; the overlay lands
+ exactly here, then this static logo takes over. */}
+ <Show when={currentStep().key === 'summary'}>
+ <LogoIcon
+ id="summary-brand-logo"
+ class="mb-1 size-16 text-accent"
+ style={{ opacity: logoShown() ? 1 : 0 }}
/>
- )}
- </Show>
- {/* Landing slot for the loading-graphic → logo handoff. Kept
- hidden while the overlay is mid-flight; the overlay lands
- exactly here, then this static logo takes over. */}
- <Show when={currentStep().key === 'summary'}>
- <LogoIcon
- id="summary-brand-logo"
- class="mb-1 size-16 text-accent"
- style={{ opacity: logoShown() ? 1 : 0 }}
- />
- </Show>
- <div
- class="flex flex-col gap-1.5 transition-opacity"
- style={{
- opacity: summaryContentHidden() ? 0 : 1,
- 'transition-duration': `${contentFadeMs()}ms`,
- }}
- >
- <h1 class="text-2xl font-semibold tracking-tight text-ink">
- {currentStep().title}
- </h1>
- <Show when={currentStep().subtitle}>
- <p class="max-w-md text-sm leading-relaxed text-ink-muted">
- {currentStep().subtitle}
- </p>
</Show>
+ <div
+ class="flex flex-col gap-1.5 transition-opacity"
+ style={{
+ opacity: summaryContentHidden() ? 0 : 1,
+ 'transition-duration': `${contentFadeMs()}ms`,
+ }}
+ >
+ <h1 class="text-2xl font-semibold tracking-tight text-ink">
+ {currentStep().title}
+ </h1>
+ <Show when={currentStep().subtitle}>
+ <p class="max-w-md text-sm leading-relaxed text-ink-muted">
+ {currentStep().subtitle}
+ </p>
+ </Show>
+ </div>
</div>
- </div>
- </Show>
+ </Show>
- <div
- class="flex flex-col gap-8 transition-opacity"
- style={{
- opacity: summaryContentHidden() ? 0 : 1,
- 'transition-duration': `${contentFadeMs()}ms`,
- }}
- >
- <Stepper
- step={stepIndex()}
- transition={Stepper.transitions.scale}
+ <div
+ class="flex flex-col gap-8 transition-opacity"
+ style={{
+ opacity: summaryContentHidden() ? 0 : 1,
+ 'transition-duration': `${contentFadeMs()}ms`,
+ }}
>
- <For each={steps()}>
- {(step) => (
- <Stepper.Step noTransition={step.noTransition}>
- <Suspense fallback={<StepFallback />}>
- {step.render(controls)}
- </Suspense>
- </Stepper.Step>
- )}
- </For>
- </Stepper>
-
- <Show when={!currentStep().noDot}>
- <div class="flex gap-1.5">
- <Index each={steps().filter((step) => !step.noDot)}>
+ <Stepper
+ step={stepIndex()}
+ transition={Stepper.transitions.scale}
+ >
+ <For each={steps()}>
{(step) => (
- <div
- class={cn(
- 'size-1.5 rounded-full transition-colors',
- stepIndex() === steps().indexOf(step())
- ? 'bg-accent'
- : stepIndex() > steps().indexOf(step())
- ? 'bg-ink/40'
- : 'bg-ink/15'
- )}
- />
+ <Stepper.Step noTransition={step.noTransition}>
+ <Suspense fallback={<StepFallback />}>
+ {step.render(controls)}
+ </Suspense>
+ </Stepper.Step>
)}
- </Index>
- </div>
- </Show>
+ </For>
+ </Stepper>
+
+ <Show when={!currentStep().noDot}>
+ <div class="flex gap-1.5">
+ <Index each={steps().filter((step) => !step.noDot)}>
+ {(step) => (
+ <div
+ class={cn(
+ 'size-1.5 rounded-full transition-colors',
+ stepIndex() === steps().indexOf(step())
+ ? 'bg-accent'
+ : stepIndex() > steps().indexOf(step())
+ ? 'bg-ink/40'
+ : 'bg-ink/15'
+ )}
+ />
+ )}
+ </Index>
+ </div>
+ </Show>
+ </div>
</div>
</div>
</div>