Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/integration-governance.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
const TRUSTED_SCRIPTS_TREE = '25ff55e8bd1ab6da9d717727df35947ab008d146';
const TRUSTED_SCRIPTS_TREE = '55bc8023d6e79acf4b3eeb284bd4c2f927537630';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dashboard-mobile-shots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'src/pkg/dashboard/**'
- 'src/scripts/dashboard-mobile-shots.mjs'
- 'src/scripts/fixtures/dashboard-preparation-rail.mjs'
- 'src/scripts/fixtures/dashboard-activity-density.mjs'
- '.github/workflows/dashboard-mobile-shots.yml'

concurrency:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/fixed-activity-header-spans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Restore activity issue/PR header spans and far-right action controls; keep truthful current-phase highlights across parallel CI/Review, wrap all chevrons within two lines with complete hover/keyboard details, show unknown track states as icons rather than verbose panels, and label observed PR remediation “Remediating” without renaming native states or implying work during waits.
112 changes: 112 additions & 0 deletions src/docs/dashboard-source-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,118 @@ is *where edits land* — a toast fix touches `css/alerts-toasts.css`, a tracker
fix touches `js/tracker-row.js`, and two such PRs no longer conflict on one
60 000-line file.

Activity row headers share the progress strip's physical grid. Their issue
metadata spans Open through Claimed, even without a PR; PR metadata starts at
the canonical PR in progress boundary and spans through Merge gate, including
the independent CI and Review tracks. Modifier/action badges wrap in their own
full-width, far-right-anchored toolbar line, rather than overflowing the history
cap into a title or ending in an issue-side column. At narrow widths the header
slots stack and wrap; small-screen progress strips scroll horizontally without
moving header controls offscreen. `stage_tracker_header_spans.test.js`
checks rendered markup and track arithmetic in CI; these are not visual proof.
The existing Dashboard Mobile Shots workflow additionally runs the generated
SPA in real Chrome against `scripts/fixtures/dashboard-activity-density.mjs`,
preserving the preparation-rail suite. It adds activity-only desktop widths
2400, 1440, 1110 and 1024 to the existing mobile/tablet viewports (including
768 and 390), in both themes. Canonical lane boundaries are carried in
`data-ham-pr-start` and bound to the CSS custom property by the production
row materializer, including nested rows; no parallel hardcoded span is used.
Browser fixture evidence is explicitly mocked and rebased to the browser clock;
permissions are mocked only in this isolated file-page, restored on cleanup.
This does not validate private authenticated live projection or production rollout.
The existing `dashboard-mobile-shots` artifact contains `activity-layout.json`,
per-viewport/theme `*-activity-probes.json`, full-document `*-activity-density.png`
and actual-viewport `*-activity-density-viewport.png`, with
PR head, checkout SHA and generated-asset SHA256 provenance. Activity probe
violations fail capture after saving the results/screenshots for every viewport;
the existing reporting-only workflow policy and permissions are unchanged.
In addition to the DOM-handler probes, real CDP mouse movement and
ArrowDown/Enter/Space key dispatch check tooltip takeover and entry into an
already-open decision dialog. `*-activity-decision-pointer.png` and
`*-activity-decision-keyboard.png` capture the actual viewport during those
browser interactions, rather than a full-document composite of fixed dialogs;
the isolated headless page owns emulated focus, recorded in pointer preconditions.
Geometry failures include the actual control hit target or measured content gap;
no decision action is activated. Fixture/probe failures remain failures, not
skipped or string-assertion substitutes for browser proof.
Persistent human/preparation context overrides the generic event-entry animation
so transient translation cannot move neighboring narrow captions. Keyboard entry
focuses decision actions without scrolling, which would otherwise close the
dialog through its scroll-away listener. Control probes await a bounded stable
scroll/visual viewport before every mandatory hit-test; native pointer/keyboard
reports also retain each decision action's bounds and actual hit target.
Fixture transitions close the preceding terminal/export dialog through its
native close API, releasing its captured keyboard listener instead of leaving
an unrelated modal over the activity controls. Native pointer preconditions
also hit-test the trigger itself. Viewport captures explicitly target the
current document scroll rectangle; density and pointer/keyboard reports inspect
their actual PNG pixels, excluding scrollbars, and fail a uniform-background
capture. This paint check only rejects empty evidence; nonblank images still
require visual inspection and do not replace geometry or interaction checks.
The 12:36 screenshot shapes additionally exercise nested #16450 and root
#16451 recorded/unverified preparation fronts, #16446 awaiting a superseding
human decision, pluk #436 assigned review after passing CI, #16437 approved
review with unknown CI, and Hotshot #344 queued CI with approved review.
These identities/relationships are acceptance inputs, not live stage claims.
Every rendered progress strip must own a visible current location or delegate
to drawn PR children; closed adopted-original notes intentionally own no strip.
The existing preparation-root rail gutter is retained: cross-row comparison
uses like gutters, while every header is measured against its own lane edges.
The same probes can be invoked on a dedicated published-preview fixture tab:
invoke
`webstatic/testdata/tracker-header-geometry.js` as
`(<file contents>)({ dedicatedPreview: true })` there at desktop and narrow
widths with issue-only, linked, and PR-only rows present, including long titles
and waiting/regression badges. It asserts measured lane boundaries, metadata
containment, badge separation and header-to-progress separation. Every relevant
header control must stay horizontally contained and pass center hit-testing;
the probe deliberately scrolls vertically offscreen controls into view and
restores scroll positions rather than silently skipping them. It never activates
controls. Do not run interaction/scroll probes in the user's live dashboard tab.
Nested PRs use the same explicit bounded grid-track contract as root rows,
not implicit min-content tracks that long identity/context text can widen.
The probe also compares physical lane positions/heights across rows and bounds
vertical gaps by the actual CSS gap/margins, allowing real wrapped content but
rejecting unexplained empty space.

