Skip to content

fix: Nodes filter row, count pills and Home health stats on phones (#2508, #2509, #2510) - #2519

Merged
efiten merged 3 commits into
Kpa-clawbot:masterfrom
zfouts:fix/phone-layout-2508-2510
Dec 1, 2026
Merged

efiten merged 3 commits into
Kpa-clawbot:masterfrom
zfouts:fix/phone-layout-2508-2510

Conversation

@zfouts

@zfouts zfouts commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Three phone-layout fixes, one commit each. All three are CSS-only; each issue's cause was confirmed on current master before fixing.

Measurements are from Chromium (Playwright) with touch emulation (isMobile + hasTouch, so (pointer: coarse) matches) against the E2E fixture. Not checked on a real iPhone.

#2508 Nodes filter row on phones

What was wrong: .nodes-filters is a flex row with no wrapping. At 390px the row was 406px wide inside a 378px pane. The status buttons wrapped onto two lines (All/Active above Uncertain/Stale), and #nodeSilentFor ended at x=413 in a 390px viewport. At 768px (tablet, list pane beside the detail pane) the row was 514px inside a 424px pane, so "Silent for" was clipped there too.

Fix:

  • .nodes-filters gets flex-wrap: wrap at every width. On desktop the row fits, so nothing moves.
  • At ≤640px the button group takes its own line (flex: 1 1 100%) and the selects share the next one (flex: 1 1 140px; min-width: 0). This differs from the issue's flex: 1 1 0: if the LoRa select is shown as well, the third select wraps to its own line instead of all three being squeezed.
  • align-self: flex-start was needed too, and the issue's CSS doesn't have it. .nodes-tabs-bar is a wrapping column with align-items: center. At 390px the node-type tabs are 406px wide, so the column's flex line is 406px as well. Centring the 378px filter row in that line pushed it 14px past the right edge, even with the issue's CSS applied.
390px touch before after
filter row width / pane width 406 / 378 px 378 / 378 px
status buttons 2 lines 1 line
#nodeSilentFor right edge (viewport 390) 413 px 384 px
768px: filter row / list pane 514 / 424 px 424 / 424 px (Silent for wraps to the next line)
1280px: filter row 518 px, one row unchanged

#2509 Nodes count pills on touch screens

What was wrong: the (pointer: coarse) rule gives .node-count-pill min-height: 44px, but the pill was inline-block, so the text sat at the top. The label's centre was 14px above the pill's centre.

Fix: as suggested: display: inline-flex; align-items: center; justify-content: center. The 44px target is kept, and the text is now 0px off centre. Without touch the pill is unchanged at 20px tall.

#2510 Home health card stats on phones

What was wrong: .health-metric { flex: 1 1 140px } is meant as a minimum width in the wrapping row. At ≤640px .health-metrics becomes a column, and the basis became the height: five 140px boxes for 58px of content.

Fix: as suggested: .health-metric { flex: 0 0 auto; } inside the existing 640px block. After the fix each box is 58px at 390px. 768px and desktop are unchanged (59–61px boxes side by side).

Screenshots

Taken at 390px, 768px and 1280px, before and after, and reviewed locally; they are not attached.

  • 390px Nodes: before, the buttons sit two by two with "Silent for" cut off. After, the buttons are on one line and both selects share the next line inside the screen.
  • 390px Home health card: before, five tall, mostly empty boxes. After, compact boxes.
  • 768px Nodes: after, "Silent for" wraps under the buttons inside the list pane.
  • 1280px: identical before and after.

Tests

New tests/e2e/test-phone-layout-e2e.js loads Nodes and Home in Chromium at 390 and 430px with touch, 768px with touch, and 1280px with a mouse. It asserts:

The test is registered in scripts/non-unit-tests.json and in deploy.yml (shard 3, the lowest in the last master run). Each commit adds the assertions for its own issue.

Before the fixes, the full test fails 10 of 22 checks. After each commit, that commit's checks pass, and all 22 pass at the end.

Local runs:

  • sh test-all.sh passes.
  • ESLint on public/*.js: 0 errors.
  • These E2E suites pass: test-a11y-axe-1668, test-filter-ux-e2e, test-bottom-nav-1061-e2e, test-touch-gestures-coverage-e2e, test-table-fluid-e2e, test-home-coverage-e2e, test-touch-targets, test-nodes-export-e2e, test-node-quick-actions-e2e.
  • test-e2e-playwright.js: 149 pass with fail-fast disabled. One check fails locally, "Version info lives on Perf dashboard" (#navStats wait), and it fails identically on master's CSS, so it comes from the local setup and not from this change.

Overlap with #2514

#2514 also edits public/style.css. It adds a 16px font size for touch-screen fields in the (pointer: coarse) block, and wires its test into deploy.yml / non-unit-tests.json. The hunks don't overlap: with #2514's style.css changes applied on top of this branch, the patch applies cleanly and the new test still passes 22/22. Its larger select text fits in the shared select row at 390px.

Not changed

At 390px the node-type tabs (All … Sensors, 406px) are still wider than the 378px pane, so the list pane can scroll sideways by about 28px. That is separate from these issues and is left for a follow-up.

Closes #2508
Closes #2509
Closes #2510

🤖 Generated with Claude Code

zfouts and others added 3 commits December 1, 2026 13:53
.nodes-filters was a flex row with no wrapping, so on a 390-430px phone
the status buttons squeezed into two lines and the "Silent for" select
ran past the screen edge. On a tablet the row also overran the ~420px
list pane next to the detail pane.

The row now wraps everywhere; desktop, where it fits, is unchanged. At
640px and below the buttons take their own line and the selects share
the next. flex-start keeps the row at the pane's left edge when the
node-type tabs above are wider than the pane: the column's flex line is
then wider too, and centring pushed the row 14px past the right edge.

tests/e2e/test-phone-layout-e2e.js measures the real page in Chromium
with touch emulation at 390, 430 and 768px, plus a 1280px desktop pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2509)

The Kpa-clawbot#630 touch rule raises .node-count-pill to min-height 44px, but the
pill was inline-block, so all the extra height went below the text: on a
phone the label sat 14px above the pill's centre. inline-flex with
centred alignment keeps the 44px target and centres the label. Without
the touch rule the pill is unchanged at 20px tall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-clawbot#2510)

.health-metric has flex: 1 1 140px, a minimum width in the wrapping row.
At 640px and below .health-metrics becomes a column, so that 140px basis
became each stat's height: five 140px boxes holding 58px of content.
flex: 0 0 auto in the same breakpoint sizes them to their content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zfouts
zfouts marked this pull request as ready for review December 1, 2026 20:21
@efiten
efiten merged commit 1cf035d into Kpa-clawbot:master Dec 1, 2026
17 checks passed
zfouts added a commit to zfouts/CoreScope that referenced this pull request Dec 2, 2026
… and the advert reception changes to Postgres

Brings in 10 master commits: Kpa-clawbot#2366 (catalogue key tier), Kpa-clawbot#2497 (regions
count only received adverts), Kpa-clawbot#2498 (archived foreign-advert flags), Kpa-clawbot#2492
(observer comparison), Kpa-clawbot#2511, Kpa-clawbot#2513, Kpa-clawbot#2514, Kpa-clawbot#2517, Kpa-clawbot#2518, Kpa-clawbot#2519.

Conflicts:
- cmd/ingestor/approved_channels.go: both sides added a mutex to
  channelKeySet. One mu now serialises refresh, master's setCatalog and the
  branch's Close, and guards the users.db/Postgres accounts readers as well
  as master's approvedNames and catalogue tier.
- cmd/ingestor/db.go, nodes upsert: master's foreign_advert carry-over on
  top of the branch's qualified columns and lastSeenClampSQL. Master looked
  up the archived flag with ?1, which dbx.Rebind turns into $11 on Postgres;
  it is now a plain ? bound to the public key again, and the EXISTS is
  wrapped in CASE so Postgres stores 0/1 in the BIGINT column.
- cmd/ingestor/db.go, MoveStaleNodes: master's UPDATE that restores an
  archived foreign flag runs before the branch's portable moveStaleNodesSQL
  (not master's INSERT OR REPLACE ... SELECT *), with IS DISTINCT FROM 1
  instead of the SQLite-only IS NOT 1.

Ported to Postgres:
- catalog_keys (Kpa-clawbot#2366): pgschema migration 0004_catalog_keys.sql (same
  columns, CHECKs, defaults and key; LatestVersion 4), the table in
  sqlite_endstate.sql, and the worker's upsert sets updated_at from
  excluded.updated_at instead of strftime('%s','now').
- corescope-migrate copies catalog_keys and verify never prints
  catalog_keys.key_hex (channel secrets), for any store.
- GetNodes region filter (Kpa-clawbot#2497) and the observer comparison (Kpa-clawbot#2492) used
  IS NOT 'tx'; both use IS DISTINCT FROM 'tx'. The comparison's
  ORDER BY label COLLATE NOCASE is lower(<label expression>) on Postgres,
  which folds ASCII only under COLLATE "C", as NOCASE does.
- docs/catalogue-keys.md: the revert SQL on PostgreSQL.

Tests on both backends:
- The catalogue key tests that use a store and the Kpa-clawbot#2498 foreign-advert
  tests run on SQLite and Postgres (onBothStores; insertTx uses RETURNING).
- New dual tests for the observer comparison and the GetNodes region filter.
- pgschema: an upgrade from version 3 with data; the control migration tests
  no longer assume 3 is the latest version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants