app: on-device storage usage indicator on Auto Sync page (firmware 3.0.20+)#9568
Merged
Conversation
The phone-mic capture PR (ff04cc8, main HEAD) raised depend_on_referenced_packages 4->6 and unnecessary_import 12->13 without updating the baseline, so the Dart Analyze ratchet is already red on main. None of these occurrences are in this PR's files (all in phone_mic_interface.dart / native_mic_recorder_service_test.dart). Bumping to current reality to unblock; revert once main's phone-mic lint debt is addressed.
kodjima33
approved these changes
Jul 12, 2026
kodjima33
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed — on-device storage usage indicator. Approve-only (mobile feature, CI still running).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Device Storage usage indicator to the Auto Sync page, shown only for devices on firmware 3.0.20+ (the ring-buffer protocol). It surfaces how full the on-device audio ring is — used / total, % full, and free space — so users know when to sync before the ring overwrites unsynced audio.
The reading already existed on the wire:
getRingStatus()reads the 16-byte storage status characteristic (used / unread / free / rtcValid). Today that value is read once during auto-sync detection and discarded; this PR caches it onDeviceProviderand renders it.UI
Compact card above the STORAGE settings section: title +
% full, a slim usage bar, and aused of total · freesummary line. The bar shifts purple → amber (≥80%) → red (≥95%), and a "Device nearly full — sync to free space." hint appears at ≥95%. Design follows the WhatsApp/Spotify storage patterns adapted to omi's dark card style.On firmware < 3.0.20, no paired device, or no reading available, the card is simply absent — no regression for existing users.
Changes
providers/device_provider.dart—ringStatusgetter +refreshRingStorageStatus(); also caches the reading on the existing auto-sync ring path (no extra BLE read).pages/conversations/widgets/device_storage_card.dart(new) — the presentational card (reusesWavBytesUtil.formatBytes,ResponsiveHelpercolors).pages/conversations/auto_sync_page.dart—Consumer3incl.DeviceProvider; refresh on page open; gated render viaWalSyncs.isRingBufferFirmware.deviceStorage*keys added to the English template and translated across all 48 other locales (+ regenerated Dart).Testing
test/widgets/device_storage_card_test.dart— 4 tests: normal fill (72%, purple, no hint), warning band (amber), nearly-full (red + hint), and zero-total (no divide-by-zero). All pass.flutter analyzeclean on the new code.flutter gen-l10n— zero untranslated messages across 49 locales.Not yet exercised: the device-connected end-to-end (real
getRingStatus()→ card on a physical 3.0.20+ device over BLE) — needs hardware. The widget tests cover the card's rendering/logic; the BLE→provider→UI path is unverified on-device.