Skip to content

Conversation

@maxscn
Copy link
Contributor

@maxscn maxscn commented Aug 29, 2025

Changed the auth callback route to be api/auth/callback.tsx, which matches the env.example. Also corrected a typo in router.tsx which prevents type safe loaders.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected a typo in the router declaration to restore proper editor autocomplete and types.
    • Updated the auth callback route from /callback to /api/auth/callback so the example app uses the new callback endpoint.
  • Chores

    • Adjusted internal auth module imports to match project reorganization (no runtime behavior changes).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Renames a module augmentation property rotuerrouter and moves/renames the auth callback route from /callback/api/auth/callback (with updated imports and generated route identifiers) across the React example project; no runtime logic changes besides route id/path and import paths.

Changes

Cohort / File(s) Summary
Module augmentation property rename
examples/react/start-workos/src/router.tsx
Renamed rotuerrouter in declare module '@tanstack/react-router' Register interface; type remains ReturnType<typeof createRouter>.
Generated route tree updates
examples/react/start-workos/src/routeTree.gen.ts
Replaced route id/path /callback with /api/auth/callback; renamed imports/identifiers from CallbackServerRouteApiAuthCallbackServerRoute; updated all related type mappings, server route children, and TanStack server augmentations to reference the new path and symbol.
Server route file path & imports
examples/react/start-workos/src/routes/api/auth/callback.tsx
Updated import paths (authkit/ssr relative path adjustments) and changed the server file route creation from createServerFileRoute('/callback')createServerFileRoute('/api/auth/callback'); GET handler logic unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ServerRoute as ApiAuthCallbackServerRoute
  participant AuthKit as authkit/ssr
  Note over ServerRoute: route id/path = /api/auth/callback
  Client->>ServerRoute: GET /api/auth/callback
  ServerRoute->>AuthKit: getConfig() / getWorkOS() / saveSession()
  AuthKit-->>ServerRoute: auth response / session saved
  ServerRoute-->>Client: redirect / response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I twitch my nose and scurry through,
From rotuer to router — tidy and new.
Callback found a straighter track,
/api/auth/callback — no turning back.
A carrot-coded hop, I celebrate this view! 🥕


📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between f7857db and 700c9ff.

📒 Files selected for processing (2)
  • examples/react/start-workos/src/routeTree.gen.ts (5 hunks)
  • examples/react/start-workos/src/routes/api/auth/callback.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nx-cloud
Copy link

nx-cloud bot commented Sep 4, 2025

View your CI Pipeline Execution ↗ for commit 700c9ff

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 57s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-04 20:39:22 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 4, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5048

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5048

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5048

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5048

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5048

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5048

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5048

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5048

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5048

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5048

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5048

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5048

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5048

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5048

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5048

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5048

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5048

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5048

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5048

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5048

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5048

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5048

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5048

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5048

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5048

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5048

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5048

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5048

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5048

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5048

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5048

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5048

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5048

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5048

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5048

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5048

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5048

commit: 700c9ff

@SeanCassiere SeanCassiere merged commit e9d4c5b into TanStack:main Sep 4, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants