Skip to content

Phase 6: export, settings, goal, notifications - #8

Merged
hupcus merged 7 commits into
mainfrom
phase-6-export-settings
Sep 24, 2026
Merged

hupcus merged 7 commits into
mainfrom
phase-6-export-settings

Conversation

@hupcus

@hupcus hupcus commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Phase 6 — Export, nastavení, cíl, notifikace (PLAN.md)

Scope: Nastavení (Měření / Jednotky / Zobrazení / Oznámení / Data / Soukromí / O aplikaci); Vyloučené aplikace with runtime-detected suggestions (launcher via resolveActivity(HOME), default keyboard, System UI); daily goal (presets 100 m – 5 km, custom 10 m – 100 km); CSV export per_app.csv + daily_summary.csv via SAF or the share sheet (non-exported ExportFileProvider, cache/exports/ only); Smazat všechna data (data / data + settings + calibration); optional notifications Denní cíl dosažen / Nový rekord / Shrnutí včerejška (POST_NOTIFICATIONS, the one permission PLAN allows here). D19: time columns in the export, exclusions apply to time, delete clears time in app, privacy paragraph. ADR-030, ADR-031.

DoD

  • SPEC §25 — daily goal: presets + custom, not a ban, notification optional
  • SPEC §26 — notifications optional, never per event, at most once a day per kind, runtime permission on 33+, not needed for measuring
  • SPEC §28 — both CSVs with the spec columns (+ foreground_ms, active_scroll_ms, ADR-021), SAF / share sheet, no storage permission; formula-injection guard, BOM, CRLF, empty = unknown
  • SPEC §44 — settings sections Measurement / Units / Notifications / Data / Privacy / About
  • SPEC §45 — delete all data with confirm dialog, keep or delete settings + calibration; cannot be interrupted, nothing deleted comes back (flush, usage sync, notifications)
  • Exclusions hide, never delete; excluded apps disappear from every read, notification and export
  • Tests: CSV format, exclusions in every read, notification throttle and rules, goal input, delete races (pending flush, usage floor, notification epoch), provider guard — 245 JVM tests

Verification

  • Gates: testDebugUnitTest lintDebug assembleDebug assembleRelease green (lint: only the 6 old SetTextI18n in the Phase 1 debug View surface), 29 tools tests, manifest policy OK for debug + release (release providers now an exact allowlist).
  • Emulator API 34: notification prompt (refuse, allow, permanent refusal → system page); all three notifications, goal not re-sent after reinstall; export via file picker and share in debug and R8 release; foreign uid cannot read the provider, path traversal refused; delete (both variants); 28 screenshots light + dark reviewed by subagents. After the Stage 2 fixes: delete (0.9 m → 0.0 m, no crash) and share export re-checked.
  • Reviews: /topshit (erase tied to the screen → NonCancellable; delete clears shown notifications; export says excluded apps are omitted). Stage 2 functional + security (Fable): 1× HIGH (tunables outside MeasurementConfig), 1× MEDIUM (notification about deleted data), 4× LOW (write errors crashed, cancelled export reported as failed, lenient exclusions in export, narrow release provider guard) fixed in dcd566f, each with a test.
  • Not verifiable on the emulator → handoff.md „Dluh ověření“ V6 (notifications + CSV in Sheets/Excel on the OnePlus).

CI

GitHub Actions are still blocked by the account's billing / spending limit (open point in handoff.md). The merge relies on the CI-equivalent gate run in a clean checkout of this branch (same commands as .github/workflows/ci.yml + assembleRelease, JDK 21).

🤖 Generated with Claude Code

hupcus and others added 7 commits September 24, 2026 15:26
- Excluded apps disappear from every read (DAO NOT IN, live map filtered);
  rows stay and come back when the exclusion is lifted (ADR-031).
- DataEraser: usage sync paused, data floor stored, tables cleared under the
  pipeline's write lock with a data epoch bump, so neither an in-flight flush
  nor a usage sync brings erased data back.
- CsvExporter per spec §28 (+ foreground_ms, active_scroll_ms): RFC 4180,
  CRLF, BOM, dot decimals, empty = unknown, formula-injection guard.
  CsvExportWriter writes through SAF or shares via ExportFileProvider
  (not exported, cache/exports/ only, paths in manifest meta-data).
- Opt-in goal / record / summary notifications, once a day each, checked
  after every committed flush; POST_NOTIFICATIONS (ADR-030).
- HOME <queries> intent for the launcher suggestion; 90-day session prune.
- Guards: POST_NOTIFICATIONS allowlisted, release forbids only the debug
  provider, every provider must be closed and carry its paths meta-data.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eens

- Nastavení per spec §44: goal (presets + custom 10 m – 100 km), units, theme,
  notifications with the runtime permission and a way out after a refusal,
  export, delete-all (data / data + settings + calibration), privacy, about.
- Vyloučené aplikace: runtime suggestions first, then apps with data; an app
  without a visible label shows its whole package name once.
- Calibration screens format numbers in the strings' locale, not the device's.
- System bar icons follow the app theme (forced dark on a light system).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- DataEraser runs NonCancellable: the settings screen's scope dies on back
  or rotation, and a cancelled erase could leave settings cleared but the
  tables full. Test cancels the caller mid-erase.
- Delete-all also removes posted notifications (they show measured data).
- Export screen says excluded apps are not in the files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…xt session

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…export exclusions

- RECORD_MIN_PRIOR_DAYS / RECORD_MIN_MM move to MeasurementConfig; PolicyGuardTest now fails
  when a const named in the ADR log is declared anywhere else.
- The whole erase runs under writeLock (epoch, settings, floor, tables) and the notification
  check posts under the same lock only while its epoch holds: no notice about deleted data,
  no "already posted" mark left behind. Leftovers are cleared before and after.
- A failing erase step no longer stops the others and is reported; settings writes that hit
  a DataStore I/O error show a message instead of crashing (launchWrite).
- A cancelled export (back, rotation) is not reported as failed; a failed SAF write deletes
  the half file.
- The export reads exclusions from the strict settings flow: unreadable settings fail the
  export instead of exporting excluded apps.
- check_manifest_policy: release providers are an exact allowlist.
- ADR-031 amended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@hupcus
hupcus merged commit d3ac992 into main Sep 24, 2026
1 check failed
@hupcus
hupcus deleted the phase-6-export-settings branch September 24, 2026 14:33
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