`webstatic/testdata/tracker-activity-density.json` records acceptance shapes from
the owner's 12:01 screenshot: #16404 with #16442/#16378, Hotshot #343/#344,
#16438 with #16446/#16449, issue-only #16420, and a PR-only #16437 view variant.
It preserves full GitHub-read titles, author identities, heads and long waiting
captions. Its stage/activity projections and frozen clock are deterministic test
inputs, not a claimed live backend snapshot. Use these structures plus long
unbroken-handle stress data for preview coverage; a fixture passing is not proof
that the published application renders correctly.

The split CI/Review cards also distinguish position from activity: a steady
outline and accessible current-phase label identify the occupied phase, even when
evidence is unknown, work is queued or a PR is held. The running-work class and
motion still require fresh current-head activity evidence; completion remains
evidence-based. Both parallel tracks can occupy the current phase without
claiming either is running. Native stages, holds and merge authority do not
change.

All progress chevrons share a fixed two-line text budget, wrapping even unbroken
handles. Icons have reserved space clear of the chevron points. Full details
remain in the native title and/or shared hover/focus tooltip portal; links and
decision controls remain interactive. Decision chevrons, including native
merge-gate claim conflicts, instead use their existing decision dialog as the
sole hover/focus detail surface. The gate caption remains a decision button;
full caption, reason and head metadata go to its keyboard-accessible Details,
without a competing tooltip or extra focus stop. The dedicated-preview
`webstatic/testdata/tracker-decision-interaction.js` probe uses the same invocation
to check pointer hover, focus, ArrowDown/Enter/Space entry, action hit-testing,
and tooltip exclusion. It never activates a decision action. Unknown, stale or old-head CI/Review
observations show only the existing 050 column glyph, with their full source,
reason, owner and head metadata available in the keyboard-accessible tooltip.
Unknown does not mean running, passed or approved. Known track captions use the
same two-line budget; fixer/diagnostic detail belongs in the tooltip.
PR source repair after failed CI or review findings is labelled **Remediating**
when current-head verified work is observed. Native `fixing` state identifiers
and `stage/070-fixing` remain unchanged; waiting for an author/fixer, stale
evidence and re-review do not become active remediation. General Fix actions,
PR titles and recorded historical text are not renamed.

