Skip to content

test: cover Solid SSR route error rendering#6854

Merged
Sheraff merged 1 commit intomainfrom
test/solid-ssr-error-component
Mar 8, 2026
Merged

test: cover Solid SSR route error rendering#6854
Sheraff merged 1 commit intomainfrom
test/solid-ssr-error-component

Conversation

@Sheraff
Copy link
Contributor

@Sheraff Sheraff commented Mar 8, 2026

Summary

  • add a Solid server-side regression test for a route loader throwing during SSR
  • assert the response status becomes 500 and the rendered HTML contains the route error component instead of the route component
  • document the current main-branch behavior so future SSR error handling changes are caught

Validation

  • pnpm exec vitest --mode server tests/server/errorComponent.test.tsx
  • CI=1 NX_DAEMON=false pnpm nx run @tanstack/solid-router:test:eslint --outputStyle=stream --skipRemoteCache
  • CI=1 NX_DAEMON=false pnpm nx run @tanstack/solid-router:test:types --outputStyle=stream --skipRemoteCache

Summary by CodeRabbit

  • Tests
    • Added test coverage for server-side error handling in route loaders, validating that error components render correctly and appropriate status codes are returned when errors occur during server-side rendering.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5082fdc1-2543-461c-a1ed-e9185038a29d

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea2a62 and 2776d74.

📒 Files selected for processing (1)
  • packages/solid-router/tests/server/errorComponent.test.tsx

📝 Walkthrough

Walkthrough

A new server-side test file was added to validate SSR behavior when a route loader throws an error, verifying that the error component renders correctly with a 500 status code and the normal route content is excluded.

Changes

Cohort / File(s) Summary
Error Component SSR Test
packages/solid-router/tests/server/errorComponent.test.tsx
Adds test coverage for server-side error handling in route loaders, verifying errorComponent rendering and correct HTTP status code behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A test hops in to check the way,
When loaders fail along the way,
Error components catch the fall,
Five-hundred status for them all,
SSR safety, tested well! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: cover Solid SSR route error rendering' is directly related to the main change, which adds a server-side test file (errorComponent.test.tsx) that validates SSR behavior when a route loader throws an error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/solid-ssr-error-component

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Mar 8, 2026

View your CI Pipeline Execution ↗ for commit 2776d74

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

☁️ Nx Cloud last updated this comment at 2026-03-08 07:25:38 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 8, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@6854

@tanstack/eslint-plugin-router

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

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@6854

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@6854

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@6854

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@6854

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@6854

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@6854

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@6854

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@6854

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@6854

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@6854

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@6854

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@6854

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@6854

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@6854

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@6854

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@6854

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@6854

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@6854

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@6854

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@6854

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@6854

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@6854

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@6854

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@6854

commit: 757a570

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Bundle Size Benchmarks

  • Commit: 4ea2a62787d0
  • Measured at: 2026-03-08T07:26:30.907Z
  • Baseline source: history:4ea2a62787d0
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 86.84 KiB 0 B (0.00%) 273.33 KiB 75.44 KiB ▁▁▁▁▁██████
react-router.full 89.88 KiB 0 B (0.00%) 283.67 KiB 78.18 KiB ▁▁▁▁▁██████
solid-router.minimal 36.17 KiB 0 B (0.00%) 108.44 KiB 32.49 KiB ▁▁▁▁▁██████
solid-router.full 40.50 KiB 0 B (0.00%) 121.49 KiB 36.40 KiB ▁▁▁▁▁██████
vue-router.minimal 52.03 KiB 0 B (0.00%) 148.42 KiB 46.71 KiB ▁▁▁▁▁██████
vue-router.full 56.85 KiB 0 B (0.00%) 164.01 KiB 51.04 KiB ▁▁▁▁▁██████
react-start.minimal 99.40 KiB 0 B (0.00%) 312.48 KiB 85.98 KiB ▁▁▁▁▁██████
react-start.full 102.78 KiB 0 B (0.00%) 322.29 KiB 88.82 KiB ▁▁▁▁▁██████
solid-start.minimal 48.49 KiB 0 B (0.00%) 146.03 KiB 42.85 KiB ▁▁▁▁▁██████
solid-start.full 53.96 KiB 0 B (0.00%) 161.98 KiB 47.51 KiB ▁▁▁▁▁██████

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 8, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing test/solid-ssr-error-component (2776d74) with main (4ea2a62)

Open in CodSpeed

@Sheraff Sheraff merged commit 446d797 into main Mar 8, 2026
15 checks passed
@Sheraff Sheraff deleted the test/solid-ssr-error-component branch March 8, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant