Skip to content

✨ dashboard: landscape-phone tier for the Activity monitor - #17191

Merged
clubanderson merged 3 commits into
v5from
am-mobile-landscape-tier
Nov 8, 2026
Merged

clubanderson merged 3 commits into
v5from
am-mobile-landscape-tier

Conversation

@clubanderson

@clubanderson clubanderson commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #17166
Part of #17158

What

On a landscape phone (the existing responsive.css landscape tier: coarse pointer, ≤1024px wide, ≤500px tall) the Activity monitor now:

  • reuses the compact filter bar from ✨ dashboard: sticky compact filter bar for the Activity monitor on phones #17159 (toolbar + label chips collapse into the sticky bar, ⋯ Filters opens the modal sheet) — the 820px cap on the modal-sheet tier meant 844×390 got none of it before;
  • hides .ham-cols so the sticky stack is the bar alone (44px, was 59px bar + header);
  • caps merge banners to 1 (stageTrackerMergeBannerCap(): landscape → 1, phone → 3, else ∞) with the existing +N more pill opening the Merged list;
  • .dash-card-body { overflow: clip } on this tier so the card body doesn't become the sticky's scroll container (same fix as portrait).

Chrome between the section header and the first row at 844×390: 215px → 71px; first row top 394 → 250 (inside the 390px viewport); visible banners 3 → 1.

Tests

  • tracker-phone-chrome.js probe (activity-density gate in dashboard-mobile-shots.mjs) now also runs on the landscape tier: sticky stack ≤100px, column header hidden, ≤1 visible .merge-banner, ≥2 rows starting inside the viewport once the bar is at the top, compact bar visible / toolbar hidden, sheet round-trip.
  • stage_tracker_cues_test.go asserts the landscape cap (3 banners → 1 shown, pill reads “+2 more”).
  • Landscape row check is tolerant of the fixture's tall first cluster: rows must fill ≥50% of the viewport below the navbar (measured 80–82%), and a second row must start inside the viewport at the 844×390 reference height. Builds on the portrait probe fix from 🐛 mobile-shots: phone-chrome probe accepts a tall first fixture row #17189.
  • stage_tracker_merge_banner_countdown.test.js lifts the new Matches/Cap helpers so its extracted Layout still runs.

Not done on purpose

Screenshots

Desktop 1280×900 DOM rects (toolbar, sticky, cols, first rows) are byte-identical before/after; 390 and 430 portrait measurements unchanged.

844×390 before 844×390 after
before after

844×390 with 3 merges (1 banner + “+2 more”):

banners

1280×900 after (unchanged):

1280

@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 nicholasjackson 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 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. labels Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 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
#17181 ✨ dashboard: Activity monitor merged and queue lists open as sheets on phones same files src/pkg/dashboard/stage_tracker_cues_test.go
src/pkg/dashboard/static-src/js/tracker-merged.js
src/pkg/dashboard/static/index.html
#17193 ✨ Activity monitor: 44px tap targets, row tools in the header, kebab as a sheet on phones same files src/pkg/dashboard/static-src/js/tracker-merged.js
src/pkg/dashboard/static/index.html
#17171 🐛 fix: unclaimed proposal / kind/design issues derive stage/018-open-for-discussion same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/static/index.html
#17179 ✨ dashboard: attention-first Activity monitor ordering and count line on phones same files src/pkg/dashboard/static/index.html
#17180 ✨ dashboard: 12px text floor for the Activity monitor on phones same files src/pkg/dashboard/static-src/css/responsive.css
src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 8, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Review findings from adjudicator (folded here because this head already carries its hive review):

Correctness review (head 961ac56)

The "+N more" pill is invisible on the landscape tier, so capped banners are unreachable

