Universal data portability: CSV import/export, clearer backup labels, alarm fixes - #22
Open
nufuturepro wants to merge 1 commit into
Open
Universal data portability: CSV import/export, clearer backup labels, alarm fixes#22nufuturepro wants to merge 1 commit into
nufuturepro wants to merge 1 commit into
Conversation
- CSV export/import (RFC 4180, zero deps): spreadsheet-friendly, merging imports, pre-import safety snapshot, immediate alarm scheduling - Supply (inventory) tracking: doses left / refill size / low threshold per medication, automatic decrement on take across all take paths, one-time low-supply alerts with per-item IDs, stale-alert cleanup, threshold evaluation at start/boot/import, JSON + CSV persistence - Lowest-supply home-screen widget with progress bar, refreshed on every data save - Reminder fixes for early doses: taking a dose before the reminder now cancels that day's alarm; UI take/undo re-arms immediately; fire-time race suppressed - "Export Settings" relabeled to "Export Data" (it was always a full backup) - local.properties untracked (already gitignored; committed copy overrode contributors' SDK paths) All verified on-device: take/un-take stock math, threshold alert fire + dedup + cancel, widget updates, early-take alarm cancellation, CSV/JSON round-trips. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
nufuturepro
force-pushed
the
upstream-contribution
branch
from
September 14, 2026 14:27
c152268 to
f714ebf
Compare
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.
Universal data portability + supply tracking + alarm fixes
This PR bundles four improvements to Med, all verified working on-device:
1. CSV export/import (RFC 4180, zero dependencies)
title,creation_date, andcreation_timeare required.2. "Export Settings" → "Export Data"
The button has always exported a full backup (meds, history, and settings), but the label said "Settings" — users reasonably concluded it was not a data backup. All related labels and toasts now say "Data".
3. Supply (inventory) tracking with low-supply alerts
Per-medication stock tracking in the medicine editor:
Audit hardening included from on-device testing:
4. Lowest-supply home-screen widget
A resizable widget that always shows the medication with the lowest supply, including a progress bar toward the refill size and a red count at the threshold. It re-renders automatically on every data save — no polling, no battery cost.
5. Reminder fixes for early doses
Previously, logging a dose before the reminder time did not cancel that day's alarm (only the notification's Take button re-armed anything). Now:
getNextOccurrenceskips today's slot when already taken, so an early dose cancels the pending alarm.6.
local.propertiesuntracked.gitignorealready listslocal.properties, but a committed copy was still tracked and silently overrode every contributor's SDK path. This untracks it (the file remains on disk locally).Testing