Skip to content

fix: Gmail/X sign-in auth + wallet linking + Luca chat gate#216

Merged
danbuildss merged 1 commit into
mainfrom
claude/luca-aeon-skills-caygz-ybmgik
Jul 25, 2026
Merged

fix: Gmail/X sign-in auth + wallet linking + Luca chat gate#216
danbuildss merged 1 commit into
mainfrom
claude/luca-aeon-skills-caygz-ybmgik

Conversation

@danbuildss

Copy link
Copy Markdown
Owner

Summary

  • Users table — new migration creates public.users keyed by privy:<privyId> for all Gmail/X sign-in accounts. Previously Privy users had no persistent row anywhere, so wallet saves silently failed.
  • Wallet API fixed for Privy usersGET/POST/DELETE /api/user/wallet now routes Privy users to the users table and access-code users to access_codes. Linking and unlinking both work correctly.
  • Unlink button fixed — added the missing DELETE handler (Settings page was calling it but it didn't exist).
  • Luca chat gate removed — chat is open to anyone logged in. Wallet linking is optional — it just auto-selects your agent in the dropdown.

Before merging — run this in Supabase SQL editor

CREATE TABLE IF NOT EXISTS public.users (
  id           text PRIMARY KEY,
  email        text,
  x_handle     text,
  wallet       text,
  last_seen_at timestamptz DEFAULT now(),
  created_at   timestamptz NOT NULL DEFAULT now()
);
ALTER TABLE public.users ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Service role can manage users" ON public.users FOR ALL USING (true) WITH CHECK (true);

Test plan

  • Sign in with Gmail → wallet link in Settings saves and reads back correctly
  • Sign in with X → same
  • Unlink wallet button works (no 404)
  • Luca chat opens immediately without needing a wallet linked
  • Link wallet matching an agent → agent auto-appears in chat dropdown

Generated by Claude Code

- Create users table (migration) for Privy-authenticated accounts
- Fix /api/access to upsert into users table with correct id field
- Route /api/user/wallet GET/POST/DELETE to users table for Privy users,
  access_codes for legacy invite-code users
- Add missing DELETE /api/user/wallet handler (Unlink button was broken)
- Remove Luca chat gate — anyone logged in can chat immediately,
  wallet linking is optional for agent-scoped context

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zetta Ready Ready Preview, Comment Jul 25, 2026 11:40pm

@danbuildss
danbuildss merged commit 6f3f1c8 into main Jul 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants