-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
docs: Fix broken documentation links to RPC TypeScript definitions #6912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update all documentation references from the old paths: - /packages/server/src/rpc/envelopes.ts - /packages/server/src/rpc/codes.ts To the new paths: - /packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts - /packages/server/src/unstable-core-do-not-import/rpc/codes.ts This fixes broken GitHub links in the documentation that were pointing to non-existent files after the RPC code was moved to the unstable-core-do-not-import directory. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
WalkthroughDocumentation links were updated across RPC and WebSockets/Subscriptions pages to point from /packages/server/src/rpc/{envelopes.ts,codes.ts} to /packages/server/src/unstable-core-do-not-import/rpc/{envelopes.ts,codes.ts}. No code, API, or behavior changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Strajk is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
@trpc/client
@trpc/next
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
www/docs/further/rpc.md (1)
292-293: LGTM – verified no remaining old RPC path references; optional tweaks below
- Confirmed that all docs now reference the
unstable-core-do-not-import/rpc/…paths, and there are no lingering links to/packages/server/src/rpc/envelopes.tsor/packages/server/src/rpc/codes.ts.- Optional: switch the GitHub URLs from
/tree/(which shows directories) to/blob/(which directly shows file contents).- Optional: for versioned documentation, consider pinning these links to a specific tag for stability; for live docs on
main, keeping them unpinned is fine.Suggested minimal tweak:
- - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) - - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts) + - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) + - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)www/versioned_docs/version-10.x/further/rpc.md (2)
260-261: Prefer blob URLs over tree for direct file linksGitHub’s
blobis the canonical URL form for files;treeis for directories and can be brittle in some contexts. Suggest switching toblobso the links reliably open the file view.- - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) - - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts) + - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) + - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)
260-261: Optional: Pin links to a stable tag/commit to avoid future driftSince these files live under “unstable-core-do-not-import,” they may move again. For versioned docs (10.x), consider pinning to a tag (e.g., the latest v10 tag) or a permalink commit to keep links valid long-term. If you prefer staying on
main, feel free to ignore.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
www/docs/further/rpc.md(1 hunks)www/docs/server/websockets.md(1 hunks)www/versioned_docs/version-10.x/further/rpc.md(1 hunks)www/versioned_docs/version-10.x/further/subscriptions.md(1 hunks)www/versioned_docs/version-9.x/further/rpc.md(1 hunks)www/versioned_docs/version-9.x/further/subscriptions.md(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-02-19T20:31:52.088Z
Learnt from: barelyhuman
PR: trpc/trpc#6530
File: packages/upgrade/src/bin/cli.ts:218-222
Timestamp: 2025-02-19T20:31:52.088Z
Learning: The CLI options `trpcFile` and `trpcImportName` in `packages/upgrade/src/bin/cli.ts` are temporary and planned to be removed in favor of using automatically discovered references from the TypeScript program.
Applied to files:
www/docs/further/rpc.mdwww/versioned_docs/version-10.x/further/rpc.mdwww/versioned_docs/version-9.x/further/rpc.md
📚 Learning: 2025-06-29T21:21:01.631Z
Learnt from: heitorlisboa
PR: trpc/trpc#6849
File: packages/tests/server/websockets.test.ts:1962-1962
Timestamp: 2025-06-29T21:21:01.631Z
Learning: In tRPC codebase, both `input` and `errors` properties consistently use `void` as their default type value in procedure definitions, following the pattern `DefaultValue<TInputIn, void>` and `DefaultValue<TErrors, void>`. This is an established architectural decision that maintains consistency across the type system, even though it diverges from general TypeScript conventions that prefer `undefined` for property types.
Applied to files:
www/docs/further/rpc.mdwww/versioned_docs/version-10.x/further/rpc.md
📚 Learning: 2025-06-29T21:21:07.306Z
Learnt from: heitorlisboa
PR: trpc/trpc#6849
File: examples/minimal-react-typesafe-errors/client/src/Users.tsx:6-6
Timestamp: 2025-06-29T21:21:07.306Z
Learning: In the minimal-react-typesafe-errors example, the `trpc.user.list` query is designed to never throw errors since it's a minimal example focused on demonstrating typed error handling in mutations rather than queries.
Applied to files:
www/docs/server/websockets.mdwww/versioned_docs/version-10.x/further/subscriptions.mdwww/versioned_docs/version-9.x/further/subscriptions.md
🪛 LanguageTool
www/docs/server/websockets.md
[grammar] ~175-~175: There might be a mistake here.
Context: ...able-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) > - [/packages/server/src/unstable-core-do-no...
(QB_NEW_EN)
www/versioned_docs/version-10.x/further/subscriptions.md
[grammar] ~129-~129: There might be a mistake here.
Context: ...able-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) > - [/packages/server/src/unstable-core-do-no...
(QB_NEW_EN)
www/versioned_docs/version-9.x/further/subscriptions.md
[grammar] ~128-~128: There might be a mistake here.
Context: ...able-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) > - [/packages/server/src/unstable-core-do-no...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: E2E-tests (standalone-server)
- GitHub Check: E2E-tests (next-prisma-starter)
- GitHub Check: E2E-tests (vercel-edge-runtime)
- GitHub Check: E2E-tests (next-formdata)
- GitHub Check: E2E-tests (fastify-server)
- GitHub Check: E2E-tests (.test/internal-types-export)
- GitHub Check: E2E-tests (express-server)
- GitHub Check: E2E-tests (.test/diagnostics-big-router)
- GitHub Check: E2E-tests (cloudflare-workers)
- GitHub Check: e2e-legacy-node (next-prisma-todomvc, 20.x)
- GitHub Check: e2e-legacy-node (next-prisma-starter, 18.x)
- GitHub Check: Release using pkg.pr.new
- GitHub Check: e2e-legacy-node (next-prisma-todomvc, 18.x)
- GitHub Check: e2e-legacy-node (next-prisma-starter, 20.x)
- GitHub Check: e2e-legacy-node (next-prisma-websockets-starter, 20.x)
- GitHub Check: E2E-tests (Bun) (bun, ubuntu-latest)
- GitHub Check: test
- GitHub Check: typecheck
- GitHub Check: Lint and auto-fix
🔇 Additional comments (4)
www/docs/server/websockets.md (1)
175-176: Update Markdown links and confirm no stale referencesThe GitHub links now correctly use
/bloband the trailing period has been removed for consistency. I ran a search for any remaining references to the oldpackages/server/src/rpc/(envelopes|codes).tspaths in markdown files; none were found.Changes applied in
www/docs/server/websockets.md(lines 175–176):- > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) - > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts). + > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) + > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)Optional: consider pinning these docs links to a specific tag or commit instead of
mainto prevent future breakage.www/versioned_docs/version-10.x/further/subscriptions.md (1)
129-130: Use/blobURLs and align punctuationThe links under
versioned_docs/version-10.x/further/subscriptions.mdshould use/blobinstead of/tree, and the second bullet should drop its trailing period. You can revisit pinning to av10.xtag once it’s published.• Swap
/tree/main/...→/blob/main/...for both file links
• Remove the trailing period on the second bullet
• (Optional) After v10.0.0 is tagged, replacemainwithv10.0.0in these URLsSuggested patch:
- > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) - > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts). + > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) + > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)www/versioned_docs/version-9.x/further/subscriptions.md (1)
128-130: Harmonize links, remove trailing punctuation, and pin to v9.9.1Proposed changes in
www/versioned_docs/version-9.x/further/subscriptions.md(lines 128–130):- > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) - > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts). + > - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/v9.9.1/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) + > - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/v9.9.1/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)
- Switched
tree/maintoblob/v9.9.1to pin to the latest stable 9.x tag.- Unified
/blob/URL form for direct file access.- Removed the trailing period on the second item for consistent punctuation.
www/versioned_docs/version-10.x/further/rpc.md (1)
260-261: Verified: No stale RPC references & all GitHub links resolve
- Ran
rg -n "/packages/server/src/rpc/(envelopes|codes)\.ts" --glob "www/**"and found no matches—there are no leftover references to the old paths.- Tested both
treeandblobURLs for/packages/server/src/unstable-core-do-not-import/rpc/{envelopes,codes}.ts; all returned HTTP 200, so the links in the docs resolve correctly.No further changes needed.
| - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) | ||
| - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Updated targets look right; align link style and punctuation
- Consider switching to
/blob/for direct file view. - Remove the trailing period from the second bullet or add one to the first; pick one style across the site. Given other pages omit the period, removing it is least intrusive.
Patch:
- - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts)
- - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts).
+ - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts)
+ - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)Optional: Because this is a versioned doc, link to a 9.x tag/commit to avoid future breakage.
Search for any remaining legacy paths:
🏁 Script executed:
#!/bin/bash
rg -nP --type=md -C1 '/packages/server/src/rpc/(envelopes|codes)\.ts'Length of output: 71
🏁 Script executed:
#!/bin/bash
# Search for any markdown links to the unstable RPC files to verify link styles across the docs
rg -n --type=md '/packages/server/src/unstable-core-do-not-import/rpc/(envelopes|codes)\.ts' -C1Length of output: 3200
Align link style and punctuation across all docs
The markdown links to the unstable-core RPC files currently use /tree/main/... and mix trailing periods on bullet items. To keep consistency with the rest of the site, please:
- Switch all
/tree/main/...URLs to/blob/main/...so they render as file views. - Remove trailing periods from these bullets (other pages omit them).
- (Optional) For versioned docs, consider pointing at the specific version tag (e.g.
blob/v9.x/...) instead ofmainto prevent future breakage.
Files needing updates:
- www/versioned_docs/version-9.x/further/rpc.md (lines 255–256)
- www/versioned_docs/version-9.x/further/subscriptions.md (lines 128–129)
- www/versioned_docs/version-10.x/further/rpc.md (lines 260–261)
- www/versioned_docs/version-10.x/further/subscriptions.md (lines 129–130)
- www/docs/further/rpc.md (lines 292–293)
- www/docs/server/websockets.md (lines 175–176)
Example patch for each occurrence:
- - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts)
- - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts).
+ - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts)
+ - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) | |
| - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/tree/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts). | |
| - [/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts) | |
| - [/packages/server/src/unstable-core-do-not-import/rpc/codes.ts](https://github.com/trpc/trpc/blob/main/packages/server/src/unstable-core-do-not-import/rpc/codes.ts) |
🤖 Prompt for AI Agents
In www/versioned_docs/version-9.x/further/rpc.md around lines 255–256, the two
bullet links currently use /tree/main URLs and include trailing periods; update
the URLs to use /blob/main (or better, /blob/v9.x/ to pin to this release), and
remove the trailing periods from the bullet lines so they match site style and
render as file views.
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Update all documentation references from the old paths:
To the new paths:
This fixes broken GitHub links in the documentation that were pointing to non-existent files after the RPC code was moved to the unstable-core-do-not-import directory.
🤖 Generated with Claude Code & verified by human :)
🎯 Changes
Docs bugfix
✅ Checklist
Summary by CodeRabbit