stageTrackerMergeBannerCap() returns 1 under the landscape query and stageTrackerMergeBannerLayout sets hidden on the older banners and inserts a .merge-banner-more button (static-src/js/tracker-merged.js:1262-1278). But that pill is display: none by default (static-src/css/tracker.css:753, built static/index.html:2093) and is only switched to display: inline-flex inside media (max-width: 480px) (tracker.css:768-779, index.html:2108-2119). Every landscape-tier viewport in the shots harness is 667–932px wide, so that block never matches there. The new landscape block in responsive.css:761-781 adds nothing for .merge-banner-more. Net effect at 844×390 with 3 merges: 2 banners hidden, pill present in the DOM but not rendered — the PR body's "existing +N more pill opening the Merged list" does not happen at this width, and the user has no cue that merges were suppressed.

The tests don't catch it: the Go/JS unit test only checks textContent (no CSS), and the probe asserts banners.length <= 1 but never that the pill is visible when something was hidden (tracker-phone-chrome.js:87-89).

Minimal fix — show the pill in the landscape block (same tokens as the 480px rule):

      .ham-compact-more[data-ham-active] { background: var(--panel-strong); color: var(--text); border-color: var(--line-strong); }
      .merge-banner-more { display: inline-flex; align-self: flex-end; align-items: center; justify-content: center; min-height: 0; height: auto; padding: var(--sp-1) var(--sp-3); border: var(--line-width) solid var(--line); border-radius: var(--r-pill); background: var(--panel-strong); color: var(--muted); font: inherit; font-size: var(--fs-xs); box-shadow: var(--shadow-raised); cursor: pointer; pointer-events: auto; }
      .merge-banner-more[hidden] { display: none; }

(apply to both static-src/css/responsive.css and the rebuilt static/index.html), and tighten the probe so it would have caught this:

       const banners = [...document.querySelectorAll('.merge-banner')].filter(visible);
       assert(banners.length <= 1, 'at most one merge banner is visible on a landscape phone');
+      const hiddenBanners = document.querySelectorAll('.merge-banner[hidden]').length;
+      const pill = document.querySelector('.merge-banner-more');
+      if (hiddenBanners > 0) assert(visible(pill), 'the +N more pill is visible when banners are capped on a landscape phone');

Everything else checked out: the landscape viewports already exist in dashboard-mobile-shots.mjs:61-64 and the probe's old innerWidth > innerHeight skip was the only gate; the landscape CSS block is a verbatim copy of the #17159 portrait block plus .ham-cols { display: none }, and the built index.html matches static-src.

Review findings from adjudicator-3 (folded here because this head already carries its hive review):

Intent-alignment review against #17166 (head 961ac56). The acceptance criteria are covered (the activity-density state already runs on 844x390@3 in dashboard-mobile-shots.mjs:61, and the probe now runs there instead of skipping), and the landscape CSS block is a faithful copy of the portrait tier plus .ham-cols { display: none }. One gap between the body and the diff:

+N more pill is invisible on the landscape tier — the capped banners are unreachable

stageTrackerMergeBannerCap() returns 1 at 844×390 and stageTrackerMergeBannerLayout sets hidden on the older banners and inserts a .merge-banner-more button with no inline style (static/index.html:26546-26556). But .merge-banner-more { display: none; } is the base rule (static/index.html:2093) and the only rule that shows it lives inside media (max-width: 480px) (static/index.html:2109-2120). A landscape phone is 667–1024px wide, so that block never applies and the pill stays display: none. Result: with ≥2 merges the user sees one banner and nothing else — the "with the existing +N more pill opening the Merged list" behaviour claimed in the PR body, the changelog fragment and activity-monitor.md:126 is not implemented; #17166 asks for the rest to be stacked "into a '+N merged' chip that opens the merged sheet". The new probe asserts banners.length <= 1 but never checks the pill, and the Go test stubs matchMedia, so neither catches it.

