Repository navigation
Conversation
Part of oss-slu#151. Define the integration boundary, provenance and permission rules for optional connected-health imports: - IntegrationConnection stores a user's explicit, read-only grant per provider and measurement type; allows() is the permission check. - ImportedMeasurement requires provider, connection, unit and recorded_at so every value keeps its source and timestamp. - integrations.py holds the provider registry and adapter protocol so pages and endpoints never depend on provider-specific code. - INTEGRATIONS_ENABLED flag (off by default) keeps integrations optional. - Endpoints to list providers, list own connections, and grant a connection, with tests and docs/integrations.md.
…#207) Give users control over connected-health data: - POST /users/me/connections/{id}/disconnect revokes access, optionally deleting imported data in the same step. - DELETE /users/me/connections/{id}/measurements removes a connection's imported records and reports how many were deleted. - Both are scoped to the signed-in user (404 otherwise) and are not gated by health consent or the integrations flag. - Connections now report imported_count, and the data export (schema 1.2) includes connections and imported measurements. - Account Settings gains a Connected health apps section with confirmation dialogs and loading, empty, success and failure states, localized in all five languages. - ConfirmDialog supports extra content, Escape to cancel, a focus trap and focusing Cancel first for destructive actions.
|
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
Lets users disconnect a health app and permanently delete the data imported from it, from a new "Connected health apps" section in Account Settings, with clear privacy messaging.
Closes #207
Part of #151
Stacked PR: based on #202 (
feat/202-integration-architecture), which isn't merged yet. Until it is, this PR also shows the #202 commit. Please review only the top commit, "feat: add disconnect, delete-imported-data and privacy flows (#207)".Changes Made
POST /api/v1/users/me/connections/{id}/disconnect. It stops all future imports, keeps already imported data by default, and can delete it in the same step with{ "delete_imported_data": true }. Disconnecting twice is not an error.DELETE /api/v1/users/me/connections/{id}/measurements, which permanently deletes that connection's imported records and returnsdeleted_count. Manually entered data is never touched.404 CONNECTION_NOT_FOUNDas missing ones, so IDs cannot be probed.imported_count.1.2), so users can download a copy before deleting.ConfirmDialogwith optional extra content, Escape to cancel, a focus trap and aninitialFocusoption. Its default behaviour is unchanged.docs/integrations.mdanddocs/user-data-export.md.Testing
Checklist
Additional Notes
INTEGRATIONS_ENABLED=true, grant a connection and import sample values through/docs, then open Account Settings.schema_versionmoves from1.1to1.2, adding a newintegrationssection.