You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AnonymousAuth is dead code that is broken at runtime and fails check-types #1542
Severity: Medium (blocks bun run check-types for the whole monorepo) File:packages/ui/other/anonymous-auth.tsx
Description
The component treats every better-auth client call as if it returned raw data,
but the client returns { data, error }. Every access is therefore undefined
at runtime:
So the component can only ever do one thing: throw and redirect to /login.
The org-listing branches (orgs?.length, orgs?.map, orgs?.[0], org.slug)
are equally wrong — authClient.organization.list() returns { data, error }
too.
tsc reports 21 errors in this one file, and because @repo/ui is a dependency
of @repo/web and supermemory-mcp, bun run check-types fails at the root:
@repo/ui:check-types: other/anonymous-auth.tsx(17,18): error TS2339: Property 'session' does not exist on type 'Data<...> | Error$1<...>'
... 20 more
ERROR run failed: command exited (2)
Failed: @repo/ui#check-types
Impact
AnonymousAuth has zero importers — grep -rn "AnonymousAuth" apps packages
matches only its own definition. It is unreferenced dead code that is
nonetheless red-lighting type checks for every consumer package.
Suggested fix
Delete packages/ui/other/anonymous-auth.tsx. If anonymous sign-in is still
wanted later, it should be rewritten against the { data, error } contract
rather than resurrected as-is.
Activity
linear-code commentedon Aug 19, 2026
ENG-1200