Skip to content

test: add selective ssr nested pending repros#6858

Open
Sheraff wants to merge 1 commit intomainfrom
test/selective-ssr-nested-pending-repros
Open

test: add selective ssr nested pending repros#6858
Sheraff wants to merge 1 commit intomainfrom
test/selective-ssr-nested-pending-repros

Conversation

@Sheraff
Copy link
Contributor

@Sheraff Sheraff commented Mar 8, 2026

Note

Nobody seems to have complained about this yet, so we can wait for #6704 to be merged. It fixes the Solid errors. And then we'll make a separate PR for the Vue data-only one.

This PR adds two focused browser repros for a gap between main and refactor-signals: during nested client navigation under inherited selective SSR, main never renders the leaf pendingComponent, while refactor-signals does.

These tests do not try to prove that main is definitively wrong. They are meant to make the discrepancy easy to evaluate.

What was already covered

The existing selective-SSR suite already covers the inheritance matrix for final SSR/data behavior on full document navigations (reloadDocument={true}). In particular, it already covers these inherited cases:

Case Existing coverage What it verifies
root: true, posts: false, leaf inherits posts Existing selective-ssr test matrix (testcase-3) Final data/render behavior after a full reload
root: true, posts: 'data-only', leaf inherits posts Existing selective-ssr test matrix (testcase-4) Final data/render behavior after a full reload

What was not covered before this PR: whether a nested suspending leaf under those same inherited configs should show its configured pendingComponent during a client-side navigation.

Cases in one view

Case Route config Navigation type Covered before this PR? main refactor-signals
Baseline inherited selective SSR root: true, posts: false, leaf inherits posts Full reload to /posts/$postId Yes Passes existing final-state assertions Passes existing final-state assertions
Baseline inherited selective SSR root: true, posts: 'data-only', leaf inherits posts Full reload to /posts/$postId Yes Passes existing final-state assertions Passes existing final-state assertions
Nested pending repro root: true, posts: false, leaf inherits posts Client nav to /posts/pending-inherit No - added here Parent route renders and router becomes pending, but leaf fallback never appears Leaf fallback appears
Nested pending repro root: true, posts: 'data-only', leaf inherits posts Client nav to /posts/pending-data-only-component No - added here Parent route renders and router becomes pending, but leaf fallback never appears Leaf fallback appears

Interpretation

The inheritance behavior itself is already intentional enough to have coverage. The open question is narrower: in these nested inherited selective-SSR cases, should a suspending leaf's configured pendingComponent be allowed to render during client navigation?

This PR exists so that question can be answered against a concrete repro instead of inferred from the broader selective-SSR matrix.

Notes

There are neighboring transition tests in other Solid e2e apps that prefer keeping previous content visible during navigation, but they do not cover this selective-SSR nested leaf case, so they do not resolve the expected behavior here.

Testing

  • pnpm test:eslint
  • pnpm test:types
  • pnpm test:unit
  • pnpm test:e2e tests/app.spec.ts --grep \"nested inherited\" (fails on main, passes on refactor-signals)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

📝 Walkthrough

Walkthrough

This PR adds two new test routes to the Solid Start selective SSR application: /posts/pending-inherit and /posts/pending-data-only-component. Both routes demonstrate pending state handling with different SSR configurations. Generated type definitions are updated, navigation links are added for testing, and E2E tests verify the pending fallback behavior during client-side navigation.

Changes

Cohort / File(s) Summary
Generated Route Types
e2e/solid-start/selective-ssr/src/routeTree.gen.ts
Added type definitions and route mappings for two new routes (/posts/pending-inherit and /posts/pending-data-only-component), including FileRoutesByFullPath, FileRoutesByTo, FileRoutesById, and PostsRouteChildren type extensions.
Route Implementations
e2e/solid-start/selective-ssr/src/routes/posts.pending-inherit.tsx, e2e/solid-start/selective-ssr/src/routes/posts.pending-data-only-component.tsx
Added two new route files with pending state configurations. Both define pendingMs, pendingComponent fallbacks, and component rendering logic. pending-inherit uses a never-resolving loader; pending-data-only-component uses a never-resolving resource.
Test Setup and Specs
e2e/solid-start/selective-ssr/src/routes/index.tsx, e2e/solid-start/selective-ssr/tests/app.spec.ts
Added navigation links with specific SSR search parameters to index route and corresponding E2E tests verifying pending fallback visibility during client-side navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 New pending routes hop into view,
With fallbacks that render on cue,
Data-only whispers and inheritance dance,
Testing SSR's selective prance! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'test: add selective ssr nested pending repros' accurately summarizes the main change: adding test cases for selective SSR nested pending repros.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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/selective-ssr-nested-pending-repros

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

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Bundle Size Benchmarks

  • Commit: 446d7973cfc5
  • Measured at: 2026-03-08T09:36:44.392Z
  • Baseline source: history:446d7973cfc5
  • 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.

@nx-cloud
Copy link

nx-cloud bot commented Mar 8, 2026

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 17a86e2

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

☁️ Nx Cloud last updated this comment at 2026-03-08 09:41:04 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@6858

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: ef140bd

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
e2e/solid-start/selective-ssr/tests/app.spec.ts (1)

24-25: Drop the fixed sleeps from these two assertions.

await expect(...).toBeVisible() already does the waiting here, so the extra waitForTimeout(100) just adds fixed delay to every run without making the repro stronger. Please verify the grep still reproduces as intended after removing them.

Proposed cleanup
-    await page.waitForTimeout(100)
     await expect(page.getByTestId('pending-inherit-fallback')).toBeVisible()
@@
-    await page.waitForTimeout(100)
     await expect(page.getByTestId('pending-data-only-fallback')).toBeVisible()

Also applies to: 38-39

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@e2e/solid-start/selective-ssr/tests/app.spec.ts` around lines 24 - 25, Remove
the fixed 100ms sleeps before the visibility assertions: delete the await
page.waitForTimeout(100) call that precedes the await
expect(page.getByTestId('pending-inherit-fallback')).toBeVisible() assertion,
and likewise remove the analogous waitForTimeout call at the other occurrence
(the pair around lines 38-39). Rely on await expect(...).toBeVisible() to
perform the waiting, then run the grep to confirm the repro still works.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@e2e/solid-start/selective-ssr/tests/app.spec.ts`:
- Around line 24-25: Remove the fixed 100ms sleeps before the visibility
assertions: delete the await page.waitForTimeout(100) call that precedes the
await expect(page.getByTestId('pending-inherit-fallback')).toBeVisible()
assertion, and likewise remove the analogous waitForTimeout call at the other
occurrence (the pair around lines 38-39). Rely on await
expect(...).toBeVisible() to perform the waiting, then run the grep to confirm
the repro still works.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32ea6349-2b95-40ec-8310-1ad4b7b62a97

📥 Commits

Reviewing files that changed from the base of the PR and between 446d797 and 17a86e2.

📒 Files selected for processing (5)
  • e2e/solid-start/selective-ssr/src/routeTree.gen.ts
  • e2e/solid-start/selective-ssr/src/routes/index.tsx
  • e2e/solid-start/selective-ssr/src/routes/posts.pending-data-only-component.tsx
  • e2e/solid-start/selective-ssr/src/routes/posts.pending-inherit.tsx
  • e2e/solid-start/selective-ssr/tests/app.spec.ts

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 8, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing test/selective-ssr-nested-pending-repros (17a86e2) with main (446d797)

Open in CodSpeed

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.

1 participant