Skip to content

Fix agent dashboard auth path in Convex#34

Merged
codybmenefee merged 1 commit intomainfrom
codex/fix-agent-dashboard-server-access
Feb 9, 2026
Merged

Fix agent dashboard auth path in Convex#34
codybmenefee merged 1 commit intomainfrom
codex/fix-agent-dashboard-server-access

Conversation

@codybmenefee
Copy link
Copy Markdown
Owner

Summary

  • wire Convex to Clerk auth using ConvexProviderWithClerk so ctx.auth.getUserIdentity() is populated server-side
  • fix agent farm access guards to accept Clerk org claim (org_id) as a fallback when user farm fields are stale
  • backfill blank users.farmExternalId / users.activeFarmExternalId on existing records during createUser and setActiveFarm

Why
Users with valid billing entitlements were still blocked by server-side agentAdmin:getDashboardState because backend identity/farm access checks were relying on stale or missing mirrors.

Validation

  • cd app && npx eslint src/main.tsx convex/lib/agentAccess.ts convex/agentAdmin.ts convex/users.ts
  • cd app && pnpm run build

@codybmenefee codybmenefee merged commit 5f61f42 into main Feb 9, 2026
1 check passed
@codybmenefee codybmenefee deleted the codex/fix-agent-dashboard-server-access branch February 9, 2026 05:24
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.

1 participant