Repository navigation
fix(ui): remove the unused, broken AnonymousAuth component - #1555
Merged
ishaanxgupta merged 1 commit intoAug 19, 2026
Merged
ishaanxgupta merged 1 commit into
ishaanxgupta merged 1 commit into
Conversation
AnonymousAuth treated every better-auth client call as if it returned raw
data, but the client returns { data, error }. Every access read undefined,
so the component could only ever do one thing: fall into the "no session"
branch, throw on the missing token, and redirect to the login path. The
org-listing branches were wrong the same way.
It has no importers anywhere in the repo -- it is unreferenced dead code
that was nonetheless failing check-types for every package that depends
on @repo/ui. All 23 of the package's type errors were in this one file.
Deleting rather than repairing: nothing calls it, so a rewrite would be
speculative. Git history has the file if anonymous sign-in comes back,
and it would need writing against the { data, error } contract regardless.
packages/ui is private and workspace-only, so removing the file is not a
published API change.
ishaanxgupta
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1542.
Why?
packages/ui/other/anonymous-auth.tsxtreats every better-auth client call as if it returned raw data, but the client returns{ data, error }. Every access readsundefined:So the component has exactly one reachable behaviour: fall into the "no session" branch, throw on the missing token, and redirect to the login path. The org-listing branches (
orgs?.length,orgs?.map,orgs?.[0],org.slug) are wrong the same way —authClient.organization.list()returns{ data, error }too.It also has no importers. Repo-wide, the identifier appears only in its own definition:
Unreferenced dead code, but it was still failing
check-typesfor every package that depends on@repo/ui. All 23 of the package's type errors were in this one file.What?
Delete it.
Repairing it instead would be speculative — nothing calls it, so there is no behaviour to preserve and no way to tell whether a rewrite matches anyone's expectations. Git history has the file if anonymous sign-in comes back, and it would need rewriting against the
{ data, error }contract regardless.packages/uiis"private": trueand workspace-only, so removing a file is not a published API change.other/glass-effect.tsxis untouched.Testing
packages/uigoes from 23 errors to 0:Because
check-typesisdependsOn: ["^check-types"],@repo/uiwas also blocking its dependents. Rootturbo run check-types:Two more packages now get to run. The remaining failure is pre-existing and unrelated — see #1545 (and #1544 for
@repo/web), both of which this PR deliberately leaves alone.