Skip to content

iOS pilot readiness: cleanup, annotated bilingual PDF export, and reliable offline sync - #1

Open
peterdsp wants to merge 1 commit into
cleanup-and-ios-pilot-readinessfrom
ios-annotated-pdf-and-reliable-sync
Open

iOS pilot readiness: cleanup, annotated bilingual PDF export, and reliable offline sync#1
peterdsp wants to merge 1 commit into
cleanup-and-ios-pilot-readinessfrom
ios-annotated-pdf-and-reliable-sync

Conversation

@peterdsp

@peterdsp peterdsp commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Why

Three coordinated fixes to make the iOS app match what it advertises: exported PDFs were missing damage annotations and were English-only; offline edits and sync were unreliable and silently lossy; and the marketing/docs claimed features that do not ship.

Base: this PR targets cleanup-and-ios-pilot-readiness (the peer session's Supabase-removal / iOS-pilot cleanup commit), so the diff is exactly the one annotated-PDF/sync commit below. Merge that branch into main afterward to land everything.

What (commit 5eedbaf)

Accurate, bilingual PDF (Prompt 1)

  • Render saved damage markers onto the correct photos (matched by image id), with a per-photo legend of type, severity, and the verbatim description. Positions are percentage based and orientation normalized, so they survive resize, crop, and EXIF rotation.
  • Report language: English, Greek, or bilingual Greek/English for headings, labels, dates, and controlled vocabulary. User-entered text is never translated.
  • Honor the existing, previously ignored settings: photos, annotations, condition gauge, and paper size (A4/Letter).
  • Preview now shows all pages (PDFKit). Wired the existing positional annotation view into the report flow so markers can actually be placed and saved.

Reliable offline sync (Prompt 3)

  • New durable outbox (SyncOutbox) and SyncEngine: pending changes persist across restarts, push with idempotent upserts (create falls back to update on a duplicate id, update falls back to create on 404), classified error handling (auth, offline, server), bounded retries, and visible sync status.
  • All four stores route through the outbox; pull merges without discarding local or pending edits. Report annotations now sync up and stay local as the source of truth. No PowerSync or KMP migration needed.

Claims match what ships (Prompt 2)

  • Fixed open-source vs proprietary licensing language, scoped multilingual to iOS PDF, marked treatment proposals as planned, corrected Android and offline/SQLDelight claims, relabeled placeholder screenshots as design mockups, tempered unverified competitor comparisons, and added docs/STATUS.md. LICENSE unchanged.

Testing

31 tests pass on iPhone 17 simulator: marker geometry, orientation, language output, user-text preservation, content toggles; sync offline persistence, restart, interrupted retry, auth failure, duplicate/conflict, and coalescing. Representative English/Greek/bilingual PDFs were generated and the rendered pages inspected.

Known limitations

Retries fire on triggers (enqueue, launch, foreground, manual), not a background timer. Conflict policy is local-pending-wins / last-write-wins; pulls keep local-only records (a remote delete will not remove the local copy). Project to client links do not sync (local stores a name, server expects an id). Image binaries are not in the outbox. Screenshots were relabeled rather than recaptured.

🤖 Generated with Claude Code

Prompt 1 (PDF): render saved damage markers onto the correct photos with a
per-photo legend, preserving marker positions across orientation, resize and
crop. Add report-language options (English, Greek, bilingual Greek/English) for
headings, labels, dates and controlled vocabulary; user-entered text is never
translated. Honor the existing export settings (photos, annotations, condition
gauge, paper size). Show all pages in the in-app preview via PDFKit. Wire the
existing positional annotation view into the report flow so markers can be
placed and saved.

Prompt 3 (sync): add a durable outbox (SyncOutbox) and SyncEngine that push
pending changes with idempotent upserts (create falls back to update on a
duplicate id, update falls back to create on 404), classified error handling
(auth, offline, server), bounded retries and visible sync status. Route all four
stores through the outbox; merge on pull without discarding local or pending
edits. Send report annotations to the server and keep them locally as the source
of truth. No PowerSync or KMP migration needed.

Prompt 2 (claims): correct docs and landing page to match what ships. Fix
open-source vs proprietary licensing language, scope multilingual to iOS PDF,
mark treatment proposals as planned, correct Android and offline/SQLDelight
claims, relabel placeholder screenshots as design mockups, temper unverified
competitor comparisons, and add docs/STATUS.md capability matrix.

Tests: 31 passing (marker geometry, orientation, language output, user-text
preservation, content toggles; sync offline persistence, restart, interrupted
retry, auth failure, duplicate/conflict, coalescing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@peterdsp peterdsp changed the title iOS: annotated bilingual PDF export and reliable offline sync iOS pilot readiness: cleanup, annotated bilingual PDF export, and reliable offline sync Sep 8, 2026
@peterdsp
peterdsp changed the base branch from main to cleanup-and-ios-pilot-readiness September 8, 2026 21:46
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