Fix: give the pill display rules in the landscape tier (static-src/css/responsive.css, inside the block at :768–781; regenerate static/index.html):

      .ham-compact-more[data-ham-active] { background: var(--panel-strong); color: var(--text); border-color: var(--line-strong); }
      /* The "+N more" pill (tracker.css shows it only ≤480px) must also
         show here, or the banners capped above are unreachable. */
      .merge-banner-more { display: inline-flex; align-self: flex-end; align-items: center; justify-content: center; min-height: 0; height: auto; padding: var(--sp-1) var(--sp-3); border: var(--line-width) solid var(--line); border-radius: var(--r-pill); background: var(--panel-strong); color: var(--muted); font: inherit; font-size: var(--fs-xs); box-shadow: var(--shadow-raised); cursor: pointer; pointer-events: auto; }
      .merge-banner-more[hidden] { display: none; }

and have the landscape branch of tracker-phone-chrome.js assert visible(document.querySelector('.merge-banner-more')) whenever more than one .merge-banner exists in the stack.

Advisory (not blocking): #17166 also lists "row padding reduced to --sp-2"; the PR body explicitly defers that to the row-layout children of #17158, which is reasonable, but the changelog fragment should not imply the tier is complete for rows.

On a landscape phone (coarse pointer, <=1024px wide, <=500px tall) the
Activity monitor now reuses the compact filter bar from #17159, hides the
.ham-cols column header so the sticky stack is the bar alone (44px), and
caps merge banners to one with a +N more pill. Before this the toolbar,
labels, sticky bar and column header consumed ~215px of a 390px-tall
viewport and no row was visible.

The phone chrome probe covers the landscape tier as well: sticky stack
<=100px, column header hidden, <=1 visible banner, >=2 rows starting
inside the viewport. Portrait phone and desktop are unchanged (1280 DOM
rects identical).

Fixes #17166
Part of #17158

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…test

stageTrackerMergeBannerLayout now calls stageTrackerMergeBannerCap, so
the node test that lifts the banner functions out of tracker-merged.js
needs the Matches/Cap helpers and the landscape consts too.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>

@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 (responsive.css, tracker.css, tracker.html, tracker-merged.js, and the probe). The CSS and JS parts look correct to me; the PR is blocked by its own acceptance probe and by a conflict with #17189, both in tracker-phone-chrome.js.

What checks out

  • The new rules land inside the existing landscape tier (responsive.css:562 → :782 at head), and STAGE_TRACKER_MERGE_BANNER_LANDSCAPE_QUERY (tracker-merged.js:398) is character-for-character the same query, so the CSS tier and the JS cap flip together. The rules are the portrait tier's (responsive.css:27-38) copied verbatim, as the body says.
  • .ham-compact is display:none at tracker.css:60 on desktop and only shown by the two phone tiers; #activity-monitor-meta and .ham-cols exist in tracker.html:37 / tracker.css:97. stageTrackerMergeBannerCap() checks landscape before the 480px phone query, so a narrow landscape device gets 1, not 3. Desktop still returns Infinity.
  • Both media queries are subscribed for re-layout, so rotation between tiers re-lays the stack.

1. mobile-shots fails on this head because of the landscape probe this PR enables (medium)

Run 42441237243: Activity browser acceptance failed: 740x360@3 light tracker-phone-chrome; 740x360@3 dark tracker-phone-chrome. Before this PR the probe returned the "landscape phone is covered by its own tier probe" skip there (tracker-phone-chrome.js:17 on v5); now it runs and fails in both themes. The job log does not carry the failing assertion text (it is in the artifact), so I cannot say which one. Open question, with arithmetic rather than evidence: the body says fixture rows are ~430px tall, and the new assertion at tracker-phone-chrome.js:70-72 requires two rows to start inside a 360px-tall viewport — the second row would begin at roughly bar + 430px, which cannot be < 360. If that is the one, the ≥2 assertion is only satisfiable at the 844×390 viewport the body measured, not the 740×360 the gate runs.

2. Conflict with #17189 — the rewrite drops its acceptance (low)

