Skip to content

πŸ› dashboard: fix stray dot and clipped label in Governor RUNNING tile - #15827

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/15826-running-tile-stray-dot
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/15826-running-tile-stray-dot

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #15826

Root cause: the RUNNING tile value string was clean ($1,010); the dot was the host .val element's own text-overflow: ellipsis painted at the cost rotor's left edge (under the $) when N Β· + rotor overflowed the 140px gov-grid column β€” the middle dot of the … peeked out between $ and 1 during the phrase crossfade. Reproduced with Playwright against the live spoke (3x frame capture).

Fix

  • .fleet-run-stat .val/.gm-val β†’ flex row, count flex:none; white-space:pre, rotor flex:0 1 auto; min-width:0, no host text-overflow; only the phrase ellipsizes.
  • Shorter labels: this hr, today, this wk, this mo.
  • New fmtUSDWhole (nearest dollar, comma-grouped, <$1 for sub-dollar, β€” for null) for today/week/month; hour keeps cents via fmtUSD; cost panel unchanged.
  • fleet_cost_rotor.test.js now runs the real formatters and asserts 0.5β†’$1, 0.49β†’<$1, 9.99β†’$10, 999.99β†’$1,000, 1010.4β†’$1,010, 12345.67β†’$12,346, no . in whole-dollar windows, and the host CSS rule has no text-overflow.
  • changelog.d fragment; static/index.html regenerated (make dashboard-gen-check passes).

The .val host had text-overflow: ellipsis while holding the fixed agent
count plus the inline-grid cost rotor (max-width: 100%, not accounting
for the count). When count + rotor overflowed the 140px column Chrome
painted the host's ellipsis at the rotor's left edge, under the "$",
and the middle dot peeked out between "$" and the digits during the
phrase crossfade ("$.1,010"). Make the host a flex row (count flex:none,
rotor min-width:0) without text-overflow so only the phrase ellipsizes;
shorten window labels; round today/week/month to whole dollars via a new
fmtUSDWhole while the hour window keeps cents. The cost panel keeps the
precise fmtUSD.

Closes #15826

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 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
#15824 ✨ Activity Monitor settings: configurable toast durations and pre-merge soak same files src/pkg/dashboard/static/index.html
#15804 ✨ Show the upgrade animation for every roll (announce + SIGTERM fallback) same files src/pkg/dashboard/static/index.html
#15812 πŸ› automerge: hold same-issue PRs across lanes until a decision is recorded same files src/pkg/dashboard/static/index.html
#15774 ✨ dashboard: onboarding and GitHub App errors point to the Getting Started guide same files src/pkg/dashboard/static/index.html
#15783 πŸ› stage tracker: Let hive decide shows it is working, covered issues drop the PR's chip, πŸ‘€ says why same files src/pkg/dashboard/static/index.html
#15817 πŸ› activity monitor: 'merging now' lingers, silent merges, closed rows vanish same files src/pkg/dashboard/static/index.html
#15816 πŸ› decide plan: pending CI is not red, WHY from recorded park reasons, adopted PRs go to the fixer same files src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read the diff against the v5 tree and ran node --test fleet_cost_rotor.test.js on the PR head (7/7 pass). Looks correct to me.

What I checked:

  • FLEET_COST_WINDOWS (static-src/js/agent-now.js:266-269) now references fmtUSD/fmtUSDWhole at load time rather than call time. Both are plain function declarations in the same top-level <script> scope of the generated static/index.html (window table at line 14231, fmtUSDWhole at 31922, no intervening </script>), so hoisting covers it β€” no load-order hazard.
  • The new <$1 return is routed through esc() both in the rotor markup (agent-now.js:289) and in the title tooltip (agent-now.js:342, 348), so it renders as text, not a broken tag.
  • The test now injects the real formatNumber shape (refresh.js signature (value, locale, options)) instead of the old toFixed stub, so the assertions exercise the production formatters.

No findings.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks correct to me; read the CSS, both JS files and the regenerated static/index.html at d598f4a.

  • Root-cause fix matches the diagnosis: the host rule at static-src/css/governor.css:27 drops text-overflow and becomes a flex row with min-width: 0; the count is flex: none; white-space: pre (:29) so the trailing space in N Β· survives flex, and only .fcr-phrase (:31) keeps the ellipsis. Nothing on the host can paint a … any more.
  • fmtUSDWhole (static-src/js/cost.js:33-37) sits in the same scope as fmtUSD, which agent-now.js already calls, so the new w.fmt per-window reference at agent-now.js:265-268 resolves the same way; the test confirms both names come out of the built bundle.
  • fleet_cost_rotor.test.js now pulls the real fmtUSD/fmtUSDWhole source instead of a stub, so the $1,235 / <$1 assertions test the shipped formatters rather than a copy.

The label shortening and whole-dollar rounding go beyond "stray dot", but the body states and justifies them, and the cost panel keeps the precise formatter, so I don't see a conflict.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#15827d598f4a` sha256:9e46c3818252b7a237243e77d3e786405e6fd8c9e79f7f0ab8bd5926419e7939 β€” download from the dashboard or `hivectl review evidence #15827`.

@github-actions

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

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› dashboard: Governor RUNNING tile shows a stray dot after "$" ("$.1,010 to…") and clips the window label

1 participant