Commit 91856d8
authored
[HUD] Add per-workflow Gantt chart to commit/PR pages (#8201)
Add a **"View as Gantt Chart"** toggle to each workflow box on the
commit and PR pages. For an example, try visiting:
-
https://torchci-git-hud-job-timeline-gantt-fbopensource.vercel.app/pytorch/pytorch/commit/9fa3acc169ac2b3dd6d651c39ed317cc2ee20529
and choose one of pull/trunk/lint and selecting *Show Additional Test
Info*.
This visualization can help give a sense of the timeline of workflow
families and what the distribution of build/runs are.
**Usage:**
1. Open a commit page (`/<owner>/<repo>/commit/<sha>`) or a PR page.
2. In the **Workflows** section, each box (Lint, pull, inductor, trunk,
…) now has a **[View as Gantt Chart]** button next to *Show Additional
Test Info*.
3. Click to expand the timeline inline. Controls:
- **Color: Status** (default) or **Group** (by config prefix)
- **Lock scale** — fixed px/min (comparable across boxes) vs.
fit-to-width
**Additional Notes:**
- **No backend change.** Reuses the job payload the box already fetches
(`time` / `durationS` / `queueTimeS`); `created = time − queue`,
`completed = time + dur`.
- **No page-load impact.** Lazy-loaded via `next/dynamic` (`ssr:false`)
and rendered only when a box is opened.
- **Fit-to-width** via `ResizeObserver` with adaptive gridlines; **Lock
scale** pins a fixed scale.
- **Data-driven coloring** — `build` = fixed color; other configs =
evenly-spaced hues per box. No hard-coded workflow/platform names.
- **No dependency edges.** Edges can only be *inferred* from timing,
which is a guess (mislabels parallel siblings / multi-`needs` jobs)
rather than the real `needs` DAG. Bars are exact; staggering is visible
from positions. Real edges would require parsing workflow `needs`
(future work).1 parent ea2cc83 commit 91856d8
2 files changed
Lines changed: 465 additions & 0 deletions
0 commit comments