Repository navigation
π dashboard: fix stray dot and clipped label in Governor RUNNING tile - #15827
Conversation
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>
|
[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
|
There was a problem hiding this comment.
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 referencesfmtUSD/fmtUSDWholeat load time rather than call time. Both are plain function declarations in the same top-level<script>scope of the generatedstatic/index.html(window table at line 14231,fmtUSDWholeat 31922, no intervening</script>), so hoisting covers it β no load-order hazard.- The new
<$1return is routed throughesc()both in the rotor markup (agent-now.js:289) and in thetitletooltip (agent-now.js:342, 348), so it renders as text, not a broken tag. - The test now injects the real
formatNumbershape (refresh.jssignature(value, locale, options)) instead of the oldtoFixedstub, so the assertions exercise the production formatters.
No findings.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 080-awaiting-merge-admission β 050-review-pending: required-check-pending:build-and-test |
There was a problem hiding this comment.
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:27dropstext-overflowand becomes a flex row withmin-width: 0; the count isflex: none; white-space: pre(:29) so the trailing space inN Β·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 asfmtUSD, whichagent-now.jsalready calls, so the neww.fmtper-window reference atagent-now.js:265-268resolves the same way; the test confirms both names come out of the built bundle.fleet_cost_rotor.test.jsnow pulls the realfmtUSD/fmtUSDWholesource instead of a stub, so the$1,235/<$1assertions 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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15826
Root cause: the RUNNING tile value string was clean (
$1,010); the dot was the host.valelement's owntext-overflow: ellipsispainted at the cost rotor's left edge (under the$) whenN Β·+ rotor overflowed the 140px gov-grid column β the middle dot of theβ¦peeked out between$and1during the phrase crossfade. Reproduced with Playwright against the live spoke (3x frame capture).Fix
.fleet-run-stat .val/.gm-valβ flex row, countflex:none; white-space:pre, rotorflex:0 1 auto; min-width:0, no hosttext-overflow; only the phrase ellipsizes.this hr,today,this wk,this mo.fmtUSDWhole(nearest dollar, comma-grouped,<$1for sub-dollar,βfor null) for today/week/month; hour keeps cents viafmtUSD; cost panel unchanged.fleet_cost_rotor.test.jsnow 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 notext-overflow.static/index.htmlregenerated (make dashboard-gen-checkpasses).