Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-merged-odometer-quiet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Dashboard: the Merged pill's odometer is drawn at the chip's own type size on one quiet inset track β€” no 18 px bevelled drum cells, no glow β€” so it sits level with the other topbar chips, and the pill's icon is the dashboard's bee glyph rather than a filled hexagon; the roll animation is unchanged (#15543).
2 changes: 1 addition & 1 deletion src/docs/dashboard-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ Payloads without `drawn_under` draw as before.

#### Merged (the chip, the ledger, the flight)

A thin bar at the top of the tracker β€” it stays pinned under the card header while the list scrolls, with the stage column header strip pinned just below it β€” carries the hexagon bee (28 px; the pill grows to fit it) with **Merged** and the all-time count drawn as a **mechanical odometer at rest, always** β€” each digit in its own dark inset drum cell with a roller gradient, inner shadows top and bottom and a hairline between cells, monospace tabular digits at 18 px, no thousands separator β€” every pull request the hive tracked that reached merged, *all time*, with *N today Β· N this week* beside it at the bar's usual size. The number is the server's, not the tab's: the hive keeps a **merged ledger** at `/data/merged-ledger.json` (entries for 90 days, an all-time total that only grows, atomic writes, seeded on first boot from the audit log's `pr_merged` history with the PR throughput counter as the floor, then backfilled by the first closed sweep, which on such a boot asks GitHub for every PR closed in the last 30 days β€” merges by people and other bots the audit log never saw β€” instead of its usual one day; so the ledger counts every merged PR in a configured repository, and its all-time number is expected to run above the hive-observed PR throughput counter it was seeded from) fed by the audit log's `pr_merged` lines β€” the hive's own merges on every path and the poller's observations of merges by people or other bots β€” and by webhook / closed-sweep snapshots of a PR GitHub reports merged, which carry the title and the merger's login within seconds.
A thin bar at the top of the tracker β€” it stays pinned under the card header while the list scrolls, with the stage column header strip pinned just below it β€” carries the dashboard's bee glyph (the version card's bee, in a 28 px hit area; the pill is no taller than the chips beside it) with **Merged** and the all-time count drawn as a **quiet odometer at rest, always** β€” one shallow inset track with a hairline border and faint dividers, a wheel per digit, tabular semibold digits at the chip's own type size, no thousands separator (#15543: the first drum's 18 px bevelled cells were "too big of font … the animation is perfect though" β€” the roll is unchanged) β€” every pull request the hive tracked that reached merged, *all time*, with *N today Β· N this week* beside it at the bar's usual size. The number is the server's, not the tab's: the hive keeps a **merged ledger** at `/data/merged-ledger.json` (entries for 90 days, an all-time total that only grows, atomic writes, seeded on first boot from the audit log's `pr_merged` history with the PR throughput counter as the floor, then backfilled by the first closed sweep, which on such a boot asks GitHub for every PR closed in the last 30 days β€” merges by people and other bots the audit log never saw β€” instead of its usual one day; so the ledger counts every merged PR in a configured repository, and its all-time number is expected to run above the hive-observed PR throughput counter it was seeded from) fed by the audit log's `pr_merged` lines β€” the hive's own merges on every path and the poller's observations of merges by people or other bots β€” and by webhook / closed-sweep snapshots of a PR GitHub reports merged, which carry the title and the merger's login within seconds.

`GET /api/stage-tracker` returns it as `merged{today, total_7d, total_30d, all_time, recent[≀20], tz, day_start}`; "today" rolls at midnight in the spoke's zone (`TZ`, else UTC) and the chip hydrates from it on the first render, so a reload, a new tab or a roll shows the same count (hivecommons/hive#15147 β€” the operator watched 4 become 0). Within a tab the number never goes down; a merge the tab just watched is added on top until the server's list carries it, and that list is also what settles a vanished row as *merged* rather than closed (alongside `recently_merged`), so a human's merge celebrates too.