The sources sit in a sibling directory (`static-src/`, not `static/src/`) on
purpose: `//go:embed static` embeds everything under `static/` recursively, so
sources placed inside it would be compiled into the binary and served.
Expand Down
8 changes: 6 additions & 2 deletions src/pkg/dashboard/stage_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ func stageTrackerShort(s stagelabels.Stage) string {
case stagelabels.Reviewed:
return "Review passed"
case stagelabels.Fixing:
return "Fixing"
return "Remediating"
case stagelabels.NeedsAuthor:
return "Needs author"
case stagelabels.ReturnedToContributor:
Expand All @@ -996,9 +996,13 @@ func stageTrackerStages(overrides map[string]time.Duration) []StageTrackerStage
out := make([]StageTrackerStage, 0, len(stagelabels.Table))
for _, d := range stagelabels.Table {
branch := stageTrackerBranchFrom(d.Number)
description := d.Description
if d.Stage == stagelabels.Fixing {
description = stageTrackerRemediationNeededCaption
}
out = append(out, StageTrackerStage{
Number: d.Number, Slug: d.Slug, Label: d.Stage.Label(), Short: stageTrackerShort(d.Stage),
Description: d.Description, Issue: d.Issue, PR: d.PR, Main: branch == 0, BranchFrom: branch,
Description: description, Issue: d.Issue, PR: d.PR, Main: branch == 0, BranchFrom: branch,
DwellSeconds: int64(stagelabels.Dwell(d.Stage, overrides) / time.Second),
FallsTo: stageTrackerFallsTo(d),
})
Expand Down
15 changes: 10 additions & 5 deletions src/pkg/dashboard/stage_tracker_acting_caption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import (
// sat on them in muted grey — unreadable — while "Ready for human merge ·
// untrusted author" still showed beside it, wrapped to four lines. While an
// action is in flight a lit chevron shows ONE caption, on an opaque plate
// that meets WCAG AA in both themes, on one line.
// that meets WCAG AA in both themes, within the shared two-line budget.

const stageTrackerActingHideRule = `.cue-acting > .ham-strip-row > .ham-strip > .ham-seg.active:not(.cap) > :not(.cue-acting-cap) { display: none; }`

// stageTrackerActingPlateRule is the plate: page surface under page text,
// above the stripes and the pulse overlay, one line with an ellipsis.
const stageTrackerActingPlateRule = `.ham-seg.active > .cue-acting-cap { display: inline-block; position: relative; z-index: 1; margin-left: 0; max-width: 100%; min-width: 0; box-sizing: border-box; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-pill); background: var(--surface-0); color: var(--text); font-weight: var(--fw-medium); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`
// above the stripes and the pulse overlay, wrapping within two lines.
const stageTrackerActingPlateRule = `.ham-seg.active > .cue-acting-cap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--ham-chevron-text-lines); line-clamp: var(--ham-chevron-text-lines); position: relative; z-index: 1; margin-left: 0; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 0 var(--sp-2); border-radius: var(--r-pill); background: var(--surface-0); color: var(--text); font-weight: var(--fw-medium); line-height: var(--ham-chevron-line-height); overflow: hidden; white-space: normal; overflow-wrap: anywhere; }`

// wcagMinContrastAA is the WCAG 2.x AA ratio for normal text.
const wcagMinContrastAA = 4.5
Expand Down Expand Up @@ -139,8 +139,10 @@ for (const [label, item] of [['merge gate', gateIssue], ['decision', decideIssue
const lit = (row.match(/<li class="ham-seg active(?! cap)[^"]*"/g) || []).length;
const reachable = (row.match(chain) || []).length;
assert.ok(lit > 0 && reachable === lit, label + ': ' + lit + ' lit chevron(s), ' + reachable + ' at row > .ham-strip-row > .ham-strip > .ham-seg.active:\n' + row);
// The word is a child of the lit chevron, so the hide rule reaches it.
assert.ok(/<li class="ham-seg active[^"]*"[^>]*>(?:<[^l][^>]*>|<svg[\s\S]*?<\/svg>)*?<(?:span|button) class="(?:ham-seg-t|ham-detour|ham-decision-trigger)/.test(row), label + ': the word is a direct child of the lit chevron:\n' + row);
// The focusable tooltip/copy wrapper is a direct child, so the hide rule
// reaches the complete wrapped word and its reserved glyphs together.
assert.ok(/<li class="ham-seg active[^"]*"[^>]*><span class="ham-chevron-info (?:config-info|ham-chevron-decision)"/.test(row), label + ': the hide rule reaches the full content wrapper:\n' + row);
assert.ok(row.includes('class="ham-chevron-copy"'), label + ': the original words share the two-line clamp');
}

// A chevron that carries its word, gate glyph and actor glyph: after the
Expand All @@ -159,6 +161,9 @@ const caps = seg.children.filter(c => c.classList.contains('cue-acting-cap'));
assert.strictEqual(caps.length, 1, 'exactly one caption');
assert.strictEqual(caps[0].lastChild.nodeValue, 'Queuing for merge…');
assert.strictEqual(caps[0].getAttribute('role'), 'status');
assert.strictEqual(caps[0].title, 'Queuing for merge…', 'clamped action caption retains its full hover text');
assert.strictEqual(caps[0].getAttribute('aria-label'), 'Queuing for merge…');
assert.strictEqual(caps[0].getAttribute('tabindex'), '0', 'full status remains keyboard accessible');
const capEls = caps[0].children.filter(c => c.classList); // the stub lists the text node too
assert.strictEqual(capEls.length, 1, 'spinner + text only'); assert.ok(capEls[0].classList.contains('cue-acting-spin'));
const shown = seg.children.filter(c => !c.classList.contains('cue-acting-cap'));
Expand Down
12 changes: 8 additions & 4 deletions src/pkg/dashboard/stage_tracker_activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func stageTrackerApplyCodeActivity(it *StageTrackerItem, dispatch review.Dispatc
// Bind an observed successful, worktree-verified edit to the exact
// actor/repo/head assignment; unsupported instrumentation is unknown.
if codeWork := trackerAssignedCodeWorker(status, it.Repo, it.Number, it.Head, fix.Agent, fix.Dispatched, now); codeWork != nil {
out.State, out.Caption, out.Active = "fixing", "Fixing · "+fix.Agent, true
out.State, out.Caption, out.Active = "fixing", "Remediating · "+fix.Agent, true
out.Source, out.ObservedAt = "fix-dispatch+"+codeWork.Source, timePtr(codeWork.At)
it.DisplayColumn = trackerNumberPRInProgress
}
Expand Down Expand Up @@ -462,15 +462,19 @@ func stageTrackerApplyCodeActivity(it *StageTrackerItem, dispatch review.Dispatc
if it.Stage == trackerNumberNeedsDecision || it.Stage >= trackerNumberAwaitingMerge || it.Superseded != nil {
it.DisplayColumn = 0
}
if out.State == "waiting_fixer" && strings.HasPrefix(it.Caption, "Fixing paused") {
out.Blocker = strings.Replace(it.Caption, "Fixing paused", "Fix task blocked", 1)
if out.State == "waiting_fixer" && (strings.HasPrefix(it.Caption, "Remediation paused") || strings.HasPrefix(it.Caption, "Fixing paused")) {
detail := strings.TrimPrefix(it.Caption, "Remediation paused")
if detail == it.Caption {
detail = strings.TrimPrefix(it.Caption, "Fixing paused")
}
out.Blocker = "Fix task blocked" + detail
out.Source += "+fix-dispatch-status"
}
it.CodeActivity = out
// Replace generic or previously projected activity, not independent
// native facts such as a foreign bot conflict, hold or rebase episode.
if it.Stage == trackerNumberFixing && it.Superseded == nil &&
(it.Caption == "" || strings.HasPrefix(it.Caption, "Fixing") || activityCaption || out.Active) {
(it.Caption == "" || strings.HasPrefix(it.Caption, "Remediating") || strings.HasPrefix(it.Caption, "Remediation paused") || strings.HasPrefix(it.Caption, "Fixing") || activityCaption || out.Active) {
it.Caption = out.Caption
if out.Actor != "" && !out.Active {
it.Caption += " · " + out.Actor
Expand Down
Loading
Loading