Repository navigation
π dashboard: keep Overview KPI tiles inside the phone viewport after a restart - #16613
Conversation
β¦a restart Right after a roll the Overview headline shows the nowrap "refreshing after restart Β· 0/10 repos scanned" pill. Its min-content width stretched the single auto column of .overview-headline, so every KPI tile, subline and sparkline was laid out ~470px wide on a 430px phone and clipped until the scan finished and the pill disappeared. The tiles also read var(--fs-2xs), which was only defined inside .config-modal and fell back to the body size everywhere else. - stale pill: wraps, min-width:0 / max-width:100%, justify-self:start - headline children, kpis grid, tiles, sublines, sparklines: min-width:0, overflow-wrap:anywhere, max-width:100% - define --fs-2xs/--fs-2xl/--fs-3xl at :root with the design-system values - phone (<=720px): tile label/subline use --fs-base / --fs-md Fixes #16601 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.
Intent alignment (#16601) β approve, one advisory.
The diff covers every bullet of the issue's Fix section: pill wraps and can't widen the grid (static-src/css/overview.css:22 .overview-kpi-stale β¦ justify-self: start; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere), min-width: 0 on .overview-kpis/.overview-kpi (overview.css:20,29), overflow-wrap: anywhere on the subline (overview.css:33), max-width: 100% on the sparkline (overview.css:35-36), and the β€720px label/subline sizing (overview.css:39).
Advisory β blast radius of the :root token restoration (static-src/css/base.css:29-30). Defining --fs-2xs: .6rem at :root is correct per src/docs/dashboard-design-system.md:48 (A6 collapsed .55β.62rem raw sizes into this token), but it is not confined to the Overview tiles: at head var(--fs-2xs) appears 165 times across 24 CSS files (repos.css 17, evidence.css 17, label-filter.css 16, sections-collapse.css 15, throughput.css 9, chat.css 9, β¦), all of which currently render at the inherited size and will drop to 9.6px on desktop too. The issue says "Desktop is unaffected" and the PR's verification table only covers the 430px tile fixture, so desktop views of Repos / Evidence / label filters / section headers were not checked before this lands. Not a blocker β it restores the documented design β but worth a quick desktop pass or an explicit mention in the PR body that this intentionally changes desktop sizing elsewhere.
β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from docs-currency (read at head e2e68a6) The changelog fragment and the new Suggested fixes (operator-facing text only; the duplicated values are harmless because they match and in Open question I could not verify: the issue's "label renders at 16px on the iPhone" observation was made against image d5013b7; if that image served a Review findings from Conclusion: the layout part of this fix is correct, but the What I verified as correct
Finding β
|
There was a problem hiding this comment.
Intent-alignment re-review at 9dc388e (delta = merge of v5 c239bcb / #16609 into the branch; the PR's own diff vs v5 is unchanged β base.css, overview.css, static/index.html, changelog).
Delta: clean. The regenerated bundle at head carries the PR's overview.css rules (.overview-kpi-stale { β¦ white-space: normal; overflow-wrap: anywhere; max-width: 100% }) and no matrix.js/matrix-panel remnants from the merge, so the merge did not desync static/index.html.
Still present β src/pkg/dashboard/static-src/css/base.css:29: adding --fs-2xs/--fs-2xl/--fs-3xl at :root re-sizes every var(--fs-2xs) consumer dashboard-wide (e.g. overview.css:27,46,54,68,69 plus ~160 rules in other panels) from the inherited 16px to .6rem. #16601 scopes the fix to the Overview tiles ("size the tile label/subline with defined tokens β¦ instead of the undefined --fs-2xs"), and overview.css:39 already does that for β€720px. The :root hunk is a dashboard-wide type-ramp change hidden inside a phone Overview fix; it should land as its own PR with its own screenshots, or be scoped to the two tile rules the issue names:
--- a/src/pkg/dashboard/static-src/css/base.css
+++ b/src/pkg/dashboard/static-src/css/base.css
@@ -26,11 +26,8 @@
- --fs-2xs: .6rem; --fs-xs: .68rem; --fs-sm: .75rem; --fs-base: .82rem;
- --fs-md: .92rem; --fs-lg: 1.05rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem; --fs-3xl: 2rem;
- /* The A6 ends of the ramp (2xs/2xl/3xl) were only ever defined inside
- .config-modal, so var(--fs-2xs) elsewhere fell back to the 16px body
- size (hivecommons/hive#16601). Same values in light and dark. */
+ --fs-xs: .68rem; --fs-sm: .75rem; --fs-base: .82rem;
+ --fs-md: .92rem; --fs-lg: 1.05rem; --fs-xl: 1.25rem;
--- a/src/pkg/dashboard/static-src/css/overview.css
+++ b/src/pkg/dashboard/static-src/css/overview.css
@@ -32,2 +32,2 @@
- .overview-kpi-label { color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
- .overview-kpi-subline { color: var(--muted); font-size: var(--fs-2xs); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
+ .overview-kpi-label { color: var(--muted); font-size: var(--fs-2xs, var(--fs-xs)); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
+ .overview-kpi-subline { color: var(--muted); font-size: var(--fs-2xs, var(--fs-xs)); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }(then make dashboard-gen and drop the --fs-2xs row from the PR's verification table / changelog.)
β hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read against v5 at merge-base c239bcbb. The overflow fix itself is correct and matches #16601's Fix section line for line; one scope point the title and body do not surface.
The :root token definitions re-size ~165 rules outside the Overview
static-src/css/base.css:29-30 adds --fs-2xs: .6rem, --fs-2xl: 1.5rem, --fs-3xl: 2rem at :root. At merge-base those three tokens exist only inside .config-modal (config-dialog.css:68-69) and body.display-density-tv #activity-monitor-section (popout.css:109), so every other font-size: var(--fs-2xs|2xl|3xl) is invalid at computed-value time and inherits. That is not just the two KPI rules: at merge-base there are ~165 such declarations across 30+ other files β evidence.css (17), repos.css (16), label-filter.css (16), sections-collapse.css (14), throughput.css (9), chat.css (9), governor.css (7), cost.css (6), agent-detail.css (6), advisory-lifecycle.css (6), sidebar.css (4), review-campaigns.css (4), governor-matrix.css (4), acmm.js (4), feedback-faq.css (3), design-system.css (3), agent-fields.css (3), tracker.css (2), knowledge.css (2), auth.css (2), β¦ After this PR all of them move from the inherited size to 9.6px (2xs, ~150 sites) or 24/32px (2xl/3xl, 15 sites) in one step.
That may well be the right latent-bug fix (those rules were presumably written expecting the modal ramp), but #16601 lists it only as "Secondary: β¦" and its Fix section proposes the phone-only swap to --fs-base/--fs-md (overview.css:38, present here) rather than a global definition. The title and body describe a phone KPI overflow fix; the changelog line is the only place the global change is named, and the mobile-shots job only captures the panels it is pointed at, so Chat, Evidence, Repos, Label filter, Sections, Throughput, Cost and Agent detail will change size without anyone seeing it before merge.
Suggest either (a) dropping the two :root lines here β the β€720px override already fixes the reported symptom and the desktop tile label/subline keep today's size β and landing the token definitions in their own PR with before/after shots of the affected panels, or (b) keeping them and saying so in the title/body so this merges as the dashboard-wide type change it is. Owner's call; nothing is blocked.
Verified correct
.overview-headline > * { min-width: 0; max-width: 100% }plus the pill losingwhite-space: nowrap(overview.css:19, 23) removes the min-content contribution that widened the single auto column;min-width: 0on.overview-kpis/.overview-kpiandmax-width: 100%on the sparkline are exactly the issue's prescription.- The β€720px override (
overview.css:38) follows the base rules and wins by source order; it restores the compact phone sizing independently of the:rootchange. static/index.htmlis in sync (webstatic/gen β¦ -checkpasses on9dc388e); the changelog fragment name/category is valid.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether defining --fs-2xs/--fs-2xl/--fs-3xl at :root (which re-sizes ~159 existing --fs-2xs consumers across the dashboard to 9.6px, not just the KPI tiles) is intended in this fix, or whether the tiles should get the size directly and the token promotion ship as its own change.
The overflow fix itself looks correct to me. The one thing I'd want a deliberate yes on is the :root token change, which reaches far beyond the Overview panel.
Overflow fix β verified against v5
.overview-headlineis a single-auto-column grid (overview.css:15); anowrap.overview-kpi-stalechild really does set the track's min-content width and drags.overview-kpis/ tiles /width:100%sparklines with it.min-width: 0; max-width: 100%on the headline children pluswhite-space: normal; overflow-wrap: anywhereon the pill (overview.css:16-23in this PR) is the standard, sufficient fix;min-width: 0on.overview-kpi,.overview-kpi-sparkand thesvgcloses the remaining intrinsic-size paths. No concerns.
Token promotion β scope is dashboard-wide, not tile-wide
- On
v5,--fs-2xs/--fs-2xl/--fs-3xlare defined only inconfig-dialog.css:68-69(.config-modalscope) and--fs-2xs: .9reminpopout.css:109(TV density). The body is right about that. - But
var(--fs-2xs)has 159 consumers instatic-src/css+jsonv5, andvar(--fs-2xl)/var(--fs-3xl)15 more outside.config-modalβadvisory-lifecycle.css,agent-detail.css,agent-fields.css,chat.css,evidence.css(17),repos.css(17),label-filter.css(16),sections-collapse.css(15),sidebar.css,tracker.css,auth.css:168(.device-codeβ 2rem),base.css:115(h1 span.beeβ 1.5rem),alerts-toasts.css:56, etc. Every one of those currently inherits its parent's size and will become.6rem(9.6px) the momentbase.css:29lands. - The PR itself signals that 9.6px is too small on a phone: it adds
@media (max-width: 720px) { .overview-kpi-label { font-size: var(--fs-base) } .overview-kpi-subline { font-size: var(--fs-md) } }(overview.css:36) to lift its own two selectors back up β the other ~157 consumers get no such floor. - Mismatch with the body: the body frames this as the KPI-tile fix for #16601 and the changelog line says the tokens "no longer fall back to the 16px body size", but neither says that chips, labels, sublines and timestamps across ~30 stylesheets change size in the same commit. That may be exactly the intended repair of #15300's design-system ramp β it just is not a side effect a reader of "keep Overview KPI tiles inside the phone viewport" would expect.
Suggestion, if the global change is not meant to ride here: keep the :root tokens out of this PR, give .overview-kpi-label / .overview-kpi-subline an explicit --fs-xs/--fs-sm (both already at :root), and promote 2xs/2xl/3xl in a follow-up whose body enumerates the consumers. If it is meant to ride here, saying so in the body/changelog is enough for me β the values match config-dialog.css.
I have not approved or changed anything.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 90c25dd. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #16601
Symptom
Right after a roll, the spoke Overview panel on a phone (430px) shows oversized KPI labels/sublines that are clipped at the card edge, sparklines overflowing the tile, and a metric grid wider than the viewport. It heals itself a few minutes later.
Root cause
.overview-kpi-stalepill ("refreshing after restart (3m ago) Β· 0/10 repos scanned Β· showing snapshot β¦"). It waswhite-space: nowrapinside the single auto-column.overview-headlinegrid, so its min-content width stretched the track and every sibling (.overview-kpis, tiles,width:100%sparklines) was laid out at that width. When the scan finishes the pill disappears and the layout snaps back β hence "went back to normal after a few minutes". Introduced by 9a3e150 (π cache forge count queries and keep last-good snapshot on rate limitΒ #13382), text lengthened in 3976265 (π Overview: say "refreshing after restart Β· N/M repos scanned" instead of "stale since <previous pod>"Β #15162)..overview-kpi-label/.overview-kpi-sublineusevar(--fs-2xs)(467ca6a, π± dashboard: generate index.html from per-area sourcesΒ #15300), but--fs-2xs(and--fs-2xl,--fs-3xl) were only ever defined inside.config-modal/ the TV popout scope, never at:root, so they fell back to the inherited body size.Fix
static-src/css/overview.css.overview-kpi-stale:white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; justify-self: startβ it can never widen the headline again..overview-headline > * { min-width: 0; max-width: 100% },.overview-kpis,.overview-kpi,.overview-kpi-subline(overflow-wrap: anywhere),.overview-kpi-spark/.sparkline/svg(max-width: 100%; min-width: 0) β no child can stretch the grid.@media (max-width: 720px): tile label β--fs-base, subline β--fs-md(compact, wrapping sizes on phones).static-src/css/base.css--fs-2xs: .6rem; --fs-2xl: 1.5rem; --fs-3xl: 2remat:root(the documented design-system values;:rootis shared by light and dark).Bundle regenerated with
make dashboard-gen;make dashboard-gen-checkpasses; no rawfont-size:added (ratchet unchanged).Verification (headless Chrome, 430px viewport, headline + stale pill + 2 tiles fixture)
.overview-kpis/ tile widthnowrap, 473px--fs-2xsat:root.6remTests
cd src && go test ./pkg/dashboard/...βnode --test 'src/pkg/dashboard/**/*.test.js'β 302/302 β