Skip to content

Plan: GDPR 'Delete User Data' Firebase Extension - #99

Closed
code418 wants to merge 5 commits into
masterfrom
plan/delete-user-data-extension
Closed

code418 wants to merge 5 commits into
masterfrom
plan/delete-user-data-extension

Conversation

@code418

@code418 code418 commented Apr 25, 2026

Copy link
Copy Markdown
Owner

Draft plan for the 'delete-user-data-extension' feature.

See docs/plans/delete-user-data-extension.md for the full plan including Firebase services used, data model, rollout, and risks.

Part of the Firebase-enhancement suggestion series. No implementation in this PR — planning document only.

code418 and others added 5 commits April 24, 2026 17:36
_userDocStream() was invoked directly inside build(), so each rebuild
created a new Firestore snapshot subscription. This caused unnecessary
reads and a brief "0 pts / 0 claimed" flicker every time the sibling
StreamBuilder emitted (e.g. streak change). Cached in a late final field
to match the existing _streakStream pattern.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
FuzzyCompassPainter counter-rotates the 'N' marker glyph so it remains
readable while its ring position still tracks magnetic north. The wear
compass page wrapped the painter in Transform.rotate(-rotation) but
didn't forward rotation to the painter, so the N letter spun with the
canvas and appeared sideways whenever the watch wasn't facing north.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cloud Functions serialise JS numbers as either int or double depending
on value, so `as int?` throws on a double. wear_claim_page and
wear_compass_page both cast counts['total'] (and compass sector values)
with `as int?`, which would crash the scan flow on any backend response
where the count came through as a double. Normalise via `num?.toInt()`
and reconstruct the compass counts map entry-by-entry for the same
reason.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…hrows

The Nearby and Claim screens assigned counts['total'], pts['max'],
cipher counts, and compass sector values (all dynamic, originating
from HttpsCallable.data) straight into typed int fields. Cloud Functions
can serialise a JS number as either int or double depending on value
(e.g. aggregations that go through a divide), so any double would crash
the scan with a runtime cast error. Mirror the wear-side fix and
normalise via `num?.toInt()`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@code418

code418 commented May 27, 2026

Copy link
Copy Markdown
Owner Author

Closing in favour of #127, which consolidates this plan (and the 18 other 2026-04-25 plan drafts) into a single versioned roadmap at docs/plans/ROADMAP.md. The carrier commits this PR shipped on (wear stream caching, compass N-label rotation, asInt num-cast normalisation on phone+wear) are already on master, so the only remaining content here was the doc body — preserved verbatim in the ROADMAP.

@code418 code418 closed this May 27, 2026
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.

1 participant