Release 0.2.0-next.5: auth fail-safe + regression test - #3
Merged
Merged
Conversation
The onAuthStateChange getUser-rejection fix already landed on main (#2), but main is still at 0.1.1 so it hasn't shipped to the `next` (canary) channel that sdk-canary apps pull. Bump to 0.2.0-next.5 to cut that release, add a regression test that a rejecting /users/me session check still fires SIGNED_OUT (rather than hanging <AuthGate> on a blank screen — the cause of the empty project-card screenshots), and record it in the changelog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Cuts the
next(canary) release that ships theonAuthStateChangefail-safe fix, and adds a regression test for it.0.1.1→0.2.0-next.5(publishes to thenextdist-tag on release)./users/mesession check must still fireSIGNED_OUT.Why
The code fix (add
.catch(() => callback("SIGNED_OUT", null))inonAuthStateChange) already landed onmainin #2 — butmainis still at0.1.1, so it hasn't been published to thenextchannel thatsdk-canaryapps actually pull. Until anextrelease is cut, the fix reaches no app.Background: without the
.catch, when the initial/users/mefetch rejects (cross-origin/network failure — e.g. the sandbox-preview context Cloudflare screenshots run in), the state callback never fired,BoolAuthProvider.loadingnever cleared, and<AuthGate>renderednullforever. The app hung on a blank page — which is what made project-card thumbnails capture an empty background regardless of screenshot delay.After merge
Cut the release to publish to
next:The publish workflow derives the dist-tag from the prerelease version (
0.2.0-next.5→next). Thensdk-canaryapps pick it up on their next sandbox boot, and re-capturing a project (screenshot lab) should show the sign-in screen instead of a blank card.Test plan
bun run typecheck— cleanbun test— 19 pass (new reject-path test included; fails against the pre-Handle getUser rejection in onAuthStateChange #2 code)bun run build— clean🤖 Generated with Claude Code