Skip to content

🐛 hub: wrap the spoke Version column so the table fits - #15486

Merged
clubanderson merged 1 commit into
v5from
fix/hub-version-column-wrap
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/hub-version-column-wrap

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #15484

The Assigned hives table's Version column rendered its pieces on unwrapped nowrap lines, so a queued/missed row measured ~1300px and pushed the Repos ("github.com" / "as: …"), Maturity and later columns off a 1600px screen.

Change

  • td.version-cell: min-width: 14rem; max-width: 22rem; white-space: normal; overflow-wrap: anywhere.
  • Cell is now a two-line wrapping flex block (.version-stack / .version-line): line 1 = channel pill · running SHA · behind chip · drift count; line 2 = short status badge + Upgrade now + progress pill + Upgrade now (interrupt turns) + history chip + the 1p auto-upgrade select. A crowded status line folds inside the column instead of widening it. Every action stays reachable; ids (upgrade-<id>, branch-pill-<id>) and classes (auto-upgrade-select, upgrade-progress-*, upgrade-ctl, version-missing) are unchanged.
  • Long explanations moved to hover titles: the queued badge is behind by 17 · next check in 1d with "Why not now: …" in its title; the progress pill is Draining · 7m left / Missed window with the agents-in-turn list or the missed reason in its title.
  • Same bounded-wrap rule for the Repos cell (td.repos-cell, the as: <identity> line wraps).
  • Horizontal cell padding tightened one step (--sp-5 → --sp-4), ~110px across 14 columns.
  • Tests: version_column_stack_test.go rewritten for the two-line layout (bound, wrap, titles, Repos); queued-label assertion updated in upgrade_affordance_ux_test.go. Docs: operator-reference.md pill description. Changelog fragment added.

Measured at 1600×900 (headless Chromium, renderHives with 6 fixture rows incl. queued, missed, draining, read-only)

table width container Version col Repos col
before 2674px (horizontal scroll) 1426px 1307px 191px
after 1426px (fits, no scroll, all 14 columns visible) 1426px 232px 96px

Before
before: Version column 1307px wide, Repos and later columns pushed off-screen

After
after: Version column 232px wide, two wrapping lines, all columns visible

The Assigned hives table's Version column rendered its pieces on unwrapped
nowrap lines (channel pill, SHA/behind/drift, a long 'behind by N · next
check … · why not now: …' badge, Upgrade now, the progress pill with the
drain agents or missed-window reason inline, the interrupt action, the
history chip and the auto-upgrade select), so the column measured ~1300px
and pushed Repos/Maturity and later columns off a 1600px screen.

Bound the td (min 14rem / max 22rem, white-space normal, overflow-wrap
anywhere) and lay the cell out as two wrapping flex lines: identity
(channel · SHA · behind · drift) and status + actions. Long explanations
move into hover titles. Apply the same bound to the Repos cell so the
'as: <identity>' line wraps, and tighten horizontal cell padding one step.
At 1600x900 the table now fits its container (1426px, no scroll) with the
Version column at 232px instead of 1307px.

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 29, 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 danathar 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 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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
#15405 🐛 fix: require verified signature for email-only hive commit identity match same files src/docs/operator-reference.md
#15497 📖 docs: monitoring a hive with Prometheus and Grafana same files src/docs/operator-reference.md
#15468 🐛 tracker: reporter-trust hold reads 'Triage needed' same files src/docs/operator-reference.md
#15485 ✨ auto-merge: breaking-titled or needs-owner-merge PRs wait for a human same files src/docs/operator-reference.md
#15491 🐛 adoption: resolve conflicts for offline clankers instead of returning the PR same files src/docs/operator-reference.md
#15471 🐛 fix(hotspot): stop proposing source splits for generated files whose source is already split same files src/docs/operator-reference.md

@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 against the tree at 082244c. Looks correct to me.

  • Why it fits now. .hive-table is width: 100% with auto layout (src/pkg/hub/assets/dashboard.html:271), so the browser can only shrink a column down to its min-content width. The old STACKED_LINE_STYLE (:10122, white-space:nowrap) made min-content equal to every pill laid end to end; .version-line { flex-wrap: wrap; white-space: normal } (:687) drops min-content to the widest single pill, which is what lets the other 13 columns come back on screen. Same mechanism for .repos-as: the inline white-space:normal is appended after STACKED_LINE_STYLE in the same style attribute (:9312), so it wins.
  • Ids/classes preserved. upgrade-<id>, branch-pill-<id>, auto-upgrade-select, upgrade-progress-*, upgrade-ctl, version-missing are all still emitted verbatim — the fragments are concatenated unchanged into the two new lines (:9147-9151).
  • Nothing lost to the hover. whyNotNow moves into queuedTitle (:8999-9006) and the draining agents / missed reason move into the pill title via tipExtra (:9996-10004); both are still escAttr'd.

Info, not a defect: min-width/max-width on a <td> are undefined in CSS table layout (td.version-cell, :685) — Chrome honors the min but ignores the max. The wrap still bounds the column because the 100%-width table distributes slack, so the cap is really "available width", not 22rem. Harmless; just don't rely on that number if a wider screen ever shows the column stretching.

I did not run version_column_stack_test.go (go test is unavailable on this host); the static asset changes are consistent with the renamed expectations I could read in the diff.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson
clubanderson merged commit a12fd0c into v5 Oct 29, 2026
76 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/hub-version-column-wrap branch October 29, 2026 19:46
@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

@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 v5 and the surrounding dashboard.html; the change does what the title says and I found no defect.

What I verified:

  • The new .version-cell / .version-stack / .version-line / .repos-cell rules (src/pkg/hub/assets/dashboard.html:681-692) sit at top level — the @media (max-width: 400px) block above them closes at line 659 — so they apply at every viewport, not just phones.
  • renderUpgradeProgress (dashboard.html:9990-10004) moves the agents-in-turn text and the missed reason into the pill's title and keeps · <n> left inline; queuedLabel drops the why not now sentence and appends it to queuedTitle (dashboard.html:8994-9006). Nothing is lost, it just moves to hover.
  • TestQueuedStateSplitsBadgeFromUpgradeNowAction was updated to the new queuedLabel string, and the old one-element-per-line test is replaced by TestVersionCellIsTwoWrappingLines / TestVersionColumnIsWidthBoundedAndWraps etc. in version_column_stack_test.go. CI's test (hub 1-4/4) shards are green on this head.
  • operator-reference.md:1267 now matches the rendered pill (Draining · 14m left, agents in the hover title).

One note on mechanism, not a blocker: max-width: 22rem on td.version-cell is ignored by browsers in auto table layout (.hive-table is width: 100% with no table-layout: fixed, dashboard.html:271). The column still shrinks as intended because overflow-wrap: anywhere and the wrapping flex rows lower the cell's min-content width, which is what lets the auto algorithm fit 14 columns into the viewport. So the fix works, but on a very wide screen the Version column can still grow to its max-content width; the "bounded width" wording in the CSS comment overstates what the browser enforces. Worth a one-line tweak to the comment if you touch this again, nothing more.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

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.

hub: Version column in the Assigned hives table does not wrap, pushing Hosting/Auth columns off-screen

1 participant