Repository navigation
π fix(dashboard): share tracker row pill assembly; fix shrink-priority comment - #15478
Conversation
β¦y comment Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
The node fixtures slice individual functions out of index.html; the new shared pill helper must be included wherever stageTrackerSubRowHtml is. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Read tracker-row.js at the merge-base and at ab6d7dd; looks correct to me β the refactor is behaviour-preserving.
What I verified
- Both call sites produce byte-identical output through
stageTrackerPRPillsHtml(static-src/js/tracker-row.js:991), including the edge case wherestageTrackerLineageChipHtmlreturns''for a truthylp.lineage: the old single-covering-PR branch emitted' ' + '', and the new helper does the same because'' == nullis false. The sub-row passeslineage || null, so its oldif (lineage)guard is preserved. - The corrected
tracker.css:110-112comment now matches the rules below it:.ham-lineage/.ham-adopted-fromareflex: 0 2 auto(line 116),.ham-pr-ref/.ham-pr-lineareflex: 0 1 auto(line 118),.ham-badge/.ham-linked-icoare0 0 auto(line 115). - Ran
go run ./gen -src ../static-src -out ../static/index.htmlfrompkg/dashboard/webstaticat the PR head:static/index.htmlis unchanged, so the committed generated file is in sync. - All four Go test harnesses that inline
stageTrackerSubRowHtmlalso inline the new helper, so none will hit aReferenceError.
Changelog fragment name follows fixed-<pr>-<slug>.md. No findings.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 060-reviewed β 050-review-pending: required-check-pending:build-and-test |
There was a problem hiding this comment.
Read against v5: the helper is output-identical to the two hand-built strings it replaces.
- Sub-row site (
tracker-row.js:1023): old appended' ' + lineageonly when truthy; new passeslineage || nulland the helper emits''fornullβ same result for''/undefined. - Single-covering-PR site (
:1246): the ternary's falsy branch is nownullinstead of'', so a chip function returning''still yields the same' 'as before, andbaseRefhandling is unchanged. - CSS change at
tracker.css:113-114is comment-only;flex-shrinkvalues untouched, matching the body's claim. static/index.htmldiff contains exactly the same five hunks as the source, consistent with a regenerated bundle.
Sequencing note: #15521 splits tracker-row.js and moves both of these hunks into tracker-row-layout.js. The two PRs are not duplicates (different intent, different content) but they will not both apply cleanly; #15521's body already says it waits for this one, which is the right order β this is the smaller, behaviour-preserving change.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read against the v5 tree, looks correct to me β the helper is output-identical to both inline sequences it replaces.
static-src/js/tracker-row.js:1009-1011βstageTrackerPRPillsHtml(ref, lineage, baseRef)emits' ' + lineageonly whenlineage != null. The sub-row call (:1023) passeslineage || null, so a falsy chip still contributes nothing, asif (lineage) ref += ' ' + lineagedid. The single-covering-PR call (:1246) passesnullwhenlp.lineageis falsy and the raw chip string otherwise, so an empty-string chip still yields the same trailing space the old' ' + stageTrackerLineageChipHtml(...)produced. Both branches are byte-for-byte unchanged.static-src/css/tracker.css:118has.ham-lineage { flex: 0 2 auto }and:120has.ham-pr-ref { flex: 0 1 auto }, so the corrected comment ("lineage chip gives way first (2), then the title (1)") now describes the CSS; no values were touched.- The four Go harnesses (
stage_tracker_motion_test.go,_repo_grouping_test.go,_ui_test.go) extract the new function into the JS prelude, so the existing order assertion keeps running against the shared helper.
One note for sequencing, not a defect: #15521 (split tracker-row.js into four files) removes the lines this PR edits, and its body already says it waits for this one. Landing this first is the right order.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15447
Closes #15451
Why
The tracker.css comment contradicted the CSS and the intended behaviour (#15441): the lineage chip (flex-shrink 2) gives way before the title (1). Comment fixed; flex-shrink values untouched.
The sub-row and single-covering-PR issue row each hand-built the PR link β lineage β base-pill string in the same order (asserted by a test). It now lives in one helper,
stageTrackerPRPillsHtml, with identical output.static/index.htmlregenerated via the webstatic generator.Not run locally; CI is the verdict.
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88