The body says this PR "carries the #17159 probe follow-up that missed the #17176 auto-merge". That follow-up has since landed differently: v5:tracker-phone-chrome.js:58-66 (#17189) keeps fixtureNote subtraction and accepts a too-tall first row when it shows ≥ minRowPeekPx. This PR replaces that with note.hidden = true plus firstRowTop <= innerHeight / 2 and skips the full-visibility assertion under 800px. That is the CONFLICT (content) GitHub reports. On rebase, one of the two resolutions has to go — keeping #17189's firstRowPeek and adding only the landscape block on top would be the smaller diff.

Everything else (changelog fragment, activity-monitor.md, cues test) matches the implemented behaviour.

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

… on 360px-tall phones

At 740×360 the fixture's first work-item cluster is taller than the
viewport so no second row can start inside it; assert that rows fill at
least half of the viewport below the navbar and keep the two-row check
for the epic's 844×390 reference height.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the am-mobile-landscape-tier branch from 961ac56 to 24e3015 Compare November 8, 2026 03:24

@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.

Style/maintainability review at head 961ac56. Read the diff plus responsive.css, tracker-merged.js, tracker-phone-chrome.js and dashboard-mobile-shots.mjs at head.

1. The landscape tier duplicates the portrait compact-bar block verbatim — src/pkg/dashboard/static-src/css/responsive.css:768-781 (and the mirrored static/index.html:6603-6616) are byte-identical to the .modal-sheet-tier rules at responsive.css:27-43 (13 declarations). Only #activity-monitor-panel .ham-cols { display: none; } (line 772) is actually landscape-specific. Anyone tuning the compact bar later (chip sizing, safe-area padding, the overflow: clip fix) now has to remember two places, and the copy also dropped the explanatory comment for overflow: clip (lines 30–33 in the portrait block). The file already has the idiom for sharing one rule set across tiers — a comma-joined media list, e.g. responsive.css:785-786 for the chat panel. Suggested shape:

-    @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
-      ... (modal-sheet rules, lines 2–19 unchanged)
-      /* Activity monitor on a phone (#17159): ... */
-      #activity-monitor-section { --ham-sticky-bar-h: ... }
-      ... (compact-bar rules, lines 27–43)
-    }
+    @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
+      ... (modal-sheet rules, lines 2–19 unchanged)
+    }
+    /* Activity monitor compact filter bar (#17159, #17166): portrait
+       phones (the .modal-sheet tier) and the landscape-phone tier share
+       one rule set so the bar is tuned in a single place. */
+    @media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)),
+           ((max-width: 1024px) and (max-height: 500px) and (orientation: landscape) and (pointer: coarse)) {
+      #activity-monitor-section { --ham-sticky-bar-h: ... }
+      ... (compact-bar rules, lines 27–43, once)
+    }

and inside the existing landscape tier keep only:

      /* Activity monitor on a landscape phone (#17166): ~390px of height,
         so the column header hides and the sticky stack is the bar alone. */
      #activity-monitor-panel .ham-cols { display: none; }

(The stage_tracker_actor_icon_test.go "no literal colours on .ham-sticky lines" constraint is unaffected since the lines move unchanged.)

2. Minor, probe only — src/pkg/dashboard/webstatic/testdata/tracker-phone-chrome.js:70 calls sticky.scrollIntoView(...) inside the landscape branch, but sticky is only null-checked later at line 81 (if (sticky)). The fixture always renders #activity-monitor-sticky, so this won't fire today; a sticky && guard (or hoisting the landscape block under the existing if (sticky)) keeps the probe's "soft-fail into failures[]" style instead of throwing.

Otherwise the JS refactor (stageTrackerMergeBannerMatches / stageTrackerMergeBannerCap, tracker-merged.js:1238-1248) follows the existing constant/query naming and both test harnesses pick up the new symbols. The issue's acceptance viewport is already covered since dashboard-mobile-shots.mjs:61 runs 844×390 through the activity-density state.

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

@clubanderson
clubanderson merged commit 320551a into v5 Nov 8, 2026
84 of 86 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the am-mobile-landscape-tier branch November 8, 2026 03:33
@github-actions

github-actions Bot commented Nov 8, 2026

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

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.

✨ dashboard: Activity monitor landscape-phone tier

1 participant