Skip to content

Align trend chart dates with the plot - #528

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
kavemang:fix/trend-axis-alignment-492
Jul 20, 2026
Merged

Align trend chart dates with the plot#528
ryanbr merged 1 commit into
ryanbr:mainfrom
kavemang:fix/trend-axis-alignment-492

Conversation

@kavemang

Copy link
Copy Markdown

Summary

  • place trend date labels in the same column as the chart plot, excluding the Y-axis gutter
  • align the first, middle, and last dates to the plot's start, center, and end
  • avoid duplicating the first label when a chart contains exactly two dates

Root cause

The date row filled the entire card width while the plot began after the Y-axis labels. Each date also used a left-aligned, equal-width cell, which placed the last date at the start of the final third instead of at the plot endpoint.

Tests

  • ./gradlew :app:testFullDebugUnitTest --tests com.noop.ui.TrendsAxisLabelsTest
  • ./gradlew :app:testFullDebugUnitTest
  • python Tools/i18n_audit.py --ci origin/main

Addresses item 7 of #492.

@kavemang
kavemang marked this pull request as ready for review July 16, 2026 20:47
mohdarsal9-sudo pushed a commit to mohdarsal9-sudo/noop that referenced this pull request Jul 19, 2026
…with iOS ryanbr#249) (ryanbr#254)

The Health Connect writer wrote NOOP's strap-derived daily steps + active-calories back to HC
(ryanbr#528). But those are estimates, and the phone pedometer / a watch already feed HC the
authoritative values — so writing ours too double-counts in the OS's daily step/Move totals for
any multi-source user. iOS's health write-back (ryanbr#249) deliberately excludes steps/kcal for exactly
this reason; this brings Android in line.

Minimal change — only the steps/kcal write is removed; the strap's UNIQUE signals (vitals, HR,
sleep, workouts) are still written. Removes the two records + their write permissions, the now-
orphaned HealthExportPlan.dailyAggregates/DayInput builder, and its tests. The importer-side
step de-overlap (ryanbr#589) and active-kcal crediting (ryanbr#117) are untouched.

compileFullDebugKotlin + HealthExportPlanTest (14) + the HealthConnect* suites green.
ryanbr added a commit that referenced this pull request Jul 20, 2026
…ES perms (#659) (#668)

The manifest declared Health Connect write permissions for steps and active
calories, but NOOP deliberately never writes those types back (they'd double-
count the phone/watch's authoritative daily totals — HealthConnectWriter.kt:115,
#528; iOS #249 aligns). The runtime request is built from WRITE_RECORDS, which
never included StepsRecord/ActiveCaloriesBurnedRecord, so these two declarations
were pure dead privacy surface — declared but never requested or used.

Removes both <uses-permission> lines and rewrites the stale comment (which still
claimed 'steps, active energy … writeback') to document WHY they're intentionally
absent, so a future contributor doesn't re-add them.

Manifest-only, no behaviour change (HC grants only what's both declared AND
requested; the runtime never requested these). compileFullDebugKotlin green;
manifest processes clean.
@ryanbr
ryanbr merged commit 521f7c8 into ryanbr:main Jul 20, 2026
1 check passed
ryanbr added a commit that referenced this pull request Jul 20, 2026
Marketing version stays 9.0.3; Android versionCode 296->297 and iOS
CURRENT_PROJECT_VERSION 206->207 so the new staging build installs over the
previous one. Content since the last testing build: Health Connect writeback
failure surfacing (#672), SpO2/respiration empty-track explanation (#673),
WHOOP 5/MG raw-IMU offload persist (#675), hide stale sleep recompute entries
(#679), Oura activity MET research corpus + cap/rotation (#676/#680), trend
chart date alignment (#528), and corrupt-DB quarantine preservation (#681).
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
…with iOS ryanbr#249) (ryanbr#254)

The Health Connect writer wrote NOOP's strap-derived daily steps + active-calories back to HC
(ryanbr#528). But those are estimates, and the phone pedometer / a watch already feed HC the
authoritative values — so writing ours too double-counts in the OS's daily step/Move totals for
any multi-source user. iOS's health write-back (ryanbr#249) deliberately excludes steps/kcal for exactly
this reason; this brings Android in line.

Minimal change — only the steps/kcal write is removed; the strap's UNIQUE signals (vitals, HR,
sleep, workouts) are still written. Removes the two records + their write permissions, the now-
orphaned HealthExportPlan.dailyAggregates/DayInput builder, and its tests. The importer-side
step de-overlap (ryanbr#589) and active-kcal crediting (ryanbr#117) are untouched.

compileFullDebugKotlin + HealthExportPlanTest (14) + the HealthConnect* suites green.
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
…ES perms (ryanbr#659) (ryanbr#668)

The manifest declared Health Connect write permissions for steps and active
calories, but NOOP deliberately never writes those types back (they'd double-
count the phone/watch's authoritative daily totals — HealthConnectWriter.kt:115,
ryanbr#528; iOS ryanbr#249 aligns). The runtime request is built from WRITE_RECORDS, which
never included StepsRecord/ActiveCaloriesBurnedRecord, so these two declarations
were pure dead privacy surface — declared but never requested or used.

Removes both <uses-permission> lines and rewrites the stale comment (which still
claimed 'steps, active energy … writeback') to document WHY they're intentionally
absent, so a future contributor doesn't re-add them.

Manifest-only, no behaviour change (HC grants only what's both declared AND
requested; the runtime never requested these). compileFullDebugKotlin green;
manifest processes clean.
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
Place the trend date labels in the same column as the chart plot (excluding the Y-axis gutter), and anchor first/middle/last to the plot's start/center/end. Fixes the 2-date case duplicating the first label. Android-only Compose layout; iOS uses SwiftUI Charts AxisMarks and is unaffected. Extracts trendAxisLabels() with unit coverage. Addresses item 7 of ryanbr#492.
DX23876 pushed a commit to DX23876/noop that referenced this pull request Jul 22, 2026
Marketing version stays 9.0.3; Android versionCode 296->297 and iOS
CURRENT_PROJECT_VERSION 206->207 so the new staging build installs over the
previous one. Content since the last testing build: Health Connect writeback
failure surfacing (ryanbr#672), SpO2/respiration empty-track explanation (ryanbr#673),
WHOOP 5/MG raw-IMU offload persist (ryanbr#675), hide stale sleep recompute entries
(ryanbr#679), Oura activity MET research corpus + cap/rotation (ryanbr#676/ryanbr#680), trend
chart date alignment (ryanbr#528), and corrupt-DB quarantine preservation (ryanbr#681).
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.

2 participants