Skip to content

test(tanstackstart-react): Add CSRF middleware to the e2e fixtures - #26451

Merged
chargome merged 2 commits into
developfrom
test/tanstackstart-csrf-middleware
Nov 17, 2026
Merged

chargome merged 2 commits into
developfrom
test/tanstackstart-csrf-middleware

Conversation

@chargome

Copy link
Copy Markdown
Member

What

The TanStack Start e2e apps now install TanStack Start's CSRF middleware in start.ts. A new test checks that a cross-site server function request is blocked, while same-origin server function calls and server routes still work.

Why

TanStack Start only installs CSRF protection for server functions when the app has no start.ts. Our setup needs a start.ts for the Sentry middleware, so our fixtures and examples ran without it. Part of #26022.

TanStack Start only installs CSRF protection for server functions when the
app has no `start.ts`. Our setup needs one for the Sentry middleware.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@chargome chargome self-assigned this Nov 17, 2026
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: c1e5e9f (PR test merge using develop at 6bd0415)

Against: 6bd0415 (develop) · base run #66387

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.1 kB - -
@sentry/browser - with treeshaking flags 28.3 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.2 kB - -
@sentry/browser (incl. Tracing) 52.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.25 kB - -
@sentry/browser (incl. Tracing, Replay) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.6 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.6 kB - -
@sentry/browser (incl. Feedback) 47.73 kB - -
@sentry/browser (incl. sendFeedback) 30.69 kB - -
@sentry/browser (incl. FeedbackAsync) 35.69 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.71 kB - -
@sentry/browser (incl. Metrics & Logs) 32.37 kB - -
@sentry/react 32.11 kB - -
@sentry/react (incl. Tracing) 54.95 kB - -
@sentry/vue 38.29 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 30.12 kB - -
@sentry/remix (Remix 3 client bundle) 58.06 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 52.7 kB - -
CDN Bundle (incl. Logs, Metrics) 34.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.09 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.69 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.45 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.44 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.61 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.02 kB - -
@sentry/nextjs (client) 58.57 kB - -
@sentry/sveltekit (client) 53.57 kB - -
@sentry/core/server 44.8 kB - -
@sentry/core/browser 14.4 kB - -
@sentry/node 151.36 kB -0.01% -6 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.3 kB - -
@sentry/node - without tracing 88.56 kB -0.01% -6 B 🔽
@sentry/node - without channel injection 140.3 kB -0.01% -6 B 🔽
@sentry/aws-serverless 98.93 kB -0.01% -6 B 🔽
@sentry/cloudflare (withSentry) - minified 206.47 kB - -
@sentry/cloudflare (withSentry) 479.22 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 231.83 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 2 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…er function

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@chargome

chargome commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

bugler zah an

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f0551de. Configure here.

@chargome
chargome marked this pull request as ready for review November 17, 2026 10:00
@chargome
chargome requested a review from nicohrubec November 17, 2026 10:01
@chargome
chargome merged commit 5127367 into develop Nov 17, 2026
54 checks passed
@chargome
chargome deleted the test/tanstackstart-csrf-middleware branch November 17, 2026 10:17
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