Repository navigation
fix(onboarding): stop calendar list request from crashing and let users skip while it loads - #5
Merged
Conversation
…allow skipping while it loads getInstallCountPerApp used Next's unstable_cache, which throws "incrementalCache missing" when called from the Pages Router tRPC route (apps.integrations). The query failed and React Query retried it, leaving the onboarding calendar step on skeletons with Skip/Continue disabled. Replace it with an in-process TTL cache, and stop gating Skip/Continue on the list. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019VUFQx2U3zsKWTjCG8J6p9
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
threos
marked this pull request as ready for review
October 16, 2026 16:35
This branch was successfully deployed
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.
Requested by Eray · project thread
What does this PR do?
Before: the onboarding "Connect your calendar" step sat on skeleton cards for up to a minute, with "Skip for now" and "Continue" disabled the whole time.
After: the calendar providers load straight away, and Skip/Continue work even while the list is still loading.
Root cause, confirmed in production logs on app.tikket.dev: every
GET /api/trpc/apps/integrationsfails withInvariant: incrementalCache missing in unstable_cache. The query sorts apps by popularity viagetInstallCountPerApp, which wrapped the DB call in Next'sunstable_cache. That only works inside App Router rendering, but tRPC runs as a Pages Router API route, so it threw on every call. React Query then retried with backoff, which is the long skeleton wait.How:
packages/lib/apps/getInstallCountPerApp.ts: replaceunstable_cachewith a small in-process cache (same 5 minute TTL, in-flight request shared, failures not cached). This works in both App Router pages (_appRegistry) and API routes, and drops thenext/cacheimport frompackages/lib.personal-calendar-view.tsx: Skip and Continue are now gated only on the submit, not on the integrations query.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
TZ=UTC yarn vitest run packages/lib/apps/getInstallCountPerApp.test.ts(new: mapping, cache hit, TTL expiry, failures not cached)./onboarding/personal/calendar: provider cards should appear immediately, and Skip should be clickable from the start./api/trpc/apps/integrationsshould return 200.🤖 Generated with Claude Code
https://claude.ai/code/session_019VUFQx2U3zsKWTjCG8J6p9
Generated by Claude Code