PR 19959, second run: commit 4fd33cb

"Return classified resource when store find hits page-cache guard" by Cody Jackson, fixes issue 19075. Reviewed 2026-11-24 with Pass B only. My first review asked for changes on dc7d453; Cody answered with 4fd33cb.

Preview: https://rancherpr19959r.mf-created-dashboard.ui.rancher.space/dashboard/, built from 4fd33cb, backend the mf Rancher (v2.16.0-head). Saving there really writes to mf.

Suggestion: approve

How strict each run is

RunWhat blocksResult
1, strict (dc7d453)A test that does not guard the fix, and any page that ends up worseRequest changes
2, less strict (4fd33cb), this oneOnly something a user sees go wrong in normal use, or a fix that does not holdApprove
2, read with the strict rules of run 1As run 1. Comment 6 would be the one to settleRequest changes

Guided tour

On the PR preview itself, with real data and nothing saved. Log in to Rancher there first. Every comment below links to its step, and each step links back here.

▶ What the PR changes (7 steps)▶ Review comments (9 steps)
Comments
1

The Cypress build check failed

cypress/e2e/tests/pages/explorer2/workloads/deployments.spec.ts:612
Fixed

What I posted on dc7d453

check-cypress-build fails on this line and on 623: Property 'terminationGracePeriodSeconds' does not exist.

Cody's answer

Typed the cloned deployment fixtures so the Cypress TypeScript build passes.

Was the point true?

Yes. On dc7d453 the check failed only on lines 612 and 623. On 4fd33cb it passes: the two clones are declared as any.

▶ Step: the build check
2

The e2e test passed without the fix

cypress/e2e/tests/pages/explorer2/workloads/deployments.spec.ts:666
Fixed

What I posted on dc7d453

This test can pass without the fix. The push leaves the list before its pagesize=100 request goes out, and @delayedList is satisfied by the pagesize=1 count requests. Nothing here checks that the guard was reached, and checkVisible() also passes for a table with no rows.

Cody's answer

Narrowed the list intercept to the paginated list request and waited for it to start before navigating, so the race reliably hits the guard. The final list check now asserts the deployment row itself is visible.

Was the point true?

Yes. Now it holds: I replayed the new test step by step with its own delays (list 1.5 s, detail 3 s) in a browser.

ReplayResultGuard reached
This build, 5 runsPasses 5 of 50 of 5
Master (054adb2), 5 runsFails 5 of 55 of 5

Cody's answer is half right: on this build the guard is not reached (0 of 5), because leaving the list drops its page first. The test still proves the page renders, and it fails without the fix.

▶ Step: what the e2e test proves now
3

The page opened through the race never updated

shell/plugins/dashboard-store/actions.js:756
Fixed

What I posted on dc7d453

A page opened through the race renders, but it never updates. I changed a Deployment from 1 to 3 replicas elsewhere: 30 s later the page still says 1/1. The second click on + gets a 409 and in the edit form every Save gets a 409 where the normal page merges and saves.

Cody's answer

Unmounting a paginated list now invalidates any in-flight page fetch so the detail page loads into the store and live-updates normally. When the guard still triggers, it prefers the cached store entry if present.

Was the point true?

Yes on dc7d453. On 4fd33cb the same walk gives:

Walk through the racedc7d4534fd33cbMaster
The pageShows, frozenShows, 3 of 3Blank, 3 of 3
Changed from outside to 3 replicasStill 1 after 30 sShows 3, 3 of 3Blank
Three clicks on +409 on the second200, 200, 200, 3 of 3Blank
Edit, change elsewhere, Save409 every time409 then merged and 200, 3 of 3Blank
Master: the page of a Deployment opened through the race
Master: the page of a Deployment opened through the race
▶ The race on this build▶ Step: the page updates
4

No test for a transient find with no page

shell/plugins/dashboard-store/__tests__/actions.test.ts
Fixed

What I posted on dc7d453

Nit: if opt.transient || is removed from the new condition, all the tests still pass, because this case also flips havePage.

Cody's answer

Added the transient test without a page, plus coverage for preferring a store-backed entry on a guard hit and invalidating in-flight page fetches on unmount.

Was the point true?

Yes, and it is fixed: with opt.transient || removed, the new test fails (1 failed, 23 passed).

▶ Step: the test and the comment
5

The comment about the guard was gone

shell/plugins/dashboard-store/actions.js:749
Fixed

What I posted on dc7d453

Nit: the comment that explained why the guard exists is gone, and nothing here says it any more.

Cody's answer

Restored the comment explaining why the guard skips caching when a list page lands mid-request.

Was the point true?

Yes. The comment is back.

▶ Step: the test and the comment
6

A resource that is not on the page that landed

shell/plugins/dashboard-store/actions.js:772
New, not blocking

When the guard hits, find returns the store's entry if the landed page has it, and otherwise a model that is not in the store. Two places still get there.

Case 1: opening a cluster while Home's first page is on its way

The navigation guard runs loadCluster while Home is still mounted, so leaving Home comes too late to drop its page. Reproduced with both requests delayed, the cluster taken out of Home's answer (as for a cluster past the first page), and the Configurable Views extension blocked.

Both requests delayedThis buildMaster
Cluster not on Home's pageCluster Dashboard blank, 3 of 3Back to Home, 3 of 3
Same, with the Configurable Views extension loadedOpens, 3 of 3 (the extension asks for the cluster again)Back to Home, 3 of 3
Cluster on Home's pageOpens, 3 of 3Back to Home, 3 of 3
No delays, cluster not on Home's pageOpens, 3 of 3Opens, 3 of 3
This build: the Cluster Dashboard, blank, with only the side nav
This build: the Cluster Dashboard, blank, with only the side nav

Case 2: the Services list

It asks for its page after the nodes request, so a list left in between asks after it is gone, and nothing drops that answer.

Nodes and Service delayedThis buildMaster
Service not on the page (cut to 5 rows): updates?Shows but never updates, 5 of 5Blank, 3 of 3
Service on the page: updates?Yes, 3 of 3-
No delays: guard reached?No, 0 of 3-

In case 1, master goes back to Home and this build is blank, which is the state issue 19075 asks to avoid. I could not get there without delays, and the cluster must not be on Home's first page.

▶ Step: a cluster not on Home's page▶ Step: a Service opened from a list that was left
7

The invalidation test covers one kind of key

shell/plugins/dashboard-store/__tests__/actions.test.ts:353
New, nit

The request in the test has no requesterId, so its key is pod/default. A list's requests use list-<uid>.

Reproduced

With the invalidation narrowed to the default key, all 52 of 52 tests in the two changed specs still pass, and every list would lose the fix.

▶ Step: the test of dropped pages
What I would post

Review: Approve

Thanks Cody, all five points are fixed for me. One non-blocking comment and a nit inline.

1. Reply on the spec thread (612), resolve

Confirmed, `check-cypress-build` passes on 4fd33cb.

2. Reply on the spec thread (666), resolve

Confirmed: I replayed the new steps and delays in a browser, 5 out of 5 pass here and 5 out of 5 fail on master. One thing to know: here the guard is not reached any more, because leaving the list drops its page first, so this test proves the page renders rather than the guard itself.

3. Reply on actions.js (756), resolve

Confirmed: the page opened through the race now loads into the store and updates. A change made elsewhere shows up, scaling up three times saves each time, and Save after a change elsewhere merges, 3 out of 3 each.

4. Reply on actions.test.ts (504), resolve

Confirmed, dropping `opt.transient ||` now fails this test.

5. Reply on actions.js (750), resolve

Thanks, the comment is back.

6. Inline on shell/plugins/dashboard-store/actions.js:772

Not blocking: when the guard hits and the resource isn't on the page that landed, the returned model isn't in the store, and I could still get there in two places.
- Opening a cluster while Home's first page is on its way. The navigation guard calls `loadCluster` while Home is still mounted, so Home's unmount can't drop that page. `loadCluster` only checks `isReady` on the result and everything after it reads `currentCluster`, so the Cluster Dashboard stays blank with only the side nav (3 out of 3). Master goes back to Home there. I had to delay both requests, leave the cluster out of Home's answer and block the Configurable Views extension, which fetches the cluster again and heals the page.
- The Services list asks for its page only after the nodes request. If it's left in between, that page lands later, and the service page renders but never updates (5 out of 5, with the nodes and the service delayed and the page cut to 5 rows). Master is blank there.
Without delays I saw neither.

7. Inline on shell/plugins/dashboard-store/__tests__/actions.test.ts:353

Nit: this request has no `requesterId`, so the test only covers the `pod/default` key, and a list's requests use `list-<uid>`. With only the default key invalidated, all the tests still pass.
CI
JobWhat happenedFrom this PR?
admin navigation and extensionsFailed in all five attempts, on the Kubewarden install, same assertion each timeNo. The same assertion in the 8 failing master navigation runs I read
admin explorer2Failed twice, passes since. The second failure was three DaemonSet redeploy tests and a pod shell testNo. The same four tests fail together in 5 of the 8 recent explorer2 failures on master
admin fleetFailed once, passes sinceNo. Same failure on 054adb2
check-cypress-buildPassesFixed by this push
Limits