Skip to content

Conversation

@najuna-brian
Copy link
Contributor

@najuna-brian najuna-brian commented Feb 8, 2026

Description

Resolves #295
Sync stops mid-way, fails when backgrounded, cancel button broken, app bundle update not transactional, redundant progress text, and slow file-by-file download.

Changes

Area What changed
synkronus Save uploaded zip alongside extracted files; serve it via GET /app-bundle/download-zip
synkronus Relax bundle validation to allow non-form files under app/forms/ (e.g. AnthroCollect extensions)
formulus Download bundle as single zip → extract to staging dir → atomic swap into place
formulus Android foreground service (dataSync) to keep sync alive when app is backgrounded
formulus Cancel button now propagates to service layer with cancellation checkpoints
formulus Force WebView remount after bundle update so new content loads immediately
formulus Warn user about unsynced data before app bundle update (Sync & Update / Cancel)
formulus Clean up sync screen: one spinner on the active button, progress = bar + percentage only
formulus Fix foreground notification not clearing after sync completes

Commits

Commit Description
ccf43cf synkronus: save zip on push, copy on version switch, add download-zip endpoint
103b53c formulus: zip-based app bundle download with transactional staging → swap
d368fb4 formulus: wire cancel button to service layer, add cancellation checkpoints
4c1f4f4 formulus: simplify progress text to percentage only
16502ad formulus: emit bundleUpdated event, reload WebView on HomeScreen
841da74 formulus: register Android foreground service with notifee
17523d1 synkronus: fix Go lint errors (unused context params)
9ea5d74 synkronus: relax validation — skip non-form files under app/forms/
68bb798 formulus: use key prop to force WebView remount after bundle update
00bd60d formulus: clean up sync screen UI, guard update with unsynced data check, fix stuck notification
6ae89ec formulus: declare foreground service type in AndroidManifest, move start inside try block

Testing

  • Sync data with attachments — completes successfully
  • Background the app mid-sync on Android — sync continues and finishes
  • Cancel during sync — stops promptly
  • App bundle update — downloads zip, extracts to staging, swaps atomically; old bundle preserved on failure
  • Upload AnthroCollect bundle (with extensions under app/forms/) — accepted by server
  • After bundle update — WebView reloads with new content immediately
  • Notification clears after sync/update completes and is swipeable

Video DEMO

Note:

  • In this Video, I used two different custom app-bundles.
  • You can observe the change after the App-bundle update from version 003 to 004 and to 005
sync-screen-refactor.mp4

@najuna-brian najuna-brian changed the title Fix: Sync mechanism issues fix: Sync mechanism issues Feb 8, 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.

[Formulus] issues with sync

1 participant