Skip to content

fix: TanStack Start friction log fixes for middleware and doctor checks#77

Open
nicknisi wants to merge 2 commits intomainfrom
nicknisi/devin-friction-log-fixes
Open

fix: TanStack Start friction log fixes for middleware and doctor checks#77
nicknisi wants to merge 2 commits intomainfrom
nicknisi/devin-friction-log-fixes

Conversation

@nicknisi
Copy link
Member

@nicknisi nicknisi commented Mar 4, 2026

Summary

  • Add explicit warning in TanStack Start SKILL.md to prevent AI agent from confusing createRouter() (client-side) with start.ts server middleware
  • Improve doctor MISSING_AUTHKIT_MIDDLEWARE remediation to include exact code pattern
  • Fix doctor CALLBACK_ROUTE_MISSING false positive by checking both flat and nested route conventions in both src/ and app/ directories

Why

Friction log from a TanStack Start user reported two issues:

  1. Installer error message referenced createRouter({ middleware: [...] }) in app.tsx instead of the correct createStart({ requestMiddleware: [...] }) in start.ts
  2. workos doctor reported CALLBACK_ROUTE_MISSING even though the callback route existed — the check only looked for flat routes in src/ and nested routes in app/, missing the other two combinations

Notes

  • Test fixtures updated to use correct TanStack Start APIs (createStart + requestMiddleware)
  • 2 new test cases added for the previously uncovered route convention combinations

nicknisi added 2 commits March 4, 2026 09:45
…confusion

The installer agent could confuse TanStack Router's createRouter() with
TanStack Start's server middleware config, instructing users to add
authkitMiddleware to router.tsx instead of start.ts. Added explicit
warning in SKILL.md and improved doctor check remediation with the
correct code pattern.
…utes in src/ and app/

Previously only checked flat routes in src/ and nested routes in app/,
causing false CALLBACK_ROUTE_MISSING errors for TanStack Start projects
using nested routes in src/ (e.g. src/routes/api/auth/callback.tsx).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant