Repository navigation
fix(perf): theme the Period select like Analytics; overview cards above WS history - #493
Merged
Merged
Conversation
The Period control on #/perf had only inline min-height/padding, so the browser drew its native grey box (hardcoded system colours, square corners, 13.3px/400) next to themed cards, and the "Period" text was body-sized. - Rename .analytics-time-window-select to .time-window-select and use it for Analytics (time window + scatter axes) and the Perf Period select: one definition of the control. - "Period" uses the existing .region-filter-label, as "Region:" does on Analytics; the heading gets the chart-line icon like other sections. - Touch screens (pointer: coarse) get a 44px select, Analytics included. Tests: unit checks for class/no-inline-style/icon and the shared CSS rule; Playwright compares the computed Period style with the real Analytics select in light and dark, and asserts a 44px touch target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Review — review-agent — head 431e894Dom: changes suggested (no blockers; one should-fix on the touch-target size) All line numbers refer to the head branch. I read the code only and did not run the tests or a browser. BlockersNone. Should-fix
Nits
Checked and OK
|
Review feedback on #493: - Drop the one-off 44px coarse-pointer rule; add .time-window-select to the #630-1 48px touch block, matching the region dropdown trigger it sits next to on Analytics. - Add font-family: var(--font), as .filter-bar select has. - E2E: compare font-family too; replace the fixed 300 ms sleep with transitions off plus one frame; require 48px on Perf and on the Analytics time window on touch; match the "Period" name exactly. - Unit: check the #630-1 block and the declarations by pattern instead of exact strings and a fixed call-site count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Review feedback addressed (commit
Verification:
|
Owner request: move "WebSocket clients" below the Total Requests / Avg Response / Uptime / Slow / Version row. The cards were built inside #perfContent, which is rebuilt every five seconds, while the history section sits outside it on purpose (keyboard focus and an open native select survive a refresh). So the cards get their own #perfOverview container above the section instead of the section moving into the rebuild. renderPerfOverview() is the same markup as before, extracted. Tests: layout order and "cards only in #perfOverview"; the render-race tests now read the overview container. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Review — CS-Coordinator PR#493 — head 0ff1ec3Verdict: APPROVE The changes since the previous review (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Period select on
#/perf(WebSocket clients history) stood out from the rest of the UI. It only had inlinemin-height:44px;padding:6px, so the browser drew its native control: grey#3b3b3bbackground,#858585square border, 13.3px/400 text. Those are system colours that ignore the theme. The "Period" text was body-sized (15.6px).Measured live on meshview.dk next to the Analytics "Time window" select, which does the same job:
#3b3b3b(browser default)var(--input-bg)#858585, 0px radiusvar(--border), 6px radiusChanges
.analytics-time-window-select→.time-window-select, used by Analytics (time window + scatter X/Y axes) and the Perf Period select. Same CSS, new name only..region-filter-label, matching "Region:" on Analytics.ph-chart-line, like the page heading and "Go Runtime". Its accessible name is unchanged.font-family: var(--font), as.filter-bar selectdoes..time-window-selectjoins the upstream follow-up (2292): feat(observers): radio setting per observation from the observer's radio history #630-1 48px touch-target block, so on touch screens it matches the region dropdown it sits next to on Analytics. This also applies to the Analytics selects.The owner didn't answer two choices before "go", so I picked defaults. Both are easy to drop:
Layout (owner request, commit
0ff1ec34)The overview row (Total Requests, Avg Response, Uptime, Slow, Version) now sits above "WebSocket clients".
The cards were built inside
#perfContent, which is rebuilt every 5 s. The history section stays outside that rebuild on purpose, so the Period select keeps focus and an open menu across refreshes. So instead of moving the section into the rebuild, the cards get their own#perfOverviewcontainer above it.renderPerfOverview()is the same markup, extracted.The unit tests check the order overview → WS history → rest, and that the cards render only in
#perfOverview. The render-race tests now read the overview container.Tests
test-perf-ws-clients.js(+2):class="time-window-select", no inline style, the.region-filter-labellabel and the heading icon.var(--font), the old class name is gone, and the select is in the upstream follow-up (2292): feat(observers): radio setting per observation from the observer's radio history #630-1 48px touch block.test-perf-ws-history-e2e.js(+2 checks, +1 assertion):#analyticsTimeWindowin light and dark, and its background differs between the two themes. Transitions are switched off for the comparison, so no fixed sleep is needed.perf.jsthe new style check fails. With the 48px rule removed, both the unit and the E2E test fail.test-perf-*.js,test-packet-filter.js,test-aging.js,test-frontend-helpers.js,test-analytics-fluid-charts.js,test-repeater-metric-scatter.js. All pass.scripts/check-xss-sinks.sh --diff origin/masterexits 0.Browser validation
On a local server:
Noticed, not changed
Editing
?wsRange=by hand while already on#/perfupdates the URL but not the select, until a reload. That's existing range-routing behaviour this PR doesn't touch.Perf
CSS class rename and markup only. The overview row is the same string, written to a different element. No new work per render.
🤖 Generated with Claude Code