Skip to content

🌱 chore(dashboard): share one relative-age formatter in tracker-row-strip - #16669

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-16668
Nov 4, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-16668

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #16668

Why: tracker-row-strip.js carried 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.html is regenerated.

Overlaps tracker-row-strip.js with 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

…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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16637 🐛 Stage tracker: say CI running (not activity unknown) when checks are still pending same files src/pkg/dashboard/stage_tracker_activity.test.js
src/pkg/dashboard/stage_tracker_motion_test.go
src/pkg/dashboard/stage_tracker_remediation_chevron.test.js
src/pkg/dashboard/stage_tracker_repo_grouping_test.go
src/pkg/dashboard/static-src/js/tracker-row-strip.js
src/pkg/dashboard/static/index.html
#16660 🐛 fix: label narrow dashboard navigation same files src/pkg/dashboard/static/index.html
#16659 🐛 Activity Monitor: celebrate externally merged PRs with bee + toast naming the merger same files src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

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: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— 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`.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 4, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js extract functions with the regex function <name>\([^]*?\n \}, which needs a closing brace on its own 4-space-indented line. stageTrackerAgoWord at tracker-row-strip.js:259 closes 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 of stageTrackerActivityTrackHtml). It works today only because the duplicate function declaration is legal in the new Function body (both JS suites pass locally: 36/36, 14/14), and the Go jsFunc is brace-depth based so it is unaffected. Every other helper lifted by fn() 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

@hivecommons-hive
hivecommons-hive Bot merged commit 9408464 into v5 Nov 4, 2026
91 of 96 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-16668 branch November 4, 2026 21:50
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reviewer] Review backlog (style): Inline relative-age formatter duplicated twice instead of reusing stageTrackerAgoText

0 participants