Skip to content
This repository was archived by the owner on Oct 1, 2026. It is now read-only.

Fix agent dashboard auth path in Convex - #34

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

codybmenefee merged 1 commit into
mainfrom
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant