PR 19960, second run: commit 1de5275

"Align SortableTable row and header selection checkboxes" by Cody Jackson, fixes issue 19918. Reviewed 2026-11-24 with Pass B only. My first review asked for changes on 9a384b4; Cody answered both comments with 1de5275. Nothing from this run is posted.

Preview: https://rancherpr19960r.mf-created-dashboard.ui.rancher.space/dashboard/, built from 1de5275, backend the mf Rancher (v2.16.0-7758e3e-head). Saving there really writes to mf.

Suggestion: approve

How strict each run is

RunWhat blocksResult
1, strict (9a384b4)A test that does not guard the fix, and any list that gets worseRequest changes
2, less strict (1de5275), this oneOnly something a user sees go wrong, or a fix that does not holdApprove
2, read with the strict rules of run 1As run 1Approve, with the nit

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 steps, and each step links back here.

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

The e2e test passed without the fix

cypress/e2e/tests/components/sortable-table-checkbox-alignment.spec.ts
Fixed

What I posted on 9a384b4

This also passes with the fix undone. On master, the Pods list at 1280x720 measures 0.41px horizontally and 0.45px vertically (0.5px and 0.45px at 1920x1080), inside the 0.5px and 1px allowed here. The check column leaves 15px for a 14px box, so centring can't move it more than 0.5px.

The unit tests only look at align. With all the new CSS removed and the 12px back, they still pass and so do these two assertions, so nothing would catch the bug coming back.

Cody's answer

Tightened the horizontal and vertical tolerances so the test fails without the fix, and added a vertical centering check for the header checkbox.

Was the point true?

Yes for the limits and the numbers. The last clause was too strong: a full revert puts align="middle" back, and the unit tests do fail on that. What nothing caught was the CSS half.

Checked on 1de5275: the spec's own lookups and arithmetic, in a browser at 1280x720

PageHeader box to its cell (≤ 0.5)Row box to header box (≤ 0.1)Row box to badge (≤ 0.2)The test
Master, 054adb21.800.410.45Fails
PR as built0.2600Passes
PR, only the centred cell back0.260.410Fails
PR, only the 12px back0.2602.00Fails
PR, row checkbox not flex0.2601.55Fails
PR, header checkbox not flex1.8000Fails
PR, all new CSS removed1.8000.45Fails
PR, whole fix removed1.800.410.45Fails

With and without extensions. Master also fails and the PR as built also passes at 1440x900 and 1920x1080, with all 100 rows on it at 0. The other rows were run at 1280x720, the size the spec uses. In CI the spec passes on this commit.

▶ See what the test measures▶ See the fix undone, part by part
2

The rule reached the tables that extensions bundle

shell/components/SortableTable/index.vue
Fixed

What I posted on 9a384b4

This rule is global, so it also reaches the tables that extensions bundle. With the Harvester 1.8.2 or 1.9.0 extension, open Pods and then go to the Harvester Virtual Machines list: the row checkboxes sit 2.5px above the state badge, against 0.5px on master. That is more than the offset this PR fixes.

Loading the Virtual Machines list directly is fine, because the dashboard's table styles aren't loaded yet. So the same list looks different depending on where you came from. Those extensions were built before PR 19144, and their checkbox is still 19px tall.

Cody's answer

Moved the row checkbox styling into the scoped style block so it only applies to the dashboard table and leaves extension-bundled tables untouched.

Was the point true?

Yes. With the old global rule put back on the new build, the 2.5px comes back. Without it, the list is the same as on master.

Checked on 1de5275: Virtual Machines, row checkbox to the state badge

Extension and pathMaster9a384b41de5275
Harvester 1.9.0, Pods first0.5px above2.5px above0.5px above
Harvester 1.8.2, Pods first0.5px above2.5px above0.5px above
Harvester 1.9.0, opened directly-0.5px above0.5px above
Harvester 1.10.0-dev.7 (installed), Pods first0.5px below00.5px below
Master, Harvester 1.9.0
Master, Harvester 1.9.0
The old global rule: 2.5px above
The old global rule: 2.5px above
1de5275: same as master
1de5275: same as master

Images, Volumes and Hosts are the same as on master too. Lists in newer extensions keep master's 0.5px until they are built with a shell that has this fix.

▶ See the live extension table▶ See before and now
3

The 8px line looks redundant, and nothing next to it says why it is there

shell/components/SortableTable/index.vue:2082
Nit, optional

Every td of the table already has 8px at the top, so this line reads like a leftover. It is needed because extensions with an older table bring .sortable-table td.row-check with 12px. Only the PR description says so.

Reproduced on 1de5275, removing only that declaration in the page

Pods listWith the lineWithout it
Extensions blocked0 from the badge0 from the badge
Extensions loaded (Harvester 1.10.0-dev.7 and Configurable Views 0.1.0 bring the 12px)0 from the badge2px below the badge

So someone tidying it up sees no change on a plain dashboard, and the test's arithmetic still passes there. I dropped this nit on the first run because it sat on the same line as comment 2. The line is still there, so it stands on its own now.

▶ See the 8px line
The dashboard's own lists
Pods on master, 3x
Pods on master, 3x
Pods on 1de5275, 3x
Pods on 1de5275, 3x
WhatMaster1de5275
Row box to header box0 to 0.5px0 on all 11 lists
Row box to the State badge0.5px0 on all lists with a badge
Header box to its label1.4px above0.2px
Header box on Clusters (two-line header)1px above1px above, unchanged
Header row height33.6px33px
Row heightssamesame
After going to an extension list and back0.5px0
Dark theme at 1920x10800 and 0 on all 11 lists
Click, shift and click, select all, cell click, Space, Entersamesame
Focus ringsolid 2px, offset 2pxsame
Unit tests in shell/components/SortableTable91 of 91 pass
ESLint on the five filesclean
What I would post

Review: Approve

Thanks Cody, both points are fixed for me. One optional nit inline.

1. Reply on the spec thread, then resolve it

Confirmed on 1de5275. The three measurements fail on master, and they fail when any one part of the fix is undone.

2. Reply on the extension thread, then resolve it

Confirmed on 1de5275 with Harvester 1.8.2 and 1.9.0: after Pods, the row checkboxes are 0.5px from the badge again, as on master.

3. Inline on shell/components/SortableTable/index.vue:2082

Nit, optional: this reads as redundant, because every `td` already has 8px. It is needed because extensions with an older table bring `.sortable-table td.row-check` with 12px, but only the PR description says so. Without this line the row checkboxes sit 2px below the badge while such an extension is loaded, and nothing changes on a plain dashboard.
Limits