Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Member
Author
There was a problem hiding this comment.
1 issue found across 11 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/checkDocExamples.ts">
<violation number="1" location="scripts/checkDocExamples.ts:308">
P2: Diagnostics for the prelude and stubs are never collected. `getPreEmitDiagnostics(program, sourceFile)` only returns errors for that example file, so a broken `PRELUDE` type silently degrades to `any`. Also collect `getPreEmitDiagnostics` for `prelude.d.ts` and the stub files and report them as errors.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| return new Map( | ||
| examples.map((e) => [ | ||
| e, | ||
| ts.getPreEmitDiagnostics(program, program.getSourceFile(e.path)), |
There was a problem hiding this comment.
P2: Diagnostics for the prelude and stubs are never collected. getPreEmitDiagnostics(program, sourceFile) only returns errors for that example file, so a broken PRELUDE type silently degrades to any. Also collect getPreEmitDiagnostics for prelude.d.ts and the stub files and report them as errors.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/checkDocExamples.ts, line 308:
<comment>Diagnostics for the prelude and stubs are never collected. `getPreEmitDiagnostics(program, sourceFile)` only returns errors for that example file, so a broken `PRELUDE` type silently degrades to `any`. Also collect `getPreEmitDiagnostics` for `prelude.d.ts` and the stub files and report them as errors.</comment>
<file context>
@@ -0,0 +1,360 @@
+ return new Map(
+ examples.map((e) => [
+ e,
+ ts.getPreEmitDiagnostics(program, program.getSourceFile(e.path)),
+ ]),
+ );
</file context>
Nicolapps
marked this pull request as draft
October 21, 2026 00:17
Nicolapps
marked this pull request as ready for review
October 21, 2026 00:25
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:27
116b875 to
80bd8cc
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:34
80bd8cc to
de4ff77
Compare
Nicolapps
force-pushed
the
nicolas/ssr-refresh-result-docs
branch
from
October 21, 2026 00:34
14153bb to
b360f3e
Compare
Nicolapps
changed the base branch from
nicolas/ssr-refresh-result-docs
to
graphite-base/763
October 21, 2026 00:37
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:38
de4ff77 to
6a4301b
Compare
Nicolapps
force-pushed
the
graphite-base/763
branch
from
October 21, 2026 00:38
b360f3e to
a292d32
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:38
6a4301b to
d656d8f
Compare
commit: |
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:45
d656d8f to
635ba5b
Compare
Nicolapps
changed the base branch from
graphite-base/763
to
nicolas/doc-fix-ssr-auth-import
October 21, 2026 00:45
This was referenced Oct 21, 2026
Nicolapps
force-pushed
the
nicolas/doc-fix-ssr-auth-import
branch
from
October 21, 2026 00:58
293ee8d to
491a982
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 00:59
f5f2ac6 to
85ae2f0
Compare
Nicolapps
changed the base branch from
nicolas/doc-fix-ssr-auth-import
to
graphite-base/763
October 21, 2026 01:08
Nicolapps
force-pushed
the
graphite-base/763
branch
from
October 21, 2026 01:08
491a982 to
e6a21a6
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:08
85ae2f0 to
8e7fe50
Compare
Nicolapps
changed the base branch from
graphite-base/763
to
nicolas/doc-fix-username-passkey
October 21, 2026 01:08
Nicolapps
force-pushed
the
nicolas/doc-fix-username-passkey
branch
from
October 21, 2026 01:14
e6a21a6 to
0c503ed
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:14
8e7fe50 to
18427c0
Compare
Nicolapps
added a commit
that referenced
this pull request
Oct 21, 2026
The `useCompleteSignUp` example used `emailCode` without declaring it. This puts the example in a component that takes the code as a prop, like the `useCompletePasswordRecovery` example. Found by the doc example check in #763.
Nicolapps
force-pushed
the
nicolas/doc-fix-username-passkey
branch
from
October 21, 2026 01:17
0c503ed to
82143a8
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:17
18427c0 to
d247a91
Compare
Nicolapps
added a commit
that referenced
this pull request
Oct 21, 2026
The `setupEmailPassword` example imported `env` from `../../components/email/_generated/server`, a path inside this package. An app imports it from `./_generated/server`, like `examples/react-email-password` does. It also renames the callback to `internal.users.createUserEmailPassword`, in line with the examples of the other methods (`createUserPassword`, `createUserGoogle`, …). Found by the doc example check in #763.
Nicolapps
force-pushed
the
nicolas/doc-fix-username-passkey
branch
from
October 21, 2026 01:21
82143a8 to
376dedf
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:21
d247a91 to
1442743
Compare
Nicolapps
added a commit
that referenced
this pull request
Oct 21, 2026
The `setupGoogle`, `setupApple` and `setupGithub` examples passed `auth` without declaring it. They now start with `const auth = setupConvexAuth({ component: components.auth })` and export `signOut`, `refreshSession` and `isAuthenticated`, like the examples of the other methods.
Found by the doc example check in #763.
Nicolapps
force-pushed
the
nicolas/doc-fix-username-passkey
branch
from
October 21, 2026 01:25
376dedf to
579d462
Compare
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:25
1442743 to
6b5b73a
Compare
Nicolapps
added a commit
that referenced
this pull request
Oct 21, 2026
The sign-in route examples (`convexProxyHandler` in `ssr/signInProxy.ts` and `ssr/setup.ts`) used `auth.convexProxyHandler` without a declaration. They now import `auth` from `@/auth`, the Next.js module of the app that calls `setupConvexAuthServer`, with a comment that says so. The main `setupConvexAuthServer` example now names that file (`// auth.ts`), so `@/auth` points to something on the page. The sign-in route, which used to be in the same code block without an import, is now its own block with the import. Found by the doc example check in #763.
Nicolapps
force-pushed
the
nicolas/doc-fix-username-passkey
branch
from
October 21, 2026 01:29
579d462 to
9766d3b
Compare
tsc does not read the code in a doc comment, thus the broken httpCookies example fixed in #734 passed every check. Add `pnpm check:doc-examples`, which typechecks each ts/tsx code block in the doc comments of packages/core/src, and run it in CI. The examples compile as modules of packages/doc-examples, a private Convex app that installs every component and sets up every sign-in method, with committed codegen. Thus api, internal, components, env and ctx have their real generated types, and @/auth resolves to its SSR setup. Fix the examples that the check finds: undeclared variables (the OAuth examples now declare their own `auth`, the SSR examples import it from @/auth), pseudo-code JSX, a top-level return, and a wrong import path for `env`.
Nicolapps
force-pushed
the
nicolas/check-doc-examples
branch
from
October 21, 2026 01:30
6b5b73a to
c246f43
Compare
cursor
Bot
changed the base branch from
nicolas/doc-fix-username-passkey
to
graphite-base/763
October 22, 2026 21:31
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.

The broken
httpCookiesexample fixed in #734 got through CI becausetscdoesn't read code in doc comments, and nothing else checked it. TypeDoc copies these examples into the API reference and the shipped.d.ts.This adds
pnpm check:doc-examples(scripts/checkDocExamples.ts) and runs it in the TypeScript workflow afterpnpm build. The script finds every```ts/```tsxblock in a/** */comment underpackages/core/srcand typechecks each one as a module of a sample app.The sample app:
packages/doc-examplesA private Convex app (not an example to copy) that installs every component and sets up every sign-in method in one
convex/auth.ts, including a genericsetupOauthprovider ("acme"). Its_generated/is committed, and the existing codegen workflow keeps it up to date. A Next-style rootauth.tswithsetupConvexAuthServeris reachable as@/auth.Thus
api,internal,components,envandctxin the examples have their real generated types, notany.How an example is checked
src/, examples fromssr/go inapp/, and the rest go inconvex/, so../convex/_generated/api,./_generated/serverand@/authresolve to real files. The app'stsconfig.jsonis used.@convex-dev/auth, the other entry points,react,convex/*, the app's_generated/apiand_generated/server, and then the commented file itself.ctx(the app'sQueryCtx),app(itsconvex.config.ts), the component definitions, react-router'sNavigate, andexpo-secure-store.```ts skip-checkopts a block out. It's used once, for the internalbuildCallbackRouterexample, which refers to names of a component.With the old
httpCookiesexample put back, the check reports the unknownauthApioption and theRefreshResultbeing passed as a token bundle. Puttingapi.auth.startSignInAcmee,env.RESEND_KEY, orcomponents.authPassword(in place ofauthGoogle) into an example also makes it fail.Examples fixed
The examples that the check found broken are fixed in the PRs below this one, one PR per fix: #767, #768, #769, #770, #771, #772, #773.
The script also runs in
preversion, and AGENTS.md describes it and the sample app.A finding
setupOauthtakes the user callbacks as a direct argument, not throughattachUserCallbacks. As a result, passinginternal.users.createUserAcmefrom a module that is part ofapifails with TS7022 (the type ofapidepends on itself). The sample app works around it withmakeFunctionReference. Apps that use the generic OAuth method would hit the same error.