feat(signal-viewer): show clock time on the session signal x-axis#35
Merged
Conversation
The signal viewer x-axis previously labelled ticks with elapsed time since the session start (e.g. 01:23:45). It now shows the recording device's then-current local wall-clock time (24-hour HH:MM, or HH:MM:SS when ticks are finer than a minute), so the actual time of night an event occurred is immediately visible. - Midnight day-boundaries draw a full-height rule with a `Mon DD` label, so recordings that cross midnight read unambiguously. - Duration into the session stays discoverable: the crosshair/keyboard readout leads with clock time and appends the elapsed offset (e.g. 23:16:42 (+1:12:08)), and the "Showing" status reads as a clock range plus span (e.g. 23:14 - 23:19 · 5m). - Clock time derives from the wall-clock-as-UTC session epoch formatted with UTC getters, so the axis and crosshair always agree and labels are independent of the viewer's current timezone. - Screen-reader announcements lead with clock time, spell the elapsed duration, and append the date once the cursor crosses into a later day. - Falls back to the previous duration labels when the session start time is unparseable. Fully client-side; nothing leaves the browser. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PM5QGXfGYbRrGe2YPfBsXj
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.
Summary
The session signal viewer's x-axis previously labelled ticks with elapsed time since the session start (e.g.
01:23:45). It now shows the recording device's then-current local wall-clock time, because knowing the actual time of night an event happened is critical for interpreting CPAP therapy data.What changed
HH:MM, orHH:MM:SSwhen zoomed in far enough that ticks are finer than a minute. (24h matches the existing crosshair style and is unambiguous across midnight.)Mon DDdate label, so recordings that cross midnight (i.e. most of them) read unambiguously. Redundant non-color cue (line weight + dated text).23:16:42 (+1:12:08)), and the "Showing" status reads as a clock range plus span (e.g.23:14 – 23:19 · 5m).sessionWallClockEpoch) formatted with UTC getters, so the axis and crosshair are guaranteed to agree and labels are independent of the viewer's current timezone (they reflect the machine's local clock at recording time).hoverReadout.formatClockTimewas reconciled to the same convention.Design decisions (delegated to the agent team)
Time (Duration)(rejected as cluttered); duration lives in the crosshair and viewport-span readout instead.Testing
tsc --noEmit, ESLint, Prettier: clean.src/components/chartsandsrc/views/Sessionssuites, including new coverage for clock-label formatting, UTC-getter timezone independence, day-boundary detection (single/none/multi-midnight, non-finite, non-positive), strict<60stick-precision boundary, the NaN/undefined fallback, and axis↔crosshair agreement.qaagent (no blockers);securityagent: no findings (fully client-side, no new deps, DOM sinks React-escaped, day-boundary loop hard-capped).Privacy
Fully client-side. No network calls, no telemetry, no new dependencies; nothing leaves the browser.
🤖 Generated with Claude Code
Generated by Claude Code