Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(desktop-app): let an undecided user compare the two run styles
Andy Paviae70ebfaf45ba
diff --git a/desktop-app/ui/src/hooks/domain/useOnboardingController.ts b/desktop-app/ui/src/hooks/domain/useOnboardingController.tsindex b6796860a..87c624215 100644--- a/desktop-app/ui/src/hooks/domain/useOnboardingController.ts+++ b/desktop-app/ui/src/hooks/domain/useOnboardingController.ts@@ -54,6 +54,7 @@ export function useOnboardingController(): OnboardingViewModel {const answerRunStyle = useCallback((answer: OnboardingRunStyleAnswer) => {+ if (answer === 'compare') return goTo('compare')goTo(answer === 'hosted' ? 'hosted' : 'selfHosted')},[goTo]diff --git a/desktop-app/ui/src/pages/OnboardingPage/index.tsx b/desktop-app/ui/src/pages/OnboardingPage/index.tsxindex 1e1be68e4..c4507bebb 100644--- a/desktop-app/ui/src/pages/OnboardingPage/index.tsx+++ b/desktop-app/ui/src/pages/OnboardingPage/index.tsx@@ -1,5 +1,6 @@import { AuthBrand } from '@components/AuthBrand'import { RuntimeConfigDock } from '@components/RuntimeConfigDock'+import { CompareRunStyles } from './steps/CompareRunStyles'import { Hosted } from './steps/Hosted'import { InvitedMember } from './steps/InvitedMember'import { ManualEnvironment } from './steps/ManualEnvironment'@@ -39,6 +40,12 @@ export function OnboardingPage({ onboarding }: OnboardingPageProps) {onAnswerRunStyle={answerRunStyle}/>) : null}+ {step === 'compare' ? (+ <CompareRunStyles+ onChooseHosted={() => answerRunStyle('hosted')}+ onChooseSelfHosted={() => answerRunStyle('selfHosted')}+ />+ ) : null}{step === 'invited' ? <InvitedMember /> : null}{step === 'hosted' ? <Hosted onContinue={goToManual} /> : null}{step === 'selfHosted' ? <SelfHosted onContinue={goToManual} /> : null}diff --git a/desktop-app/ui/src/pages/OnboardingPage/steps/CompareRunStyles.tsx b/desktop-app/ui/src/pages/OnboardingPage/steps/CompareRunStyles.tsxnew file mode 100644index 000000000..1df33531f--- /dev/null+++ b/desktop-app/ui/src/pages/OnboardingPage/steps/CompareRunStyles.tsx@@ -0,0 +1,95 @@+import { Button } from '@components/Common'++interface CompareRunStylesProps {+ onChooseHosted: () => void+ onChooseSelfHosted: () => void+}++interface RunStyleSummary {+ title: string+ lead: string+ pros: string[]+ cons: string[]+}++/**+ * Q2's undecided answer: the two run styles side by side.+ *+ * Framed around the requirements that actually force the decision rather than+ * generic benefits — someone who does not know which to pick is not weighing+ * preferences, they are checking whether a constraint applies to them. So the+ * self-hosted side reads as a checklist of those constraints, and hosting is+ * positioned as the default when none of them do.+ *+ * Deliberately limited to operational trade-offs. No pricing or trial claims:+ * hosted signup does not exist yet, so anything about cost would be a promise+ * the product cannot keep. Self-hosting is described as "a cluster you+ * control" rather than anything local, because it covers remote and local.+ */+const RUN_STYLES: RunStyleSummary[] = [+ {+ title: 'Evenfire hosts it',+ lead: 'The default if none of the requirements below apply to you.',+ pros: ['Nothing to deploy, upgrade, or monitor', 'Fastest way to a working agent'],+ cons: ['Runs on Evenfire’s infrastructure, not yours'],+ },+ {+ title: 'You run it yourself',+ lead: 'Choose this if any of these are true:',+ pros: [+ 'Data or model keys are not allowed to leave your own network',+ 'Agents must reach internal systems that are not on the public internet',+ 'Policy or compliance dictates where your data is processed and stored',+ 'You need to set your own network policy, egress rules, and upgrade schedule',+ ],+ cons: ['You deploy and maintain the cluster'],+ },+]++export function CompareRunStyles({ onChooseHosted, onChooseSelfHosted }: CompareRunStylesProps) {+ return (+ <>+ <h1>Which one is right for you?</h1>+ <div className="onboarding-compare">+ {RUN_STYLES.map(style => (+ <section className="onboarding-compare__group" key={style.title}>+ <h2 className="onboarding-compare__title">{style.title}</h2>+ <p className="onboarding-compare__lead">{style.lead}</p>+ <ul className="onboarding-compare__list">+ {style.pros.map(point => (+ <li className="onboarding-compare__item" key={point}>+ <span+ className="onboarding-compare__mark onboarding-compare__mark--pro"+ aria-hidden="true"+ >+ ++ </span>+ <span>{point}</span>+ </li>+ ))}+ {style.cons.map(point => (+ <li className="onboarding-compare__item" key={point}>+ <span+ className="onboarding-compare__mark onboarding-compare__mark--con"+ aria-hidden="true"+ >+ −+ </span>+ <span>{point}</span>+ </li>+ ))}+ </ul>+ </section>+ ))}+ </div>+ <div className="auth-flow-card__actions">+ <Button block onClick={onChooseHosted}>+ Evenfire hosts it+ </Button>+ <Button block variant="soft" onClick={onChooseSelfHosted}>+ I’ll run it myself+ </Button>+ </div>+ </>+ )+}diff --git a/desktop-app/ui/src/pages/OnboardingPage/steps/PathChoice.tsx b/desktop-app/ui/src/pages/OnboardingPage/steps/PathChoice.tsxindex 8540c234e..c462322c1 100644--- a/desktop-app/ui/src/pages/OnboardingPage/steps/PathChoice.tsx+++ b/desktop-app/ui/src/pages/OnboardingPage/steps/PathChoice.tsx@@ -39,6 +39,16 @@ export function PathChoice({ step, onAnswerOrigin, onAnswerRunStyle }: PathChoicDeploy Evenfire to a cluster you control.</span></SelectableOption>+ <SelectableOption+ className="onboarding-option"+ size="lg"+ onClick={() => onAnswerRunStyle('compare')}+ >+ <span className="onboarding-option__title">I have no idea</span>+ <span className="onboarding-option__hint">+ Tell me more about the other two options.+ </span>+ </SelectableOption></div></>)diff --git a/desktop-app/ui/src/pages/OnboardingPage/types.ts b/desktop-app/ui/src/pages/OnboardingPage/types.tsindex 1ce24a6f9..dee61d977 100644--- a/desktop-app/ui/src/pages/OnboardingPage/types.ts+++ b/desktop-app/ui/src/pages/OnboardingPage/types.ts@@ -6,13 +6,25 @@* action touches disk.*/-export type OnboardingStep = 'origin' | 'runStyle' | 'invited' | 'hosted' | 'selfHosted' | 'manual'+export type OnboardingStep =+ | 'origin'+ | 'runStyle'+ | 'compare'+ | 'invited'+ | 'hosted'+ | 'selfHosted'+ | 'manual'/** Q1 — "Do you already have an Evenfire server?" */export type OnboardingOriginAnswer = 'invited' | 'haveAddress' | 'gettingStarted'-/** Q2 — "How do you want to run Evenfire?" */-export type OnboardingRunStyleAnswer = 'hosted' | 'selfHosted'+/**+ * Q2 — "How do you want to run Evenfire?"+ *+ * `compare` is the undecided answer: it leads to a side-by-side of the other+ * two rather than committing the user to either.+ */+export type OnboardingRunStyleAnswer = 'hosted' | 'selfHosted' | 'compare'export interface OnboardingViewModel {step: OnboardingStepdiff --git a/desktop-app/ui/src/pages/__tests__/OnboardingPage.test.tsx b/desktop-app/ui/src/pages/__tests__/OnboardingPage.test.tsxindex b37075e35..8d8158e84 100644--- a/desktop-app/ui/src/pages/__tests__/OnboardingPage.test.tsx+++ b/desktop-app/ui/src/pages/__tests__/OnboardingPage.test.tsx@@ -157,6 +157,53 @@ describe('OnboardingPage', () => {expect(hosted.textContent).not.toMatch(/free|trial|week|\d+\s*day/i)})+ it('offers an undecided answer that compares the two run styles', async () => {+ const user = userEvent.setup()++ renderOnboarding()+ await user.click(screen.getByRole('button', { name: /No, I’m just getting started/ }))+ await user.click(screen.getByRole('button', { name: /I have no idea/ }))++ expect(screen.getByText('Which one is right for you?')).toBeTruthy()++ // Both options are described, each with an upside and a downside — a+ // comparison that only lists benefits is an advert, not a comparison.+ const compare = screen.getByText('Which one is right for you?').closest('section')+ const copy = compare?.textContent || ''+ expect(copy).toContain('Evenfire hosts it')+ expect(copy).toContain('You run it yourself')+ expect(screen.getAllByText('+').length).toBeGreaterThanOrEqual(2)+ expect(screen.getAllByText('−').length).toBe(2)+ })++ it('makes no cost claims while hosted signup does not exist', async () => {+ const user = userEvent.setup()++ renderOnboarding()+ await user.click(screen.getByRole('button', { name: /No, I’m just getting started/ }))+ await user.click(screen.getByRole('button', { name: /I have no idea/ }))++ const copy = screen.getByText('Which one is right for you?').closest('section')?.textContent+ expect(copy).not.toMatch(/free|trial|price|pricing|\$|per seat|subscription/i)+ })++ it('lets the undecided user commit to either run style', async () => {+ const user = userEvent.setup()++ renderOnboarding()+ await user.click(screen.getByRole('button', { name: /No, I’m just getting started/ }))+ await user.click(screen.getByRole('button', { name: /I have no idea/ }))+ await user.click(screen.getByRole('button', { name: 'I’ll run it myself' }))+ expect(screen.getByText('Run Evenfire yourself')).toBeTruthy()++ // Back returns to the comparison, not past it to Q2.+ await user.click(screen.getByRole('button', { name: 'Back' }))+ expect(screen.getByText('Which one is right for you?')).toBeTruthy()++ await user.click(screen.getByRole('button', { name: 'Evenfire hosts it' }))+ expect(screen.getByText('Evenfire hosts it for you')).toBeTruthy()+ })+it('routes the hosted answer to a link-out step with a manual fallback', async () => {const user = userEvent.setup()const handleSaveRuntimeConfig = vi.fn()diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex 22f360454..473d0c3e6 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -10263,6 +10263,9 @@ button.page-breadcrumb-link--plain-action:hover:enabled {for a card that holds still. Capped against the viewport so a short windowscrolls the body instead of overflowing. */.auth-card--flow {+ /* 20% wider than the base auth card (420px): the wizard carries option rows+ and the run-style comparison, which read cramped at sign-in's width. */+ width: min(504px, 94vw);height: min(540px, 86vh);/* header, divider, body, footer — the body takes the slack. */grid-template-rows: auto auto 1fr auto;@@ -10318,6 +10321,60 @@ button.page-breadcrumb-link--plain-action:hover:enabled {color: var(--text-muted);}+/* Q2's "I have no idea" branch: the two run styles compared. Stacked rather+ than side-by-side columns, which would be unreadable at the card's width. */+.onboarding-compare {+ display: grid;+ gap: var(--space-3);+}++.onboarding-compare__group {+ display: grid;+ gap: var(--space-1-5);+}++.onboarding-compare__title {+ font-size: var(--font-size-md);+ font-weight: var(--font-weight-semibold);+ line-height: var(--line-height-tight);+ color: var(--text);+}++.onboarding-compare__lead {+ font-size: var(--font-size-sm);+ line-height: 1.4;+ color: var(--text-muted);+}++.onboarding-compare__list {+ display: grid;+ gap: var(--space-1);+ margin: 0;+ padding: 0;+ list-style: none;+}++.onboarding-compare__item {+ display: grid;+ grid-template-columns: auto 1fr;+ gap: var(--space-1-5);+ font-size: var(--font-size-sm);+ line-height: 1.45;+ color: var(--text-muted);+}++.onboarding-compare__mark {+ font-weight: var(--font-weight-semibold);+}++.onboarding-compare__mark--pro {+ color: var(--success);+}++.onboarding-compare__mark--con {+ color: var(--warning);+}+.auth-button-loading {display: inline-flex;align-items: center;