This commit is contained in:
47
apps/web/src/components/os/auth/AccountlessNotice.tsx
Normal file
47
apps/web/src/components/os/auth/AccountlessNotice.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* AccountlessNotice — warm-Hive PR7b Auth (design screen 13) honest local-first state.
|
||||
*
|
||||
* The design's own "you don't need this to start" framing (recon 03 §2b/§5/§8). Shown
|
||||
* when hosted Clerk auth is NOT configured, which is the desktop's default accountless
|
||||
* path. It NEVER renders a fabricated identity, a fake SSO button,
|
||||
* or a sign-in that does nothing (F1/F10): the only action is to continue into the
|
||||
* fully-local app. B2 renders the real themed Clerk <SignIn/> only with explicit
|
||||
* enablement plus a valid key.
|
||||
*/
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Check } from 'lucide-react';
|
||||
|
||||
export default function AccountlessNotice() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div className="text-center">
|
||||
<div className="w-[60px] h-[60px] rounded-2xl mx-auto mb-6 grid place-items-center bg-[var(--honey-wash)] border border-[var(--honey-line)]">
|
||||
<Check className="w-7 h-7 text-honey" strokeWidth={2.2} />
|
||||
</div>
|
||||
|
||||
<h1 className="text-[26px] font-display font-semibold tracking-[-0.02em] text-foreground">
|
||||
You’re running fully local.
|
||||
</h1>
|
||||
<p className="mt-3 text-[14.5px] leading-relaxed text-[var(--text-muted)]">
|
||||
Waggle works on your machine right away — your memory, agents, and skills need no
|
||||
account. Create one only when you want to sync across devices or join a team.
|
||||
</p>
|
||||
|
||||
{/* the design's honey .localnote trust banner */}
|
||||
<div className="mt-5 p-3.5 rounded-[12px] text-left bg-[var(--honey-wash)] border border-[var(--honey-line)]">
|
||||
<p className="text-[12.5px] leading-relaxed text-[var(--text-2)]">
|
||||
<b className="text-foreground">You don’t need this to start.</b> Your data stays on
|
||||
this device until you choose to sync.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button
|
||||
onClick={() => navigate('/home')}
|
||||
className="mt-6 w-full py-3 rounded-[11px] text-[14.5px] font-[650] bg-primary text-primary-foreground hover:bg-[var(--honey-bright)] transition-colors"
|
||||
>
|
||||
Continue to Waggle →
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
63
apps/web/src/components/os/auth/AuthBrandPanel.tsx
Normal file
63
apps/web/src/components/os/auth/AuthBrandPanel.tsx
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* AuthBrandPanel — warm-Hive PR7b Auth (design screen 13) left brand panel.
|
||||
*
|
||||
* Pure custom layout chrome (recon 03 §1/§2e): hex "W" lockup + pitch + two trust
|
||||
* lines, on a warm gradient with a soft honey radial wash (the honeycomb stand-in).
|
||||
* Hidden below 820px (the design's exact breakpoint; mobile = form only) — note the
|
||||
* Tailwind `lg` default is 1024px, so we use an arbitrary `min-[820px]` variant. No auth
|
||||
* state lives here — it never renders identity.
|
||||
*/
|
||||
import { Shield, ArrowRight } from 'lucide-react';
|
||||
|
||||
export default function AuthBrandPanel() {
|
||||
return (
|
||||
<div
|
||||
className="hidden min-[820px]:flex flex-col justify-between p-14 border-r border-[var(--line-soft)] relative overflow-hidden"
|
||||
style={{ background: 'linear-gradient(160deg, var(--bg-2), var(--bg))' }}
|
||||
>
|
||||
{/* soft honey radial wash — the honeycomb texture stand-in */}
|
||||
<div
|
||||
aria-hidden
|
||||
className="absolute inset-0 pointer-events-none"
|
||||
style={{ background: 'radial-gradient(58% 48% at 30% 28%, var(--honey-wash), transparent 70%)' }}
|
||||
/>
|
||||
|
||||
{/* brand lockup */}
|
||||
<div className="relative flex items-center gap-3">
|
||||
<div
|
||||
className="w-9 h-9 grid place-items-center text-[var(--primary-foreground)] font-bold text-[16px]"
|
||||
style={{
|
||||
background: 'linear-gradient(150deg, var(--honey-bright), var(--honey-deep))',
|
||||
clipPath: 'polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%)',
|
||||
}}
|
||||
>
|
||||
W
|
||||
</div>
|
||||
<span className="text-[19px] font-display font-bold text-foreground tracking-tight">Waggle</span>
|
||||
</div>
|
||||
|
||||
{/* pitch (verbatim, recon 03 §2e) */}
|
||||
<div className="relative max-w-[420px]">
|
||||
<h2 className="text-[30px] leading-tight font-display font-semibold text-foreground tracking-[-0.02em]">
|
||||
Your work follows you, <em className="not-italic text-honey">everywhere.</em>
|
||||
</h2>
|
||||
<p className="mt-4 text-[15px] leading-relaxed text-[var(--text-2)]">
|
||||
Sign in to sync your hive across devices, collaborate with a team, and pick up any
|
||||
project exactly where you left off — on any machine.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* trust lines (verbatim, recon 03 §2e) */}
|
||||
<div className="relative grid gap-3">
|
||||
<div className="flex items-center gap-2.5 text-[13.5px] text-[var(--text-muted)]">
|
||||
<Shield className="w-4 h-4 shrink-0 text-honey" strokeWidth={2} />
|
||||
An account is optional — Waggle runs fully local without one
|
||||
</div>
|
||||
<div className="flex items-center gap-2.5 text-[13.5px] text-[var(--text-muted)]">
|
||||
<ArrowRight className="w-4 h-4 shrink-0 text-honey" strokeWidth={2} />
|
||||
Your memory stays yours; sign-in only adds sync
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
23
apps/web/src/components/os/auth/AuthScreen.tsx
Normal file
23
apps/web/src/components/os/auth/AuthScreen.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* AuthScreen — warm-Hive PR7b Auth (design screen 13) split-layout shell.
|
||||
*
|
||||
* Left brand panel (hidden < 820px) + right form panel (`children`). This is the ONE
|
||||
* pre-shell surface: it renders OUTSIDE AppShell (no sidebar / StatusBar / boot gate),
|
||||
* inheriting the warm tokens from <ThemeProvider> and the top-level AppErrorBoundary
|
||||
* (both already wrap <Routes> in App.tsx). The form content is injected as children so
|
||||
* B1 (accountless notice) and B2 (themed Clerk <SignIn/>, no-key fallback) share the
|
||||
* exact same chrome.
|
||||
*/
|
||||
import type { ReactNode } from 'react';
|
||||
import AuthBrandPanel from './AuthBrandPanel';
|
||||
|
||||
export default function AuthScreen({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div className="min-h-screen grid min-[820px]:grid-cols-[1.05fr_1fr] bg-background text-foreground">
|
||||
<AuthBrandPanel />
|
||||
<div className="flex items-center justify-center p-6 sm:p-10 overflow-auto">
|
||||
<div className="w-full max-w-[380px]">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
56
apps/web/src/components/os/auth/ClerkAuthForm.tsx
Normal file
56
apps/web/src/components/os/auth/ClerkAuthForm.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* ClerkAuthForm — PR7b/B2 Auth (design screen 13) real auth form.
|
||||
*
|
||||
* Rendered only when Clerk is configured (AuthRoute gates on the key; the whole app is
|
||||
* wrapped in ClerkProvider by WaggleClerkProvider). Uses Clerk's PREBUILT themed
|
||||
* <SignIn/>/<SignUp/> (D13) — which render the real social buttons (whatever is enabled
|
||||
* in the dashboard), email/password, "Forgot?", and the email-code verify step — so
|
||||
* there is NO fabricated SSO/OTP success (F10): every flow is a real Clerk round-trip.
|
||||
*
|
||||
* `routing="virtual"` embeds the multi-step flow in-place (no catch-all route needed);
|
||||
* `forceRedirectUrl="/home"` lands a signed-in user in the fully-local app. We render our
|
||||
* own design-faithful sign-in↔sign-up toggle (Clerk's built-in switch link is hidden via
|
||||
* appearance) and the §2b honey local-first note above Sign up.
|
||||
*/
|
||||
import { useState } from 'react';
|
||||
import { SignIn, SignUp } from '@clerk/clerk-react';
|
||||
import EnterpriseCTA from './EnterpriseCTA';
|
||||
|
||||
type Mode = 'signin' | 'signup';
|
||||
|
||||
export default function ClerkAuthForm() {
|
||||
const [mode, setMode] = useState<Mode>('signin');
|
||||
|
||||
return (
|
||||
<div>
|
||||
{mode === 'signup' && (
|
||||
// The design's honey .localnote trust banner above Sign up (recon 03 §2b).
|
||||
<div className="mb-4 p-3.5 rounded-[12px] bg-[var(--honey-wash)] border border-[var(--honey-line)]">
|
||||
<p className="text-[12.5px] leading-relaxed text-[var(--text-2)]">
|
||||
<b className="text-foreground">You don’t need this to start.</b> Waggle works
|
||||
locally right away — create an account only when you want sync or a team.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{mode === 'signin' ? (
|
||||
<SignIn routing="virtual" forceRedirectUrl="/home" signUpForceRedirectUrl="/home" />
|
||||
) : (
|
||||
<SignUp routing="virtual" forceRedirectUrl="/home" signInForceRedirectUrl="/home" />
|
||||
)}
|
||||
|
||||
<p className="mt-4 text-center text-[13px] text-[var(--text-muted)]">
|
||||
{mode === 'signin' ? 'New to Waggle?' : 'Already have an account?'}{' '}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMode((m) => (m === 'signin' ? 'signup' : 'signin'))}
|
||||
className="font-[650] text-honey hover:text-[var(--honey-bright)] transition-colors"
|
||||
>
|
||||
{mode === 'signin' ? 'Create an account' : 'Sign in'}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
<EnterpriseCTA />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
24
apps/web/src/components/os/auth/EnterpriseCTA.tsx
Normal file
24
apps/web/src/components/os/auth/EnterpriseCTA.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* EnterpriseCTA — PR7b Auth (design §2d, D15). The SSO/enterprise panel as a custom
|
||||
* "Talk to sales → KVARK/Teams" CTA. NOT a live SAML/SCIM form: those are
|
||||
* Teams/KVARK/Clerk-Enterprise features, so rendering a working-looking SAML form would
|
||||
* be a fabrication (F11 / recon 03 §5.5). This is the KVARK funnel.
|
||||
*/
|
||||
export default function EnterpriseCTA() {
|
||||
return (
|
||||
<div className="mt-6 pt-5 border-t border-[var(--line-soft)] text-center">
|
||||
<p className="text-[12px] leading-relaxed text-[var(--text-muted)]">
|
||||
SAML, SCIM provisioning, and audit logs are available on{' '}
|
||||
<b className="text-foreground">Teams</b> and <b className="text-foreground">KVARK</b>.
|
||||
</p>
|
||||
<a
|
||||
href="https://www.kvark.ai"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-block mt-1.5 text-[12.5px] font-[650] text-honey hover:text-[var(--honey-bright)] transition-colors"
|
||||
>
|
||||
Talk to sales →
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user