Commit 919359a
Fix HUD grouped view showing all-grey cells for domain repos (#8276)
## Summary
The **grouped** view of the HUD renders every group cell **grey**
(`AllNull`, the `~` symbol) for non-`pytorch/pytorch` repos — e.g.
https://hud.pytorch.org/hud/pytorch/vision/main and
`pytorch/executorch`. The ungrouped view and `pytorch/pytorch` grouped
view are unaffected.
## Root cause
`HudGroupedCell` computes a group's status from `effectiveJobs`. When
the **"Hide non-viable/strict blocking"** preference is on (it
**defaults to `true`**), `effectiveJobs = jobs.filter((job) =>
isJobViableStrictBlocking(...))`.
`VIABLE_STRICT_BLOCKING_JOBS` is only defined for `pytorch/pytorch`, so
`isJobViableStrictBlocking` returns `false` for **every** job in any
other repo → `effectiveJobs` becomes empty. The status computation then
hits:
```ts
} else if (noStatusJobs.length === effectiveJobs.length) { // 0 === 0 → true
conclusion = GroupedJobStatus.AllNull; // → grey "~"
}
```
so every grouped cell is grey regardless of the real job conclusions.
The **column-visibility** use of this preference is already guarded with
`isPyTorchPyTorchRepo` (`pages/hud/.../[[...page]].tsx`), but the
**cell-status** use in `GroupJobConclusion.tsx` was not — that asymmetry
is the bug. (The preference checkbox is also disabled off
`pytorch/pytorch`, so users can't work around it.)
## Fix
Guard the cell-level filter the same way as the column-level filter, so
it's a no-op off `pytorch/pytorch`:
```ts
const isPyTorchPyTorchRepo = repoOwner === "pytorch" && repoName === "pytorch";
const effectiveJobs =
hideNonViableStrict && isPyTorchPyTorchRepo
? jobs.filter((job) => isJobViableStrictBlocking(job.name, repoOwner, repoName))
: jobs;
```
This restores green/red grouped cells for `vision`, `executorch`,
`audio`, etc., and leaves `pytorch/pytorch` behavior unchanged.
## Test plan
- Added `isJobViableStrictBlocking` unit tests: `pytorch/pytorch`
job-name matches (pull/trunk/lint/…, plus mem_leak exclusion) and
domain-repo always-`false` behavior that this fix relies on. Expected
values verified against the matching logic.
- Manual: on `hud/pytorch/vision/main` in grouped view, cells now show
green/red instead of all-grey; `pytorch/pytorch` grouped view unchanged.
AI assistance (Claude) was used for this change.
Co-authored-by: pytorchbot <soumith+bot@pytorch.org>1 parent 2447c8b commit 919359a
2 files changed
Lines changed: 48 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments