Add Autorevert Signal Grid toggle to HUD - #7942
Merged
Merged
Conversation
Adds a "⚡ Autorevert" toggle button to the HUD page (pytorch/pytorch main only) that switches between the normal job grid and an autorevert-specific signal grid showing commits × signals with: - All events per cell (retries visible, not aggregated) - Cell highlights: red (suspect), blue (baseline), dashed (restart) - AI advisor verdict badges with click-to-expand reasoning - Outcome badges per column (REV/RST/N/A) - Timestamp navigator with ±5min arrows and DateTimePicker - Workflow and signal text filters - Dark mode support Architecture: - /api/autorevert/state endpoint merges multiple workflow-set state snapshots from misc.autorevert_state into unified response - Client-side rendering with AutorevertView, AutorevertGrid, AutorevertCell, AutorevertControls components - Reuses AdvisorSection and advisorVerdictUtils from PR #7940 - URL param (?autorevert=1) for shareability
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1. Toggle redesigned as HUD/Autorevert slider on far right side 2. Default workflows: Lint, trunk, pull (in that order) 3. Larger cells (20px) and more spacing between signals 4. Signal headers no longer truncated (overflow: visible) 5. Signal name hover shows full "workflow: key" + outcome details 6. Event hover uses MUI Tooltip with structured event details 7. Commits list uses only commits from state (not commit_times keys)
1. Settings panel back in original position, toggle moved after it 2. Wider cells (26px), larger event icons (1rem), show last 2 events with "+N" overflow indicator when >2 events per cell 3. Individual event tooltips (not grouped) with larger font (0.9rem) 4. Commits filtered to only those with events in visible columns 5. Available workflows includes monitored workflows from top-level array (fixes missing "Lint")
1. Commit list trimmed only from bottom (middle gaps preserved) 2. +N overflow badge: shown only for +2 or more, placed after events, click expands entire column (single column expanded at a time, highlighted background) 3. Time column tooltip with "Go here →" to navigate to that timestamp 4. Commit SHA tooltip fetches PR title, author, links to PR and HUD (lazy-loaded from commit_info_for_shas CH query) 5. << >> arrows for ±1 hour navigation alongside ◀ ▶ for ±5 min 6. AI advisor verdicts lazy-fetched via advisor_verdicts_for_hud query (from PR #7940) with per-event individual tooltips 7. Available workflows includes monitored workflows (Lint fix)
- Fix HUD URL: /pytorch/pytorch/commit/<sha> (not /hud/.../1) - Guard against API returning error/partial data (no columns/commits) which caused "Cannot read properties of undefined" crash
The query now finds the most recent state per workflow set at or before the target timestamp, with no lower bound. Previously, navigating >10min before any snapshot returned empty results.
Use argMax(state, ts) GROUP BY workflows to get exactly the most recent state per workflow set within a 24h window. Previously the JOIN-based query caused a full table scan and browser hang.
Renamed ts → target_ts param and ts → snapshot_ts output column to avoid ambiguity. Parse as String with toDateTime() for reliable timezone handling. Also fixed row.workflows.sort() mutation.
- Grid time column uses LocalTimeHuman (same as main HUD) - DateTimePicker stays in local time, converts to UTC only for API - "Go here" tooltip shows local time - Snapshot timestamp displays in local time - Grid→picker navigation parses UTC and converts to local
Shows counts of autorevert actions (RST/RVT/AI) that occurred between consecutive commits. Fetched from misc.autorevert_events_v2, filtered by selected workflows. - "5 RST" (blue), "1 RVT" (red), "2 AI" (purple) badges - Click navigates to the commit's timestamp to see the state at that point in time - Events fetched lazily for the time range of visible commits
ClickHouse returns timestamps without timezone suffix (e.g. "2026-04-09T01:05:05"). JavaScript's new Date() treats these as local time, causing wrong time range calculation for event queries. Fixed by appending Z suffix before parsing, in all three locations: - AutorevertView (time range for events query) - AutorevertGrid (event bucketing per commit) - API state.ts (commit sorting)
1. AI advisor dispatches now show with dashed purple border on cells (like restart's dashed orange border) + pulsing "AI" badge 2. Tooltip explains dispatch: "An AI advisor has been dispatched..." 3. Legend updated with "AI dispatched" dashed purple box 4. Signal key format standardized to "workflow:key" (no space after colon) everywhere: headers, tooltips, filter, CommitSummary 5. Extracted signalId(), parseFilterTerms(), signalMatchesFilter() to types.ts for shared use 6. 19 new tests covering signalId, parseFilterTerms, signalMatchesFilter
Cell interaction redesigned: - Click on any cell opens a Popover (not Tooltip) with full details - AI advisor section shows the full AdvisorSection component with expandable reasoning, verdict badge, confidence, summary, and "View advisor run" link - "AI Advisor Analysis" label introduces the section - Dispatch pending shows purple [AI] badge + explanation text - Removed onClick from the tiny AI badge — popover handles everything - Switched from Tooltip to Popover for cell details (interactive content: links, expandable reasoning, scrollable)
- New prop advisorWasDispatched (separate from advisorDispatchPending) - Dashed purple border shown whenever cell was dispatched (not just when pending) - Popover always explains "Autorevert dispatched an AI advisor to analyze this failure" when dispatched, then shows the verdict below if available - When verdict hasn't arrived yet, says "The verdict has not been received yet"
1. Ran yarn format (CI requires it) 2. Cell popover now has 300ms hover delay before opening — prevents the popover from triggering while scrolling through the grid
MUI Popover creates a modal backdrop that captures scroll events, making the grid unscrollable when a cell tooltip is open. Replaced with a CSS-based tooltip using the same approach as the main HUD's TooltipTarget: absolutely positioned div with pointer-events: none on the container (doesn't block scrolling) and pointer-events: auto on the content (links still clickable). 200ms hover delay prevents tooltip flashing while scrolling.
When &ar_focus is present in the URL, the grid only shows signals that have either: - An AutorevertPattern outcome (revert decision) - An AI advisor "revert" verdict (from state or CH) Useful with ar_sha to create focused permalinks showing only the signals relevant to a specific revert decision. Example: /hud/.../autorevert?ar_sha=abc1234&ar_focus&ar_notl
wdvr
approved these changes
Apr 9, 2026
jeanschmidt
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an "⚡ Autorevert" toggle button to the HUD page (pytorch/pytorch main only) that switches between the normal job grid and an autorevert-specific signal grid.
Features
AdvisorSectionfrom PR Show AI advisor verdicts on HUD job cells #7940?autorevert=1persists the toggle stateArchitecture
/api/autorevert/statemerges multiple workflow-set state snapshots frommisc.autorevert_stateinto a unified responseAutorevertView,AutorevertGrid,AutorevertCell,AutorevertControlsincomponents/autorevert/autorevert_state_for_tsfetches state rows near a target timestampTest plan
next buildsucceedsSee the vercel preview.
Here's how a specific revert decision looks like (link shared with the reverted PR author).
screenshot
or a more recent one