Skip to content
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

meta datapoints being deleted or overwritten #599

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

krugerk
Copy link
Contributor

@krugerk krugerk commented Jan 2, 2025

Summary

Meta datapoints refer to those beeminder itself creates to indicate things like goal has been restarted, when a goal has been created, when a derailment has occurred and so on. The app differentiates these so as to not delete them when syncing data to goals from HealthKit. Currently the app does not consider origin.

Validation

Had a goal with a manually created datapoint with one of the known strings.
Same goal also had a similar datapoint generated from beeminder.
Goal was integrated with HealthKit.

Would fix #598

@krugerk krugerk requested a review from a team as a code owner January 2, 2025 08:04
@krugerk krugerk requested review from theospears and removed request for a team January 2, 2025 08:04
@theospears
Copy link
Collaborator

@dreeves how would you feel about making a small server side tweak to add dummy (boolean) and possibly initial (boolean) to the datapoint resource in the API, rather than the iOS app reproducing this logic?

nihilo is the origin of the datapoint added by Beeminder when a goal is started for the first time
@krugerk krugerk force-pushed the tweak/consider-origin branch from f7ac47f to 5c5215a Compare January 4, 2025 22:51
@krugerk krugerk changed the title beeminder produced meta datapoints come from beeminder Beeminder produced (meta) datapoints being deleted or overwritten Jan 5, 2025
@krugerk krugerk changed the title Beeminder produced (meta) datapoints being deleted or overwritten meta datapoints being deleted or overwritten Jan 7, 2025
@bsoule
Copy link
Member

bsoule commented Jan 15, 2025

@dreeves how would you feel about making a small server side tweak to add dummy (boolean) and possibly initial (boolean) to the datapoint resource in the API, rather than the iOS app reproducing this logic?

adding fields to the resource is cheap and not harmful to any of the code we're maintaining, i don't think. i guess initial is just origin == nihilo? what do you mean by/about dummy however?

@theospears
Copy link
Collaborator

I hear the datapoint now has is_dummy and is_initial, so let's use those and get rid of the isMeta helper entirely.
Probably the behavior should be slightly different in different places, e.g. apple health sync should ignore both, and the default input value should ignore is_dummy but include is_initial (e.g. for lose weight goals)

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.

HealthKit integration removes meta datapoint RESTARTED ON THE
3 participants