Skip to content

sleep: widen hypnogram axis edge guard for 12h labels - #1134

Merged
ryanbr merged 1 commit into
mainfrom
fix/hypnogram-axis-edge-guard
Aug 7, 2026
Merged

sleep: widen hypnogram axis edge guard for 12h labels#1134
ryanbr merged 1 commit into
mainfrom
fix/hypnogram-axis-edge-guard

Conversation

@ryanbr

@ryanbr ryanbr commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Re-review follow-up to #1133.

The interior round-hour drop-guard was 0.15/0.85, sized for a ~40dp 24h edge label (10:25). A 12h edge is wider (10:25 AM ~55dp), so a mark landing near the boundary (frac ~0.83) could touch the clamped onset/wake label — the axis Layout clamps edges on-screen but doesn't drop-on-collision. Widened to 0.18/0.82.

Costs nothing on real nights (verified): phone keeps 03:00/06:00 (.32/.60), tablet keeps 02/04/06/08 (.23–.78). Also removed a stale ~90dp comment from the earlier 60dp density change.

Android-only, render-only. compileFullDebugKotlin ✓, HypnogramAxisTicksTest ✓ (guard change keeps all shape/format assertions green).

Re-review of #1133: the edge drop-guard was tuned for a ~40dp 24h edge label
('10:25'), but a 12h edge is wider ('10:25 AM' ~55dp). An interior mark near the
old boundary (frac ~0.83) could touch the clamped onset/wake label on a 12h
device — the axis Layout clamps edges into view but doesn't drop-on-collision.
0.18/0.82 gives the wider edge clearance and drops nothing on real nights (phone
03:00/06:00 at .32/.60; tablet 02/04/06/08 at .23-.78). Also drops a stale
'~90dp' comment left from the density change.
@ryanbr
ryanbr merged commit 7b0dfb1 into main Aug 7, 2026
3 checks passed
@ryanbr
ryanbr deleted the fix/hypnogram-axis-edge-guard branch August 7, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant