Skip to content

feat: wallet login and improved onboarding#1589

Open
joelorzet wants to merge 190 commits into
stagingfrom
feat/keep-171-improve-user-onboarding-experience
Open

feat: wallet login and improved onboarding#1589
joelorzet wants to merge 190 commits into
stagingfrom
feat/keep-171-improve-user-onboarding-experience

Conversation

@joelorzet

@joelorzet joelorzet commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Turns the anonymous-first canvas into a real onboarding experience: a welcome / sign-in page for logged-out visitors, Sign-In With Ethereum (SIWE) wallet login alongside email and social, a post-signup setup wizard, and an in-app "connect your AI agent" flow that uses browser sign-in (OAuth) instead of API keys.

Sign-in and wallet login

  • One sign-in surface shared by the /welcome landing and the in-app modal: Google and GitHub, an email + password form, and a "Wallet" option that reveals the EIP-6963 wallet picker (MetaMask, Brave, Rabby, Coinbase, and so on, each with its own icon). TOTP-enrolled users get an MFA step-up dialog inline.
  • SIWE wallet login via Better Auth's siwe plugin, verified offline with viem. The signature is the auth factor: wallet sessions are minted MFA-satisfied and the proxy exempts wallet users from the mandatory-TOTP gate (unless their org enforces MFA). Wallet accounts get a generated human-readable handle, never a raw 0x address, and a first-login rename dialog persists it.
  • The in-app anonymous entry point is now labeled "Sign in".

Welcome landing and session gating

  • Logged-out visitors are routed to /welcome (at the proxy and the root client gate) instead of the bare canvas. An "Explore without signing in" escape hatch keeps the anonymous-first path: it mints an anonymous session, drops into the canvas, and does not re-wall on reload.
  • A real, not-yet-onboarded user is sent into the setup wizard; an already-onboarded user goes straight to the canvas.

Onboarding wizard

  • Three skippable steps, each on its own URL: rename the auto-created organization, invite members, and connect an AI agent. Finishing marks onboarding complete server-side and opens the canvas.
  • The connect-agent step shows the MCP endpoint and per-client setup commands (Claude Code, Claude Desktop, Codex, Gemini CLI, Goose, OpenClaw, plus Claude / Hermes / Eve plugins), all OAuth-only with no API key, next to a branded, animated preview of an agent session (terminal or chat depending on the client) with copyable starter prompts.

Getting-started launcher

  • The floating checklist's "Connect your agent" now opens an in-app modal with the same MCP endpoint, per-client commands, and starter prompts, instead of the API-keys overlay. An API key is not required to connect an agent.

MFA

  • Email and social accounts must enroll TOTP; the mandatory-enrollment gate lives in the proxy. Wallet accounts are exempt by default. Owners can turn on organization-level MFA enforcement from a new Security tab in org settings.

Database

  • New wallet_address table, users.display_name_confirmed, users.onboarding_completed, plus step-up-policy and org-MFA-enforcement tables, with migrations.

Tests

  • E2E: welcome landing and onboarding root-gating coverage (unauthenticated wall, guest path with no re-wall, onboarded user to canvas, and a fresh signup walked through the wizard to the canvas). The shared auth helpers and persistent-user seed were updated for the /welcome sign-in landing.
  • Unit: proxy and dual-auth tests aligned with the new welcome redirect and the no-active-org membership fallback.

Comment thread components/settings/wallet-security-section.tsx Fixed
joelorzet added 4 commits July 2, 2026 21:43
Stop swallowing the duplicate error in the Get Started launcher: log it and
show the server's actual message instead of a generic toast, so a failed
clone (e.g. no active organization, or a missing source workflow) is
diagnosable instead of silently doing nothing.
Drive a shared rootGate atom from the homepage and read it in
PersistentCanvas: on "/" the canvas is not rendered at all while the
session and onboarding decision is pending or redirecting to the welcome
flow. Gating the render (instead of overlaying the canvas) removes the
canvas-then-welcome flash entirely, independent of stacking or SSR.
resolveSessionOrg returned no organization when a session had no active
org yet (e.g. a brand-new signup whose active-org backfill has not landed),
which made org-scoped writes like workflow duplicate 409 with "no active
organization". Fall back to the caller's first non-deactivated membership
so their own writes resolve an org, matching how onboarding recommendations
already resolves one.
On signup, seed three example workflows into the new user's organization
(non-anonymous only) so the app is not an empty canvas. Onboarding now opens
the first one on the canvas when the wizard finishes, and the trio shows in
the sidebar. Seeding is best-effort and never fails signup.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

