Skip to content

feat: mobile UI — merge config, data explorer, merge history#47

Merged
DipandaAser merged 6 commits into
mainfrom
feat/mobile-ui
Mar 22, 2026
Merged

feat: mobile UI — merge config, data explorer, merge history#47
DipandaAser merged 6 commits into
mainfrom
feat/mobile-ui

Conversation

@DipandaAser

Copy link
Copy Markdown
Owner

Summary

Ports key web features to the React Native mobile app:

Merge Configuration

  • Source comparison cards (A/B) shown before merge starts
  • Preset profiles: Keep everything, Prefer device A, Prefer device B
  • Advanced strategy selectors for notes, highlights, and input fields
  • Cancel button to abort the merge flow
  • Config auto-saved to AsyncStorage and restored on app launch

Data Explorer

  • New explorer screen with 5 tabs: Stats, Notes, Highlights, Bookmarks, Tags
  • Notes: full-text search, publication labels, content preview, dates
  • Highlights: color-coded dots with block range badges
  • Bookmarks: grouped by publication with snippets
  • Tags: expandable tree with item counts and linked items
  • Explore button on backup cards (import screen) and export screen

Merge History

  • History section in Settings showing past merges
  • Source devices, stats, and timestamps
  • Clear history button
  • Persisted to AsyncStorage

Store Updates

  • Zustand store extended with mergeConfig, mergeHistory, explorerData
  • loadPersistedConfig() restores saved config + history on launch
  • openExplorer()/closeExplorer() for data exploration navigation

Closes #23

Test plan

  • Import 2 backups → merge screen shows config panel, not auto-start
  • Change preset → strategy selectors update
  • Tap "Merge" → progress screen works as before
  • Cancel button returns to import screen
  • Tap eye icon on a backup card → explorer opens with that backup's data
  • Explorer: switch between Stats/Notes/Highlights/Bookmarks/Tags tabs
  • Explorer: search notes by text
  • Export screen → "Explore" button opens explorer with merged data
  • Settings → merge history shows past merges
  • Kill and reopen app → merge config is restored from storage
  • Rebuild i18n package before testing: pnpm --filter @jw-notes-sync/i18n build

- Merge screen now shows source comparison + config panel before starting
  - Preset profiles (Keep everything, Prefer A, Prefer B)
  - Advanced strategy selectors per data type
  - Cancel button to abort the flow
- Data explorer screen with tabs: Stats, Notes, Highlights, Bookmarks, Tags
  - Full-text search for notes
  - Color-coded highlights with block ranges
  - Expandable tag tree with item counts
- Explore button on backup cards (import screen) and export screen
- Merge history section in Settings with clear button
- Merge config persisted to AsyncStorage, restored on app launch
- Merge strategies threaded through to core merge functions

Closes #23
@DipandaAser DipandaAser self-assigned this Mar 22, 2026
- Storage module using expo-file-system (document dir) + AsyncStorage for metadata
- BackupMeta with isMerged, parentIds, isSourceOfTruth fields
- Library screen: source of truth card, add backup (auto-merge), quick merge, imported files list
- Import screen redirects to library when source of truth exists
- Merge saves result as source of truth in library mode
- Export screen shows "Saved as source of truth" badge, "Back to library" button
- Cancel cleans up pending backups from storage
- Storage init on app launch restores config + history + source of truth
@DipandaAser DipandaAser merged commit 6aa133d into main Mar 22, 2026
1 check passed
@DipandaAser DipandaAser deleted the feat/mobile-ui branch March 22, 2026 22:21
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.

Mobile UI: import, merge, explorer, settings screens

1 participant