Repository navigation
π Activity Monitor: merge celebration flies from the issue row an inline PR is drawn on; add Test celebration - #15060
Conversation
β¦wn on; add Test celebration A PR nested under its issue is drawn inline on the issue row with no sub-row, so stageTrackerCelebrateRowKey found no row and the merge only ticked the counter (hive's hive: 19 of 22 open PRs). Rows now stamp the PR keys they draw (data-ham-prs) and the SPA remembers each PR's host row from the last payload; β β Merges gains a Test celebration button. Fixes #15059. Reported by @clubanderson. Signed-off-by: Andrew Anderson <andy@clubanderson.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
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
There was a problem hiding this comment.
Read the resolver chain in the tree at 64b00ba β looks correct to me.
- Host lookup is sound.
stageTrackerRowNode(index.html:15558) stampsdata-ham-keyon the same.ham-rowelement the template now stampsdata-ham-prson (:15083), so the new[data-ham-prs~=β¦][data-ham-key]selector instageTrackerCelebrateRowKey(:17792) matches one node, and~=is the right operator for the space-separated multi-PR case. - Ordering holds when the merge also closes the issue.
stageTrackerNoteMerges(:17641-17657) runsstageTrackerCelebrateMergesagainst the previous render's DOM, so the issue row is still present whenstageTrackerCelebrateRowKeyresolves it, and_stageTrackerCelebrating[rowKey]then pins it throughstageTrackerPinnedRows(:17817-17833). The_stageTrackerPRHostmap is assigned from the new payload before the lookup (:17646), and a merged PR is absent from that payload, so its old host entry survives β the fallback at:17795is reachable exactly when intended. - Test button dispatch.
data-actionresolves throughwindow[action](:37920), the same pathstageTrackerCelebrateChangealready takes, so the new global is reachable;STAGE_TRACKER_CELEBRATE_TEST_KEYis a script-levelconstdeclared after the function but initialised long before any click.previewcorrectly skips the_stageTrackerMergedTodaywrite (:17754) and the event-line/owner-event side effects (:17851-17857), so the counter and the row's event history are untouched by a test flight. TestStageTrackerCelebrateNestedPRRowexecutes the extracted JS against a fixture with an inline PR, a two-sub-row issue and a standalone PR, and asserts the pin, glow, event line, flight and tick; thetest (dashboard β¦)shards are green on this head.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 095-pre-merge-soak β 060-reviewed: required-check-pending:Sign-off survives the squash |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 64b00ba. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15059. Reported by @clubanderson.
Root cause
The merge detector fired all afternoon (the open tab's
_stageTrackerZappedheld every merge), butstageTrackerCelebrateRowKeyonly knew two ways to find a row β the PR's owndata-ham-keyrow, or adata-ham-sub-keysub-row (drawn only when an issue has β₯2 covering PRs). On hive's hive 19 of 22 open PRs are nested under their issue and drawn inline on the issue row, so the lookup returned''andstageTrackerCelebrateMergestook the "not on the board" branch: counter pops, no glow, no flight. Verified live in the operator's Chrome tab via CDP:celebrateRow()on a real row flies fine (Safari-relevant pieces all OK); only the row resolution was missing.Fix
stageTrackerRowHtmlstampsdata-ham-prs="<prKey> β¦"β the PR keys the row draws (own key on a PR row; covering PRs on an issue row).stageTrackerCelebrateRowKeyfalls throughdata-ham-keyβdata-ham-sub-keyβ[data-ham-prs~=key]β the PR's host row remembered from the last payload (stageTrackerPRHosts:nested_under/linked_prs), so a merge that also closes its issue still starts its flight from the pinned issue row.Tests
TestStageTrackerCelebrateNestedPRRowreplays the captured before/after payload shape (issue + inline PR dropped, PR inrecently_merged) through the lifted merge detector + celebration module over stdin: issue row is the celebrating row, pinned, glows, event line names the PR, token flies, count ticks on landing; host-memory path; Test button flies/pops/does not count/clears, and its no-row warning. Fails on v5 without the fix. Celebration fixture refactored intostageTrackerCelebrateJS+stageTrackerCelebrateFixturefor reuse. Style ratchet and the full StageTracker/Ham/Native suites pass.Docs: Merged today paragraph in
dashboard-sections.md; changelog fragment.