rancher/dashboard#19877 by codyrancher, fixes issue 19742 (richard-cox), milestone v2.17.0. Head 2516d88 on base 55438bb; master is 300e0de and has no changes to the 4 touched files. +235 / -5: one config change in explorer.js:584-594, plus unit and e2e tests. Reviewed 2026-11-17 in two passes: Cody's process from codyrancher/ai-skills at c04c11a (A) and ours as a fresh agent (B). I rechecked every point at the head commit. Nothing is posted.
Preview: https://rancherpr19877r.mf-created-dashboard.ui.rancher.space/dashboard/, built from 2516d88, backend the mf Rancher (v2.16.0-7758e3e-head, which has the rancher/rancher#55811 indexes; a direct Steve call sorts and filters on both fields for local and the downstream c-m-bmsk94st). Baseline: dashboard-master, rebuilt at the upstream tip 300e0de, same backend.
auditpolicy finds auditpolicies.auditlog.cattle.io, where master shows "There are no rows which match your search query". The cell still reads group.singular (count) and links to the resource's list. This held in the paginated list, the client-side list, with table views off, and on the downstream cluster.VALID_FIELDS[CRD] still lists both fields as blocked.crd-cr: query term, and suggestions that differ between list modes.auditpolicy)dashboard-master at 300e0de. The Resource header doesn't sort, and auditpolicy finds no rows.auditpolicies.auditlog.cattle.io.The same script ran on both builds, in the light theme. In these copies for GitHub, the URL band is cropped off.
| Case (local cluster, mf admin) | master 300e0de | PR 2516d88 |
|---|---|---|
| Resource header | not sortable (tabindex=-1) | sortable, tabindex=0, Enter sorts, aria-sort follows |
| Click Resource | nothing | sort=spec.group,spec.names.singular: acme.cert-manager.io.challenge, …order, addons.cluster.x-k8s.io… |
| Click it again | nothing | -spec.group,-spec.names.singular: upgrade.cattle.io.plan, ui.cattle.io.tableconfiguration… |
Search auditpolicy (and auditpol) | 0 rows | 1 row, auditpolicies.auditlog.cattle.io |
Search cert-manager | 6 rows | 6 rows (the name always contains the group) |
Search the full auditlog.cattle.io.auditpolicy, paginated | 0 rows | 0 rows (the miss the issue accepts) |
| The same, client-side list | 0 rows | 1 row |
| Resource cell and link | auditlog.cattle.io.auditpolicy (4) → Audit Log Policies | the same |
Downstream c-m-bmsk94st | not sortable, 0 rows | sorts, 1 row, link opens its list |
| Table views off (old search box) | 0 rows, not sortable | 1 row, sorts |
| View > Group By | None, State, Name, Age | adds Resource: one heading per row, no count |
| Console on sort / search | no pagination warnings | 1 warning per sort, 2 per search |
Green is the fix, grey is the same on both, red is the point to post. The client-side list and the table-views-off runs override ui-performance or the feature flag in the test browser only; nothing changed on mf.
Pagination API does not support sorting 'apiextensions.k8s.io.customresourcedefinition' by the requested fields: spec.group, spec.names.singular. Each search logs the filtering variant twice: once for the page request and once for the count request. Master logs neither, because it never sends those fields. It happens with table views on or off.VALID_FIELDS[CRD] is the dashboard's list of fields the API can sort and filter on. It still has both entries commented out as "blocked on rancher/rancher#55811", and the column now sorts and searches on them. The API answers both with 200 on 2.16. Afterwards the two files disagree, and the warning fires on every search of this list for fields that work, which hides the real ones.steve-pagination-utils.ts and its VALID_FIELDS is 19219 (aeltai, Pods sorted by IP). Its hunk is in the Pod block, about 125 lines above the CRD entries. Draft 18229 touches the imports and the store defaults, not this block.groupSortFor in resource-table-views.js (master)sort=spec.group,metadata.name. As a result, addons.cluster.x-k8s.io.clusterresourcesetbinding comes above addons.cluster.x-k8s.io.clusterresourceset, the reverse of sorting the Resource column.
groupSortFor takes only the first sort entry, and its comment says later entries are tie breakers. That holds for the other groupable columns. The PR's Resource column is the first whose heading combines two sort fields, so the PR is the first place it shows. Master doesn't offer this grouping at all.group.singular (mf: 183 CRDs, 0 shared), so grouping by Resource gives one heading per row anyway. The PR says that is intended ("one heading per resource, without the count"). The order is only off where one singular name is a prefix of another. I'd post it only as Optional, or not at all. Pass A saw the same order and didn't file it.crd-cr:. A field's id comes from the header's internal name (headerFieldId), so the query box lists "Resource crd-cr", and resource:auditpolicy is treated as plain search text. The PR is the first to surface this column in the query box.crd-cr: suggests API groups, because the summary uses the first search path, spec.group. In a client-side list it suggests the resource types the cells show.spec.group~ and gets a 422, per the description. The author cites earlier newly indexed fields as precedent, and master ships with 2.17. I'd accept that; neither pass saw the 422 itself.| Pass A: Cody's process | Pass B: ours | |
|---|---|---|
| Verdict | comment: 5 of 5 criteria met, 1 comment kept through every phase | comment: 0 blockers, 2 suggestions, 1 optional nit, 4 questions for you |
| False console warning | ✓ filed; verified, refined, condensed, and introduced by the PR | ✓ suggestion 1, with the twice-per-search count |
| Group By heading order | seen in the side-effects check, not filed | ✓ suggestion 2 |
| Model test that can't fail today | – | ✓ nit (mutant M10 survived) |
| Before/after videos | ✓ same script on master and the PR | – |
| Acceptance table | ✓ 5 criteria from the issue, each linked | – |
| Client-side list | ✓ | ✓ and also with table views off |
| Downstream cluster | ✓ in the UI | ✓ through the Steve API |
Query-box behavior (crd-cr:, suggestions) | – | ✓ questions for you |
| Race that overwrites a typed query (on master) | ✓ found and forced on master | – (told to wait 7 s) |
| Tests | 26 pass | 26 pass, 10 mutants (9 caught), CI e2e log read |
| Output | criteria + verification, comment file, master file, 2 videos | review, 7-dimension grid, checked list, draft |
| Cost | about 95 min in this session, including the setup and the race investigation | 38 min, 103 tool calls, 243k tokens |
Both passes reached the same answer and found the same point to post. A brought the videos, the sourced criteria and a master race. B brought the mutants, the table-views-off and query-box cases, and the Group By order.
dashboard-master and the change on the PR build (above).value now feeds table-views grouping, filtering and CSV export with the resource type (master exported an empty cell). Link builds its href from resourceLink.to without merging the route params, which gives the same result for this named route. Group By gains Resource. Paginated requests now carry the two fields. Filed the console warning.spec.group in search can't match a row that metadata.name doesn't, because a CRD is named <plural>.<group>. The issue asks for it, so it wasn't filed.aria-sort, like the others. The link text is unchanged.| Criterion | Verdict | How | |
|---|---|---|---|
| AC1 | Resource sorts by group, then singular, both directions (issue body) | Met | local, downstream, client side |
| AC2 | auditpolicy finds the CRD by its singular name (Cody's repro) | Met | 1 row; master 0 |
| AC3 | Search by group | Met | cert-manager 6 rows; the name already contains the group |
| AC4 | The cell text, count and link are unchanged (implied) | Met | live + unit tests |
| AC5 | Paginated and client-side, local and downstream (implied) | Met | all four |
Out of scope per the issue: matching the full group.singular string in the paginated search ("better than nothing").
explorer.js: findings in correctness (the Group By order) and errors (the warning); the rest cleared.mount with RouterLinkStub and (header: any) match the repo (17 formatter tests use mount) and the same file's helpers, so B didn't raise them.listLocation's params) survives.@adminUser only.| Point | Why it is not in the review |
|---|---|
| B The model test "should not change the list location of the definition itself" can't fail | It can't fail today because listLocation builds a new object on every read. That is also the only reason the getter's shallow copy { ...this.listLocation } doesn't leak params. If listLocation were ever cached, this test is the one that would catch the leak, so it guards something real. |
B mount instead of shallowMount, (header: any) | Our checklist asks for shallowMount, but formatter tests with RouterLinkStub mount in this repo, and the file already uses (header: any). Not raised. |
A spec.group in search is redundant with the name | True, but the issue asks for both fields, and sort needs the group anyway. |
| What | Detail |
|---|---|
| A filtered list can be replaced by an older unfiltered page | About 4 s after a paginated list loads, a websocket-driven refetch of the unfiltered page goes out. If a query is typed while it is in flight and the refetch answers last, the table shows the 100 unfiltered rows under the typed query. It happened by chance in 2 of 9 PR runs. Forced on master (300e0de) by holding that response 1.5 s: auditpolicies ended with 100 rows. Both builds send the same two requests in the same order. |
aria-sort="None" | Unsorted sortable headers carry None; the valid value is lowercase none. Every column on master has it, and the PR just adds one more sortable header. |
resourceCount reads all(COUNT)?.[0].counts | It throws if the COUNT list is empty. The model is unchanged by the PR (B). |
| The appsplus extension on mf PUTs a CRD on every page load | appinstances.appsplus.io gets a GET then a PUT on every dashboard load, on master and the PR alike (B). Nothing to do with this PR, but it is a write on every visit. |
The first item is a real bug in paginated lists and could become its own issue; the scripts are in ~/Projects/pr19877-review/pw/peek2*.mjs, the logs in out/peek2*.log.
unit-test, i18n, a11y-test, licenses and all 18 e2e jobs pass. The admin @explorer job ran the three new Resource tests against RANCHER_VERSION: 2.16.0.recent-clusters changed (from visiting CD2), and it is restored; no key differs from the backup. Group By > Resource was set and reset, and it isn't stored in preferences.dashboard-pr19877 on CD2; dashboard-master rebuilt at 300e0de. When the PR merges, remove the preview with bash preview/cleanup-branch.sh dashboard pr19877.Tried it on a 2.16 build: sorting by Resource, the auditpolicy search and the link all work, paginated and client side. One thing below.
Every Resource sort and every search on this list now logs "Pagination API does not support sorting/filtering 'apiextensions.k8s.io.customresourcedefinition' by the requested fields: spec.group, spec.names.singular", because VALID_FIELDS[CRD] in steve-pagination-utils.ts still has both commented out as blocked on rancher/rancher#55811. I saw the note in the description, but the warning is wrong on 2.16 and buries the real ones, and the one open PR editing that list (19219) only touches the Pod entries.
Optional: grouping by Resource sorts by spec.group,metadata.name, so inside an API group the headings follow Name: addons.cluster.x-k8s.io.clusterresourcesetbinding lands above addons.cluster.x-k8s.io.clusterresourceset, the reverse of sorting by Resource.
Code names go in backticks when posted (VALID_FIELDS[CRD], steve-pagination-utils.ts, the sort paths and resource names). If you post the optional comment, change "One thing below" to "Two things below". Pass A's before/after pair can go under the intro ("Before this change:" then "With this change:", each video on its own line). The copies with the URL band cropped are in ~/Projects/pr19877-review/demos/: before-master-gh.mp4 and after-pr-gh.mp4.