Skip to content

CES-41 — Export ZIP - #21

Merged
JMNofziger merged 4 commits into
mainfrom
cursor/ces-41-export-9a29
Aug 16, 2026
Merged

CES-41 — Export ZIP#21
JMNofziger merged 4 commits into
mainfrom
cursor/ces-41-export-9a29

Conversation

@JMNofziger

Copy link
Copy Markdown
Owner

On-device ZIP export per docs/specs/export-v1.md § v1 amendments (2026-08-16).

What

Settings → Export data writes a STORE ZIP (cestovni_export_<hash>_<YYYYMMDD_HHMMSS>.zip) with manifest.json, README_export.txt, and the five CSVs. Share sheet is share_plus. Flush is best-effort; export still works offline.

Status report

  1. ZIP library: custom STORE writer (client/lib/export/store_zip_sink.dart) — no archive on the write path. Data-descriptor bit so CRC/size are written after each entry. Tests parse the central directory.
  2. Export action: Settings, Backup section, LedgerTile labelled Export data plus “Photos are not included.” Foreground-only (progress on the tile). No background task, no POST_NOTIFICATIONS.
  3. Manifest stand-ins: app_version = injected kAppVersion (0.0.1, lockstep with pubspec); app_platform = 'android'; user_key_hash = first 8 hex of SHA-256(settings.id); CSV row_version empty / max_row_version_seen: null; outbox count+hash from OutboxRepository.pendingMutationIds().
  4. Tests: client/test/export/ — CSV rules, A1 headers, golden ZIP + cells, soft-delete/drafts/photos excluded, 3-pending outbox hash, streaming CountingZipSink over 1 000 lazy rows (addCalls > 1000, maxChunkBytes ≤ 512), atomicity (failed write deletes .tmp), module purity. Settings widget test taps an injected exporter.
  5. Known limits: 10k-row / 30s / 10MB device timing is not a CI gate (spec § A4); deferred to CES-68. Non-UTC IANA _local columns still use the device offset (CES-66). cadence_km is meters (CES-71 rename later). No import (CES-70).
  6. Linear CES-41 → Done after green analyze/test.

Out of scope

CES-70 import, M3 (CES-42–45), PWA-lite, CES-51, background export, renaming cadence_km.

Open in Web Open in Cursor 

cursoragent and others added 4 commits August 16, 2026 11:26
Stream vehicles/fill-ups/maint/settings into a STORE ZIP with
manifest.json and README_export.txt. Headers match export-v1 § A1.
Photos, drafts, and outbox rows stay out of the archive.

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
Update the delivery plan, Settings UX notes, and add a tests/export
pointer. Device 10k timing stays deferred to CES-68.

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
Match SyncClient's baseUrl/bearerToken constructor, implement abandon
on in-memory sinks, and drop a leftover duplicate in the photos
exclusion test. Analyze is clean.

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
@JMNofziger
JMNofziger marked this pull request as ready for review August 16, 2026 12:13
@JMNofziger
JMNofziger merged commit 68cb108 into main Aug 16, 2026
4 of 5 checks passed
@cursor
cursor Bot deleted the cursor/ces-41-export-9a29 branch August 21, 2026 11:07
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.

2 participants