Repository navigation
Add phone-based step source via Health Connect #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
leonamme
wants to merge
33
commits into
foureight84:main
Choose a base branch
from
leonamme:pr/phone-step-source
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
3f5e0b8
Add phone-based step source (Health Connect)
9e03378
Add regression tests for the phone step source
a9ee095
Add phoneSteps column to ActivityDailyEntity + Room migration
361eb61
Phone step write: write only phoneSteps, leave ring columns untouched
22ba468
Read path: pick phoneSteps vs steps at display time by user preference
03f7c51
Read path: widgets and notifications honor the step-source preference
21f81c0
Delete the in-memory phone-ownership tracking
98b606a
Exporter: drop the phone exclusion; plausibility guards already skip …
3b50a78
Fix Step Source switch: permission filter + rapid-toggle race
ce32b21
PulseEventBus: hold events until first subscriber attaches
7bf8921
PhoneStepManager: filter foreign origins instead of subtracting our own
f13752a
PhoneStepManager: publish 0 for today so phone mode reads 0, not stal…
7a18764
Activity: calorie goal ring uses active, not total, calories
d7fa93d
PhoneStepManager: share the HC client + steps-permission preamble
afc91a5
Step Source: throttle the automatic backfill after an explicit one
ba613fb
Add trailing newlines to files that lost them
1134108
Fix PhoneStepSourceTest: EXCLUDED_SOURCES no longer contains phone
22cdd50
Test read-time step-source selection (displaySteps / forDisplay)
e19c732
Test the phone write's column-only contract
6ccd278
EventPersistenceSubscriber: fix stale EXCLUDED_SOURCES KDocs
f701393
Backup/restore: carry phoneSteps through the archive
b879868
Persist ring events from Application.onCreate, not the composition
afc91d0
Phone steps: publish 0 only after a source has proven it writes steps
98bd96e
Phone fallback: clear today's phoneSteps when the reader fails
dd45f24
Phone write: preserve updatedAt on existing rows
e21d481
Coach: read display steps through DisplaySteps
c38f2b6
Coach tools: thread step-source preference into ToolExecutionContext
46bca80
Coach tools: read display steps through DisplaySteps
3d9be01
Display steps: route every reader through DisplaySteps
86b8875
Step source: refresh screens when the toggle changes
4abc45c
Phone steps: paginate foreignStepOrigins
019df68
Activity: show Records on phone-mode days the phone never backfilled
6efa020
Review cleanup: stale KDoc, mis-indented comment, wrong test filename
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cold-start race. On a cold launch,
onResumecallsrefreshPhoneStepsbeforePulseLoopApp'sLaunchedEffecthas runpersistence.start().PulseEventBusis areplay = 0SharedFlow, so today'sPhoneStepsUpdateand all 30 backfill events are dropped when nobody is subscribed yet.refreshHistoricalDays()still returns true, solastBackfillDay = todayis written and the backfill won't retry until tomorrow.