Skip to content

[codex] Update online data sync settings UI#15

Merged
Eoic merged 2 commits into
masterfrom
codex/online-data-sync-settings
Jun 27, 2026
Merged

[codex] Update online data sync settings UI#15
Eoic merged 2 commits into
masterfrom
codex/online-data-sync-settings

Conversation

@Eoic

@Eoic Eoic commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Renames online sync UI to user-facing Data sync and removes visible implementation details.
  • Replaces separate Library/Media storage blocks with one Data sync section showing active server, status, pending changes, file storage, reconnect, server management, and cache clearing.
  • Adds multiple custom server support with one user-entered URL, server discovery, active server switching, duplicate rejection, removal, and legacy preference migration.

Dependency

Validation

  • flutter analyze
  • flutter test test/providers/sync_settings_provider_test.dart test/pages/profile_storage_sync_test.dart
  • flutter test

@Eoic Eoic marked this pull request as ready for review June 27, 2026 15:03
Copilot AI review requested due to automatic review settings June 27, 2026 15:03
@Eoic Eoic merged commit 4eb20e2 into master Jun 27, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the “Storage & sync” settings UX to present a user-facing “Data sync” section (hiding implementation details like “PowerSync”), and extends sync settings to support multiple custom servers with discovery-based configuration and legacy preference migration.

Changes:

  • Reworks sync settings storage to support multiple custom servers, discovery fetching, server switching/removal, and migration from legacy single-server preferences.
  • Updates profile “Storage & sync” UI to a consolidated “Data sync” section including server management, status, reconnect, cache clearing, and file storage display.
  • Updates controller logic and widget tests to match the new labels and flows.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/test/providers/sync_settings_provider_test.dart Updates/extends provider tests for multi-server behavior, discovery, dedupe, removal, and legacy migration.
app/test/pages/profile_storage_sync_test.dart Adjusts profile page widget tests for “Data sync” UI and adds coverage for server management UI + file storage label.
app/lib/providers/sync_settings_provider.dart Implements multi custom-server persistence, discovery fetching, selection/removal, legacy migration, and storage/quota labeling.
app/lib/powersync/storage_sync_controller.dart Renames/reshapes labels for the new “Data sync” UI and adds file storage label support.
app/lib/pages/profile_page.dart Replaces prior sync/media UI blocks with a consolidated “Data sync” card + manage servers sheet and updated actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +140 to +142
int? get fileStorageQuotaBytes {
return activeCustomServer?.fileStorageQuotaBytes ?? officialFileStorageQuotaBytes;
}
Comment on lines +266 to 269
_saveCustomServers([server]);
if (_prefs.getString(_legacyKeyServerType) == SyncServerType.custom.name) {
_setActiveServerId(server.id);
}
Comment on lines 310 to +314
final withScheme = trimmed.contains('://') ? trimmed : 'http://$trimmed';
final uri = Uri.tryParse(withScheme);

if (uri == null || !uri.hasScheme || uri.host.isEmpty) {
throw ArgumentError.value(value, 'value', 'Expected a valid server URL');
throw SyncSettingsException('Expected a valid server URL');
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