Expand Down
19 changes: 13 additions & 6 deletions src/pkg/dashboard/stage_tracker_cues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,21 @@ func TestStageTrackerCuesWiring(t *testing.T) {
`:root { --cue-flight-size: var(--fs-3xl); --cue-flight-halo: drop-shadow(`,
`.cue-flight { position: fixed; z-index: var(--z-cue-flight); font-size: var(--cue-flight-size); line-height: 1; color: var(--amber); font-weight: var(--fw-semibold); filter: var(--cue-flight-halo);`,
`.ham-merged-count .ham-merged-n { font-variant-numeric: tabular-nums;`,
// The pill's own bee is 28 px and the count is a drum at rest
// (hivecommons/hive#15398 follow-up: #15409 sized only the flying
// glyph, and the roll was a 900 ms overlay over plain text).
`:root { --ham-merged-bee: 28px; --ham-odo-digit: 18px; }`,
`.ham-merged-count .ham-merged-ico { flex: 0 0 auto; width: var(--ham-merged-bee); height: var(--ham-merged-bee);`,
// The pill's own bee keeps a 28 px hit area and the count is a drum
// at rest (hivecommons/hive#15398 follow-up: #15409 sized only the
// flying glyph, and the roll was a 900 ms overlay over plain text),
// but the drum is the chip's own type size on one quiet inset track
// β€” no per-digit cells, bevels or 18 px digits (hivecommons/hive#15543:
// "the odometer is too big of font. the animation is perfect though").
`:root { --ham-merged-bee: 28px; --ham-odo-digit: var(--fs-xs); --ham-odo-track: color-mix(in srgb, var(--panel) 95%, black); --ham-odo-divider: color-mix(in srgb, var(--text) 10%, transparent); }`,
`.ham-merged-count { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--ham-merged-bee); box-sizing: border-box; padding-top: 0; padding-bottom: 0;`,
`.ham-merged-count .ham-merged-ico { flex: 0 0 auto; width: var(--ham-merged-bee); height: calc(var(--ham-merged-bee) - 2 * var(--line-width));`,
`<svg class="ham-merged-ico" viewBox="0 0 18 12" focusable="false" aria-hidden="true"><ellipse class="oc-version-bee-wing"`,
`.ham-merged-count .ham-merged-n .ham-odo { gap: 0; padding: 0 var(--sp-1); border-radius: var(--r); border: var(--line-width) solid var(--line-subtle); background: var(--ham-odo-track); }`,
`.ham-merged-count .ham-merged-n .ham-odo-col { position: relative;`,
`.ham-merged-count .ham-merged-n .ham-odo-col + .ham-odo-col { border-left:`,
`.ham-merged-count .ham-merged-n .ham-odo-col + .ham-odo-col { border-left: var(--line-width) solid var(--ham-odo-divider); }`,
`body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col {`,
`.ham-merged-count .ham-merged-sub { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: var(--fs-xs);`,
`.ham-odo-run .ham-odo-roll .ham-odo-strip { transition: transform var(--odo-ms, 900ms)`,
`.ham-odo-strip { transition: none !important; }`,
// The chip and the column header strip stick under the navbar
Expand Down
70 changes: 39 additions & 31 deletions src/pkg/dashboard/static-src/css/tracker.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
their own words, so every strip is the same width. An issue parked on
a person (045) lights Actionable with the decision word. */
/* The sticky chip bar's height (the header strip sticks beneath it):
the Merged pill (--ham-merged-bee + 2 Γ— --sp-1 tall) plus the bar's
own vertical padding. */
#activity-monitor-section { --ham-sticky-bar-h: 42px; }
the Merged pill (--ham-merged-bee tall, no taller than its
neighbouring chips) plus the bar's own vertical padding. */
#activity-monitor-section { --ham-sticky-bar-h: 36px; }
/* Layers for the merge flight glyph and the merged-toast stack. Both are
appended to document.body, not to #activity-monitor-section, so these must be
:root-scoped β€” scoped to the section they resolved to nothing, the
Expand Down Expand Up @@ -454,24 +454,33 @@
.ham-sticky { position: sticky; top: var(--navbar-sticky-height); z-index: calc(var(--z-sticky) + 1); display: flex; justify-content: flex-end; align-items: center; min-height: var(--ham-sticky-bar-h); box-sizing: border-box; padding: var(--sp-1) var(--sp-2); background: var(--panel); }
.ham-sticky-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The Merged pill (hivecommons/hive issue 15398 follow-up β€” "where is my
odometer look and feel?"): PR 15409 only enlarged the *flying* bee
(.cue-flight) and the roll was a 900 ms overlay over plain text, so
at rest the pill was a 12 px hexagon and a bold number. Now the
hexagon-bee is --ham-merged-bee (28 px) and the pill grows to fit it,
and the all-time count is a drum of wheels at rest, always: each
digit in its own dark inset cell (.ham-merged-n .ham-odo-col) with
a roller gradient, a top/bottom inner shadow and a hairline between
cells, monospace tabular digits at --ham-odo-digit (β‰₯ 18 px). The
day/week line keeps its size and rolls with the same columns, drawn
plain. A wheel that changes (.ham-odo-roll) slides its strip through
the digits it passes (--odo-shift) over --odo-ms; reduced motion
swaps instantly (no transition; the strip is drawn at its end). */
:root { --ham-merged-bee: 28px; --ham-odo-digit: 18px; }
.ham-merged-count { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: calc(var(--ham-merged-bee) + 2 * var(--sp-1)); color: var(--text); cursor: pointer; }
odometer look and feel?"): the all-time count is a drum of wheels at
rest, always β€” a .ham-odo-col per digit β€” and a wheel that changes
(.ham-odo-roll) slides its strip through the digits it passes
(--odo-shift) over --odo-ms; reduced motion swaps instantly (no
transition; the strip is drawn at its end).
Owner (2026-10-29, issue 15543): "the odometer is too big of font.
the animation is perfect though." The first drum drew 18 px bold
monospace digits in per-digit near-black cells with bevels and inner
shadows, taller than every other chip in the bar. The roll is
untouched; the drum is now a quiet metric: digits at the chip's own
type size (--fs-xs), semibold, --text, tabular-nums, spaced by
letter-spacing, on ONE shallow inset track (a few per cent of black
over the panel, a --line-subtle hairline, --r corners) with faint
dividers; no glow, no bevel; the pill is the chips' height. The bee
keeps its 28 px hit area (--ham-merged-bee) but draws the dashboard's
bee glyph (the version card's oc-version-bee-* parts) at the chip's
icon weight instead of a filled hexagon. */
:root { --ham-merged-bee: 28px; --ham-odo-digit: var(--fs-xs); --ham-odo-track: color-mix(in srgb, var(--panel) 95%, black); --ham-odo-divider: color-mix(in srgb, var(--text) 10%, transparent); }
.ham-merged-count { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--ham-merged-bee); box-sizing: border-box; padding-top: 0; padding-bottom: 0; color: var(--text); cursor: pointer; }
.ham-merged-count:hover { border-color: var(--line-strong); }
.ham-merged-count .ham-merged-ico { flex: 0 0 auto; width: var(--ham-merged-bee); height: var(--ham-merged-bee); color: var(--amber); filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--surface-0) 50%, transparent)); }
.ham-merged-count .ham-merged-n { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); font-size: var(--ham-odo-digit); font-family: var(--font-mono); }
.ham-merged-count .ham-merged-sub { color: var(--text-faint, var(--muted)); font-variant-numeric: tabular-nums; padding-left: var(--sp-2); border-left: var(--line-width) solid var(--line-subtle); }
.ham-merged-count .ham-merged-ico { flex: 0 0 auto; width: var(--ham-merged-bee); height: calc(var(--ham-merged-bee) - 2 * var(--line-width)); padding: calc(var(--ham-merged-bee) / 6) calc(var(--ham-merged-bee) / 10); box-sizing: border-box; color: var(--accent); overflow: visible; }
.ham-merged-count .ham-merged-ico .oc-version-bee-body { fill: var(--accent); stroke: var(--panel); }
.ham-merged-count .ham-merged-ico .oc-version-bee-wing { fill: color-mix(in srgb, var(--text) 35%, transparent); stroke: var(--panel); }
.ham-merged-count .ham-merged-ico .oc-version-bee-stripe { stroke: var(--panel); }
.ham-merged-count .ham-merged-ico .oc-version-bee-head { fill: var(--text-muted); }
.ham-merged-count .ham-merged-n { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); font-size: var(--ham-odo-digit); color: var(--text); }
.ham-merged-count .ham-merged-sub { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); padding-left: var(--sp-2); border-left: var(--line-width) solid var(--line-subtle); }
.ham-merged-count.cue-tick { animation: cue-count-pop 320ms ease-out; }
.ham-merged-count .ham-merged-n, .ham-merged-count .ham-merged-sub { position: relative; display: inline-flex; align-items: center; }
/* The drum: one wrap of columns per counter, laid out inline (it is the
Expand All @@ -484,17 +493,16 @@
.ham-odo-strip { display: block; transform: translateY(var(--odo-shift, 0%)); }
.ham-odo-run .ham-odo-roll .ham-odo-strip { transition: transform var(--odo-ms, 900ms) cubic-bezier(0.22, 0.61, 0.36, 1); }
.ham-odo:not(.ham-odo-run) .ham-odo-roll .ham-odo-strip { transform: translateY(0); }
/* The all-time count's wheels are drum cells: dark inset, a subtle
roller gradient (lighter band through the middle, darker at the lip
and the foot), an inner shadow at top and bottom, a hairline between
digits, the outer corners rounded. Light mode keeps the inset but on
a paler drum. */
.ham-merged-count .ham-merged-n .ham-odo { gap: 0; border-radius: var(--r-sm); overflow: hidden; border: var(--line-width) solid color-mix(in srgb, var(--surface-0) 70%, var(--line-strong)); box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 10%, transparent); }
.ham-merged-count .ham-merged-n .ham-odo-col { position: relative; min-width: 0.78em; height: 1.35em; line-height: 1.35; padding: 0; color: var(--text); background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-0) 92%, black) 0%, var(--surface-3) 42%, var(--surface-3) 58%, color-mix(in srgb, var(--surface-0) 92%, black) 100%); box-shadow: inset 0 5px 5px -4px color-mix(in srgb, black 75%, transparent), inset 0 -5px 5px -4px color-mix(in srgb, black 75%, transparent); }
.ham-merged-count .ham-merged-n .ham-odo-col + .ham-odo-col { border-left: var(--line-width) solid color-mix(in srgb, var(--surface-0) 80%, black); }
.ham-merged-count .ham-merged-n .ham-odo-col .ham-odo-d { height: 1.35em; line-height: 1.35; }
body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col { color: var(--text); background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-3) 80%, black) 0%, var(--surface-0) 42%, var(--surface-0) 58%, color-mix(in srgb, var(--surface-3) 80%, black) 100%); box-shadow: inset 0 5px 5px -4px color-mix(in srgb, black 35%, transparent), inset 0 -5px 5px -4px color-mix(in srgb, black 35%, transparent); }
body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col + .ham-odo-col { border-left-color: color-mix(in srgb, var(--surface-3) 60%, black); }
/* The all-time count's track: one shallow inset behind every wheel,
a hairline round it, faint dividers between digits, the digits
spaced a little wider than the label's letters. Light mode is the
same rule β€” the track and divider tokens mix from the theme. */
.ham-merged-count .ham-merged-n .ham-odo { gap: 0; padding: 0 var(--sp-1); border-radius: var(--r); border: var(--line-width) solid var(--line-subtle); background: var(--ham-odo-track); }
.ham-merged-count .ham-merged-n .ham-odo-col { position: relative; min-width: 0.8em; height: 1.5em; line-height: 1.5; padding: 0 0.04em; letter-spacing: 0; color: var(--text); }
.ham-merged-count .ham-merged-n .ham-odo-col + .ham-odo-col { border-left: var(--line-width) solid var(--ham-odo-divider); }
.ham-merged-count .ham-merged-n .ham-odo-col .ham-odo-d { height: 1.5em; line-height: 1.5; }
body.light-mode .ham-merged-count .ham-merged-n .ham-odo-col { color: var(--text); }
body.light-mode .ham-merged-count .ham-merged-n .ham-odo { --ham-odo-track: color-mix(in srgb, var(--panel) 96%, black); }
.ham-merged-pop { position: absolute; right: var(--sp-2); top: calc(var(--full-size) - var(--sp-1)); min-width: 22rem; max-width: 34rem; max-height: 60vh; overflow: auto; padding: var(--sp-4) var(--sp-5); border: var(--line-width) solid var(--line); border-radius: var(--r-lg); background: var(--panel-strong); box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text); z-index: var(--z-cue-flight); }
.ham-merged-pop-head { display: flex; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-3); font-weight: var(--fw-semibold); }
.ham-merged-pop-head .ham-merged-pop-sum { color: var(--text-faint); font-weight: var(--fw-medium); }
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/dashboard/static-src/html/tracker.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 class="config-title" id="activity-monitor-settings-title">Hive activity moni
<div class="ham-selbar" id="activity-monitor-selbar" role="toolbar" aria-label="Selected rows" hidden></div>
<div class="ham-sticky" id="activity-monitor-sticky">
<span class="ham-sticky-live" id="activity-monitor-merged-live" role="status" aria-live="polite"></span>
<button type="button" class="ham-chip ham-merged-count" id="activity-monitor-merged" data-action="hamMergedToggle" data-stop="1" aria-haspopup="dialog" aria-expanded="false" aria-controls="activity-monitor-merged-pop" title="Merged: 0 all time"><svg class="ham-merged-ico" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 1.5 13.6 4.75v6.5L8 14.5 2.4 11.25v-6.5z"/></svg>Merged <span class="ham-merged-n">0</span><span class="ham-merged-sub">0 today Β· 0 this week</span></button>
<button type="button" class="ham-chip ham-merged-count" id="activity-monitor-merged" data-action="hamMergedToggle" data-stop="1" aria-haspopup="dialog" aria-expanded="false" aria-controls="activity-monitor-merged-pop" title="Merged: 0 all time"><svg class="ham-merged-ico" viewBox="0 0 18 12" focusable="false" aria-hidden="true"><ellipse class="oc-version-bee-wing" cx="7" cy="3.6" rx="3" ry="1.5" transform="rotate(-18 7 3.6)"/><ellipse class="oc-version-bee-wing" cx="11" cy="3.4" rx="3" ry="1.5" transform="rotate(18 11 3.4)"/><ellipse class="oc-version-bee-body" cx="9.2" cy="7" rx="5.8" ry="3.3"/><path class="oc-version-bee-stripe" d="M7.2 4.2v5.6M10 3.8v6.4"/><circle class="oc-version-bee-head" cx="15" cy="7" r="1.7"/></svg>Merged <span class="ham-merged-n">0</span><span class="ham-merged-sub">0 today Β· 0 this week</span></button>
<div class="ham-merged-pop" id="activity-monitor-merged-pop" role="dialog" aria-label="Recent merges" hidden></div>
<button type="button" class="ham-chip ham-queue-chip" id="activity-monitor-queue" data-action="hamQueueToggle" data-stop="1" aria-haspopup="dialog" aria-expanded="false" aria-controls="activity-monitor-queue-pop" title="Merge queue: empty" hidden>β›“ Merge queue <span class="ham-queue-n">0</span></button>
<div class="ham-merged-pop ham-queue-pop" id="activity-monitor-queue-pop" role="dialog" aria-label="Merge queue" hidden></div>
Expand Down
Loading
Loading