Repository navigation
✨ dashboard: landscape-phone tier for the Activity monitor - #17191
Conversation
|
[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
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
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 Correctness review (head The "+N more" pill is invisible on the landscape tier, so capped banners are unreachable
The tests don't catch it: the Go/JS unit test only checks Minimal fix — show the pill in the landscape block (same tokens as the 480px rule): (apply to both 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 Review findings from Intent-alignment review against #17166 (head 961ac56). The acceptance criteria are covered (the
Fix: give the pill display rules in the landscape tier ( and have the landscape branch of Advisory (not blocking): #17166 also lists "row padding reduced to |
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>
There was a problem hiding this comment.
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→:782at head), andSTAGE_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-compactisdisplay:noneattracker.css:60on desktop and only shown by the two phone tiers;#activity-monitor-metaand.ham-colsexist intracker.html:37/tracker.css:97.stageTrackerMergeBannerCap()checks landscape before the 480px phone query, so a narrow landscape device gets 1, not 3. Desktop still returnsInfinity.- 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>
961ac56 to
24e3015
Compare
There was a problem hiding this comment.
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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #17166
Part of #17158
What
On a landscape phone (the existing
responsive.csslandscape tier: coarse pointer, ≤1024px wide, ≤500px tall) the Activity monitor now:.ham-colsso the sticky stack is the bar alone (44px, was 59px bar + header);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.jsprobe (activity-density gate indashboard-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.goasserts the landscape cap (3 banners → 1 shown, pill reads “+2 more”).stage_tracker_merge_banner_countdown.test.jslifts the newMatches/Caphelpers so its extractedLayoutstill runs.Not done on purpose
--sp-2) is row CSS — left to the row-layout children of ✨ dashboard: Activity monitor usable on a phone #17158.Screenshots
Desktop 1280×900 DOM rects (toolbar, sticky, cols, first rows) are byte-identical before/after; 390 and 430 portrait measurements unchanged.
844×390 with 3 merges (1 banner + “+2 more”):
1280×900 after (unchanged):