Repository navigation
🐛 hub: wrap the spoke Version column so the table fits - #15486
Conversation
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>
|
[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 against the tree at 082244c. Looks correct to me.
- Why it fits now.
.hive-tableiswidth: 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 oldSTACKED_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 inlinewhite-space:normalis appended afterSTACKED_LINE_STYLEin the samestyleattribute (:9312), so it wins. - Ids/classes preserved.
upgrade-<id>,branch-pill-<id>,auto-upgrade-select,upgrade-progress-*,upgrade-ctl,version-missingare all still emitted verbatim — the fragments are concatenated unchanged into the two new lines (:9147-9151). - Nothing lost to the hover.
whyNotNowmoves intoqueuedTitle(:8999-9006) and the draining agents / missed reason move into the pilltitleviatipExtra(:9996-10004); both are stillescAttr'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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
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-cellrules (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'stitleand keeps· <n> leftinline;queuedLabeldrops thewhy not nowsentence and appends it toqueuedTitle(dashboard.html:8994-9006). Nothing is lost, it just moves to hover.TestQueuedStateSplitsBadgeFromUpgradeNowActionwas updated to the newqueuedLabelstring, and the old one-element-per-line test is replaced byTestVersionCellIsTwoWrappingLines/TestVersionColumnIsWidthBoundedAndWrapsetc. inversion_column_stack_test.go. CI'stest (hub 1-4/4)shards are green on this head.operator-reference.md:1267now 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
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..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 + the1pauto-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.behind by 17 · next check in 1dwith "Why not now: …" in its title; the progress pill isDraining · 7m left/Missed windowwith the agents-in-turn list or the missed reason in its title.td.repos-cell, theas: <identity>line wraps).--sp-5→--sp-4), ~110px across 14 columns.version_column_stack_test.gorewritten for the two-line layout (bound, wrap, titles, Repos); queued-label assertion updated inupgrade_affordance_ux_test.go. Docs:operator-reference.mdpill description. Changelog fragment added.Measured at 1600×900 (headless Chromium,
renderHiveswith 6 fixture rows incl. queued, missed, draining, read-only)Before

After