PR Environment Deployed

Your PR environment has been deployed!

Environment Details:

Components:

  • Keeperhub Application
  • PostgreSQL Database (isolated instance)
  • LocalStack (SQS emulation)
  • Redis (isolated instance)
  • Schedule Dispatcher (staging image)
  • Block Dispatcher (staging image)
  • Event Tracker (staging image)

The environment will be automatically cleaned up when this PR is closed or merged.

joelorzet added 17 commits July 3, 2026 13:16
Restructure the sign-in surface into a single default view: a Google,
GitHub, and Wallet button row, an OR divider, and the email + password
form inline (no more Email button). Wallet reveals the wallet picker via
an onWalletClick handoff. Signup, forgot-password, verify, and MFA flows
are unchanged.
Replace AuthDialog's bespoke social/email/verify/MFA implementation with the
shared SignInChoices surface, so every trigger (sidebar requireAuth nav,
activity, use-template, accept-invite, add-connection, the device page) shows
the same modal as the Connect button and welcome page. Preserves the exported
open/tracking API (controlled mode, children trigger, setConnectPanelActive,
isAuthFlowInProgress).
Drop the Connect-agent / Monitor / Yield tabs and the Contact-us / Take-a-tour
footer. The launcher now shows one linear checklist -- Wallet ready, Connect
your agent, Run your first workflow -- and the only tour entry is the guided
tour button inside the Run-your-first-workflow step.
Render the launcher inside the navigation sidebar, just above the
Discord/Documentation divider, instead of a floating bottom-corner pill. The
pill sits in-flow (icon-only when the sidebar is collapsed) and the expanded
card floats up from it, opening and closing from the bottom-left corner.
Remove Take a tour and Contact support from the account dropdown, and move
Getting started down into the section directly above Logout (where Take a
tour was).
Drop the mandatory org API key and the bearer header; every client connects
over MCP with browser OAuth. Group the setup into Agents (Claude Code, Claude
Desktop, OpenClaw, Codex, Gemini CLI, Goose, other) and Plugins (Claude,
Hermes, Eve), each with the real brand icon. Replace the API-keys preview with
copyable example workflow prompts (green check on copy).
Use a translucent bg-muted/20 tab list in the connect-agent setup instead of
the solid gray box, and swap Goose and Gemini CLI so the grid wraps cleanly.
…erience

# Conflicts:
#	components/organization/manage-orgs-modal.tsx
#	drizzle/meta/_journal.json
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

PR Environment Deployment Failed

The PR environment deployment encountered an error.

Please check the workflow logs for details.

Common issues:

  • Database initialization timeout
  • Image build failures
  • Resource constraints

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

PR Environment Deployed

Your PR environment has been deployed!

Environment Details:

Components:

  • Keeperhub Application
  • PostgreSQL Database (isolated instance)
  • LocalStack (SQS emulation)
  • Redis (isolated instance)
  • Schedule Dispatcher (staging image)
  • Block Dispatcher (staging image)
  • Event Tracker (staging image)

The environment will be automatically cleaned up when this PR is closed or merged.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

PR Environment Deployed

Your PR environment has been deployed!

Environment Details:

Components:

  • Keeperhub Application
  • PostgreSQL Database (isolated instance)
  • LocalStack (SQS emulation)
  • Redis (isolated instance)
  • Schedule Dispatcher (staging image)
  • Block Dispatcher (staging image)
  • Event Tracker (staging image)

The environment will be automatically cleaned up when this PR is closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants