Skip to content

Route device info sync to AutoSyncPage for new firmware#6064

Merged
mdmohsin7 merged 1 commit into
mainfrom
fix/device-info-sync-page-routing
Mar 26, 2026
Merged

Route device info sync to AutoSyncPage for new firmware#6064
mdmohsin7 merged 1 commit into
mainfrom
fix/device-info-sync-page-routing

Conversation

@mdmohsin7
Copy link
Copy Markdown
Member

Summary

  • Device info screen SD card sync button was always routing to the old SyncPage, even for devices with firmware >= 3.0.17 that support the new multi-file protocol
  • Now checks DeviceProvider.supportsMultiFileSync (firmware version based) to route to AutoSyncPage for new firmware

Test plan

  • Connect device with firmware >= 3.0.17, tap SD Card Sync in device info → should open AutoSyncPage
  • Connect device with old firmware, tap SD Card Sync → should open old SyncPage

🤖 Generated with Claude Code

@mdmohsin7 mdmohsin7 merged commit fc2e939 into main Mar 26, 2026
3 checks passed
@mdmohsin7 mdmohsin7 deleted the fix/device-info-sync-page-routing branch March 26, 2026 17:05
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 26, 2026

Greptile Summary

This PR fixes a routing bug in the device info screen where the SD Card Sync button was unconditionally opening the legacy SyncPage regardless of firmware version. The fix reads DeviceProvider.supportsMultiFileSync (set from the device's firmware revision) and routes to AutoSyncPage for firmware >= 3.0.17, matching the identical check already present in app/lib/pages/home/page.dart (line 803) and app/lib/pages/settings/device_settings.dart (line 288).\n\n- app/lib/pages/home/device.dart: added auto_sync_page.dart import and conditional page selection in the onTap for the SD Card Sync list item.\n- The rest of the diff is cosmetic reformatting (ternary indentation, line-break placement) with no functional impact.\n- supportsMultiFileSync is correctly persisted in SharedPreferences and initialised from it, so the routing decision is reliable even before a new connection is established.

Confidence Score: 5/5

Safe to merge — one-line logic change that mirrors existing patterns already in production elsewhere in the codebase.

The change is small, targeted, and exactly matches the routing logic already used in page.dart and device_settings.dart. AutoSyncPage has a const constructor so const AutoSyncPage() is valid. supportsMultiFileSync is persisted in SharedPreferences, so it is available before the first post-connection callback fires. No new state, no new async paths, no risk of regressions to the old-firmware path.

No files require special attention.

Important Files Changed

Filename Overview
app/lib/pages/home/device.dart Adds AutoSyncPage import and correctly routes the SD Card Sync button to AutoSyncPage for firmware >= 3.0.17 via DeviceProvider.supportsMultiFileSync; also includes minor formatting-only reformats of nearby ternary/assignment expressions.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User taps SD Card Sync] --> B{provider.supportsMultiFileSync?}
    B -- "true\n(firmware >= 3.0.17)" --> C[Navigate to AutoSyncPage\nmulti-file protocol]
    B -- "false\n(older firmware)" --> D[Navigate to SyncPage\nlegacy protocol]
    style C fill:#2d6a2d,color:#fff
    style D fill:#5a3a1a,color:#fff
Loading

Reviews (1): Last reviewed commit: "Route device info SD card sync to AutoSy..." | Re-trigger Greptile

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…e#6064)

## Summary
- Device info screen SD card sync button was always routing to the old
`SyncPage`, even for devices with firmware >= 3.0.17 that support the
new multi-file protocol
- Now checks `DeviceProvider.supportsMultiFileSync` (firmware version
based) to route to `AutoSyncPage` for new firmware

## Test plan
- [ ] Connect device with firmware >= 3.0.17, tap SD Card Sync in device
info → should open AutoSyncPage
- [ ] Connect device with old firmware, tap SD Card Sync → should open
old SyncPage

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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