Skip to content

refactor: src/pkg/dashboard/static-src/js/tracker-row.js is a merge hotspot — split into 4 units #15512

Closed

Description

@hivecommons-hive

src/pkg/dashboard/static-src/js/tracker-row.js keeps being touched by pull requests that are open at the same time. In the last 7 days 7 distinct PRs changed it, 18 pairs of them were open concurrently, and 0 merge conflicts or rebase failures were blamed on it. Every concurrent pair is a rebase someone (or the merge train) has to redo, and a 1298-line file makes each of those rebases slower and riskier.

Proposed fix: a mechanical split into 4 files in the same package. No behaviour change, exported API unchanged, tests move with the code they cover. Land it when no other PR is open against this file (check the merge-train overlap first) so the split itself does not become one more collision.

Evidence

metric value
window 7 days
distinct PRs 7
concurrent PR pairs 18
conflicts attributed 0
lines 1298
kind code
score 22.5

PRs in window: #15425, #15444, #15445, #15449, #15457, #15468, #15478

Top-level units

  • stageTrackerActedAgo
  • stageTrackerActedBadgeHtml
  • stageTrackerActedLabel
  • stageTrackerActedMatches
  • stageTrackerActedOptions
  • stageTrackerActedOutcomeWords
  • stageTrackerActedPlain
  • stageTrackerActedSource
  • stageTrackerActedStageName
  • stageTrackerActedState
  • stageTrackerActedTip
  • stageTrackerActorKind
  • stageTrackerActorTip
  • stageTrackerAdoptOrphanPRs
  • stageTrackerAdoptedFromChipHtml
  • stageTrackerAdvisoryOf
  • stageTrackerAnchor
  • stageTrackerChipsHtml
  • stageTrackerClaimant
  • stageTrackerClaimantLine
  • stageTrackerClaimantShort
  • stageTrackerColName
  • stageTrackerCurrentStageHtml
  • stageTrackerFixingWord
  • stageTrackerGroupHeaderHtml
  • stageTrackerGroupPage
  • stageTrackerGroups
  • stageTrackerHeadColsHtml
  • stageTrackerHeaderHtml
  • stageTrackerHoldPill
  • stageTrackerHoldTip
  • stageTrackerHopName
  • stageTrackerIcon
  • stageTrackerIsPrimary
  • stageTrackerLeadButtonHtml
  • stageTrackerLineageChipHtml
  • stageTrackerLineageClause
  • stageTrackerLineageText
  • stageTrackerLineageTip
  • stageTrackerLinkedDrawnHere
  • stageTrackerLinkedElsewhere
  • stageTrackerLinkedElsewhereHtml
  • stageTrackerLinkedPRItem
  • stageTrackerLinkedPROpen
  • stageTrackerLinkedSorted
  • stageTrackerLinkedTip
  • stageTrackerNeedsRebase
  • stageTrackerNestedOpenPRs
  • stageTrackerNewLines
  • stageTrackerNewState
  • stageTrackerOpenSince
  • stageTrackerPRRef
  • stageTrackerRebaseMergeLive
  • stageTrackerRegressionHandled
  • stageTrackerRegressionText
  • stageTrackerRepoChipHtml
  • stageTrackerRepoChipOn
  • stageTrackerRepoShort
  • stageTrackerRepoTint
  • stageTrackerRowHtml
  • stageTrackerSegments
  • stageTrackerSentinelChipHtml
  • stageTrackerSharedPRs
  • stageTrackerShortAgo
  • stageTrackerShortHive
  • stageTrackerSinceHtml
  • stageTrackerSortKey
  • stageTrackerStageActor
  • stageTrackerStageWord
  • stageTrackerStripItems
  • stageTrackerSubRowHtml
  • stageTrackerSupersedesChipHtml
  • stageTrackerSupersedesTip
  • stageTrackerTooltip
  • stageTrackerTrailText

Split proposal

  1. src/pkg/dashboard/static-src/js/tracker-row.js — core types and the entry points other files call; keeps stageTrackerActedAgo, stageTrackerActedOptions, stageTrackerActedStageName, stageTrackerActorTip, … 15 more
  2. src/pkg/dashboard/static-src/js/tracker-row_stagetrackeractedbadgeht.js — moves stageTrackerActedBadgeHtml, stageTrackerActedOutcomeWords, stageTrackerActedState, stageTrackerAdoptOrphanPRs, … 15 more
  3. src/pkg/dashboard/static-src/js/tracker-row_stagetrackeractedlabel.js — moves stageTrackerActedLabel, stageTrackerActedPlain, stageTrackerActedTip, stageTrackerAdoptedFromChipHtml, … 15 more
  4. src/pkg/dashboard/static-src/js/tracker-row_stagetrackeractedmatches.js — moves stageTrackerActedMatches, stageTrackerActedSource, stageTrackerActorKind, stageTrackerAdvisoryOf, … 14 more

Don't splinter

  • At most 4 resulting files, each at least 150 lines; fewer is better.
  • No behaviour change; the package, its exported API and every import path stay the same.
  • Tests move with the code they cover; no new test helpers.
  • One PR; land it when the file has no open PRs against it.

Filed by the hive's merge-hotspot advisor (GET /api/hotspots). It will not file another issue for this file while this one is open.

Activity

  1. added
    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.
    agent/ci-maintainerCreated or modified by the ci-maintainer agent
    on Oct 29, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 29, 2026
  3. hivecommons-hive commented on Oct 29, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  4. hivecommons-hive commented on Oct 29, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (lease revoked).

  5. added
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed on Oct 30, 2026
  6. hivecommons-hive commented on Oct 30, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #15771 (#15771, merged). Closing because Hive's PR claim metadata says this PR was the full fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/ci-maintainerCreated or modified by the ci-maintainer agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions