Health Connect Metrics Dashboard
Status: Current implemented behavior. Audience: Users and contributors. Implementation:
features/dashboard,data/repository/HealthRepository.kt. Navigation:Screen.Dashboard,Screen.Metric, dashboard widgets inDashboardWidgetId. Related: Feature map, Metric detail customization, Permissions.
OpenVitals treats Health Connect as the source of truth. The dashboard reads granted Health Connect records, groups them into scan-friendly widgets, and links each widget to a focused detail screen.
What It Shows
- Activity metrics such as steps, distance, calories, active calories, floors, elevation, wheelchair pushes, and workouts.
- Recovery, intake, and body areas such as sleep, heart, HRV, body composition, vitals, beverages, hydration, caffeine, nutrition, mindfulness, and optional cycle data.
- Data source labels, empty states, permission states, and confidence context where they help explain why a number is present or missing.
Tile Order
The dashboard is editable: tiles can be reordered by drag, hidden, and added back from a tray. On top of the saved order, tiles with no data for the selected day sink below the ones with data. They stay visible so the metric is discoverable, but the metrics actually being measured lead without manual reordering. A tile that is still loading holds its place, and edit mode always shows the true saved order.
Tile Sizes
Since 2.18.0 each tile has a size on the dashboard’s two-column grid: Small, Tall, Wide or Large. In edit mode a tile opens a Widget size sheet that draws it at each size it allows. The two rings start tall and every other tile small, so a layout you never touched looks as it did.
- Two rows tall. A tile with progress toward a goal draws the goal ring; the others draw their usual figure.
- Wide and Large. Steps, beverages and sleep put the figure and what explains it on one side and a chart on the other: the day’s running step total against the goal, seven days of beverage bars, and the night’s stages on lanes. When the tile is short or the font large, lines drop from the end rather than shrink. A tile with nothing to chart keeps its plain look.
Resizing a tile reloads that tile alone. A tile resized or dropped in the top block moves up to the nearest place that keeps it there; one that has no room left there, such as a ring after two small tiles, moves to the pages below.
Steps
Steps are the clearest Health Connect dashboard example. When the steps read permission is granted, OpenVitals can show the current day summary, longer period charts, goal progress, daily totals, best day, active days, previous-period comparison, and personal baseline context.
The steps widget stays read-only. If the user wants to write data, they use an explicit entry, import, or recording workflow instead of editing dashboard values directly.
Detail Screens
Most Health Connect-backed metrics use the same period pattern:
- Day, week, month, and year ranges.
- Previous and next period navigation.
- Calendar date picking.
- Pull to refresh.
- Charts, entry rows, statistics, comparisons, and confidence notes.
- Reorderable sections so frequently used cards can stay near the top.
Privacy Model
The local app does not request app-level internet permission. Health records remain in Health Connect, and OpenVitals reads only the categories the user grants.