Repository navigation
🌱 chore(dashboard): share one relative-age formatter in tracker-row-strip - #16669
Conversation
…trip The row tooltip and the current-stage line each carried an identical inline relative-age arrow. One named helper keeps them in step; output strings are unchanged. Closes #16668 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 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 status — updated in place; edits do not notify. Full history is in the Activity Monitor. 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 Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Evidence bundle `#16669935cf21` sha256:5c3de54618d56eee695d9d37a5da168cfaca729873189f7f3fdb65f135d05b1b — download from the dashboard or `hivectl review evidence #16669`. |
There was a problem hiding this comment.
Intent alignment: matches #16668 — the issue offered two routes (reuse stageTrackerAgoText or lift one local helper); the PR takes the second, replacing all three inline agoWord lambdas with stageTrackerAgoWord (tracker-row-strip.js:259, call sites :318, :329, :582) with byte-identical output. No unrelated scope.
One advisory (low, agent-fixable, non-blocking):
fn()in the JS harnesses over-captures the new one-liner.stage_tracker_activity.test.js:12/stage_tracker_remediation_chevron.test.jsextract functions with the regexfunction <name>\([^]*?\n \}, which needs a closing brace on its own 4-space-indented line.stageTrackerAgoWordattracker-row-strip.js:259closes on the same line, so the lazy match runs on to the end of the next function —fn(strip, 'stageTrackerAgoWord')returns 109 lines (helper + comment block + all ofstageTrackerActivityTrackHtml). It works today only because the duplicatefunctiondeclaration is legal in thenew Functionbody (both JS suites pass locally: 36/36, 14/14), and the GojsFuncis brace-depth based so it is unaffected. Every other helper lifted byfn()in this file (stageTrackerTrackWord:56,stageTrackerQueueAheadWord:195,stageTrackerHiveOwnsRepair:212) is multi-line, so this is the first one that trips the extractor. Suggested fix: write the helper body on its own lines ending in\n }like its neighbours, so the harness lifts exactly the helper.
Go harness tests could not be run on this pod (go test disabled for agents); relying on CI for those.
— hive: agent=adjudicator-3 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 #16668
Why:
tracker-row-strip.jscarried two hand-rolled copies of the same relative-age expression (row tooltip and current-stage line) that must stay in step. One named helper,stageTrackerAgoWord, removes that drift risk the review flagged. Output strings are unchanged ('just now' / Xm / Xh / Xd ago), so no wording tests move. The test harnesses that lift these functions standalone now also pick the new helper;static/index.htmlis regenerated.Overlaps
tracker-row-strip.jswith the human-authored #16637, which is already CONFLICTING against v5 and awaiting an author rebase.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88