From 1487d65fbd6c3295aa40e893175323f293a3e8de Mon Sep 17 00:00:00 2001 From: Meghdad <61308304+MeghdadFadaee@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:35:14 +0330 Subject: [PATCH] Redesign watch navigation with a shared icon menu --- AGENTS.md | 2 +- README.md | 20 +- .../java/meghdad/remember/BackupTest.kt | 38 ++-- .../java/meghdad/remember/LaunchTest.kt | 5 +- .../meghdad/remember/MenuVisibilityTest.kt | 99 +++++++++ .../java/meghdad/remember/NavigationTest.kt | 104 +++++++++ .../java/meghdad/remember/SettingsTest.kt | 9 +- app/src/main/AndroidManifest.xml | 2 +- .../java/meghdad/remember/BackupActivity.kt | 209 ++++++++++++------ .../remember/FloatingMenuController.kt | 69 ++++++ .../java/meghdad/remember/MainActivity.kt | 155 +++++++++---- .../main/java/meghdad/remember/WatchDesign.kt | 169 ++++++++++++++ app/src/main/res/values/strings.xml | 23 ++ docs/advanced.png | Bin 0 -> 19805 bytes docs/backup-automatic.png | Bin 20898 -> 22568 bytes docs/backup-overview.png | Bin 27741 -> 22430 bytes docs/backup-server.png | Bin 8793 -> 12567 bytes docs/backup-trust.png | Bin 16253 -> 15982 bytes docs/backup.md | 4 +- docs/home-menu-visible.png | Bin 0 -> 48820 bytes docs/home.png | Bin 61681 -> 49192 bytes docs/menu.png | Bin 0 -> 61898 bytes docs/recording-limit.png | Bin 0 -> 30322 bytes docs/settings.png | Bin 47752 -> 0 bytes docs/storage.png | Bin 61227 -> 36928 bytes 25 files changed, 759 insertions(+), 149 deletions(-) create mode 100644 app/src/androidTest/java/meghdad/remember/MenuVisibilityTest.kt create mode 100644 app/src/androidTest/java/meghdad/remember/NavigationTest.kt create mode 100644 app/src/main/java/meghdad/remember/FloatingMenuController.kt create mode 100644 app/src/main/java/meghdad/remember/WatchDesign.kt create mode 100644 docs/advanced.png create mode 100644 docs/home-menu-visible.png create mode 100644 docs/menu.png create mode 100644 docs/recording-limit.png delete mode 100644 docs/settings.png diff --git a/AGENTS.md b/AGENTS.md index 82306e2..1169761 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,7 @@ The UI uses native Android views and custom drawing, without Compose or a runtim - Preserve the dark olive/lime appearance and original rounded vector numeral behind foreground controls. The numeral represents measured whole minutes, with gentle floating motion; the semicircle represents seconds within the minute. Do not add a caption beneath the numeral or labels beside the edge lines without a requested design change. - Keep the edge lines functional: microphone level/free space/playback state on the left and bookmarks/navigation/seeking on the right. Retain native button and slider alternatives, rotary access, and spoken descriptions for custom visuals. -- Settings entry labels are `Storage` and `Recording limit`. The storage chart fills most of the first viewport; readings and buttons can sit below it and remain reachable by scrolling. Keep the page visually readable at a glance. +- `MainActivity` owns one three-column icon menu; `BackupActivity.EXTRA_PAGE` opens backup sections directly. Preserve a floating, transparent, icon-only Menu shortcut (with its spoken label) over a full-screen scroll viewport. Keep the shortcut at the bottom center, hidden initially and after three idle seconds. Touch and rotary input reveal it without intercepting content gestures or opening the menu on the reveal tap. Keep it visible for touch exploration or keyboard focus, respect accessibility timeouts, and cancel idle callbacks when paused or rebuilt. Preserve consistent parent/back behavior, and the menu's scroll position. `WatchDesign.kt` supplies native controls, vector icons, cards, and static status dials without added UI dependencies. Menu entry labels include `Storage` and `Recording limit`. The storage chart fills most of the first viewport; readings and buttons can sit below it and remain reachable by scrolling. Keep the page visually readable at a glance. - Storage reads use Android's device capacity/available accounting and Remember's own app usage. `dataBytes` already includes cache: do not add `cacheBytes` again. Mark fallback app accounting as approximate. Show proportional chart slices; a small visibility marker must not inflate the app's actual share. - Preserve five-second storage refresh while that page is open, manual Refresh, and stale-result guards. Do not request usage access to other apps for this feature. - Stop decorative motion when animations are disabled, battery saver is active, the activity is backgrounded, or capture is paused. Avoid extra background polling or animation work. diff --git a/README.md b/README.md index 4482afa..227d9f7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ Screenshots from a Wear OS round-screen emulator:

Remember home screen with a floating minute number and recording controls - Settings with Storage and Recording limit sections + Home with the bottom-center menu icon revealed by touch + Single menu with a grid of icons for every section + Recording limit dial showing unlimited recording Large storage ring showing free space and total device capacity

@@ -19,6 +21,7 @@ Screenshots from a Wear OS round-screen emulator: - Recording continues in a microphone foreground service when the screen turns off or you leave the app. - Floating rounded numerals show captured minutes; the background sweep shows seconds within the current minute. - A live microphone edge meter and an interactive bookmark/playback edge. +- One shared icon grid opens every section directly, with a fixed Menu shortcut and rotary scrolling. - Device and app storage monitoring with a large proportional chart. - Optional SFTP backups to your own server, a transfer queue, scheduled uploads, and remote playback. - Optional minute limits: save and stop, or save each clip and start the next at zero. @@ -103,9 +106,11 @@ The pairing and connection ports are different. Read each from the watch's Wirel Audio is stored as mono AAC in M4A files at 44.1 kHz / 128 kbps, approximately 1 MB per minute. The large numeral shows whole minutes in the current recording or playback, and total saved minutes on the home screen. Floating motion stops while capture is paused, the app is in the background, animations are disabled, or battery saver is active. -## Settings +## Menu and preferences -Open **Settings** beside Moments. During capture, scroll below Save to reach it; recording continues while you browse. +Open the transparent four-dot **Menu** icon at the bottom center of the home or recording screen. A three-column icon grid opens Recorder, Moments, Storage, Recording limit, Backup, Server, Transfers, Server recordings, Automatic backup, and Advanced directly. Scroll or use rotary input for the lower rows. The transparent Menu shortcut floats over full-screen pages without a reserved footer bar. Touch the screen to reveal it; it hides after three seconds without interaction. Rotary input also reveals it. It stays visible for touch exploration and keyboard focus, and respects the system accessibility timeout. Returning preserves your grid position. Back returns to the grid, or to the parent page for a clip, picker, or approval step. Recording continues while you browse. + +The library uses recording cards, Backup shows a completion dial, Recording limit shows the configured minutes or an unlimited dial, and Automatic backup shows its interval and whether checks are off. Interval, retry, and timeout choices use inline selected chips. Setup forms and actions remain scrollable. ### Storage @@ -121,17 +126,18 @@ Under **At the limit**, choose **Save & stop** to end the recording, or **Save & ## Backup -Open **Settings → Backup**. Dedicated pages keep setup, transfer status, remote listening, and scheduling separate. +Open **Menu → Backup** for the dashboard. **Server**, **Transfers**, **Server recordings**, **Automatic backup**, and **Advanced** are independent tiles in the same menu.

Backup overview with backed-up and waiting counts and Back up now Server approval with Trust server and Cancel buttons, without fingerprint typing Server settings with address, port, and username fields - Automatic backup disabled, with charging and unmetered preferences enabled + Automatic backup interval dial showing that background checks are off + Inline selected chips for retry attempts and connection timeout

- **Server:** configure address, port, username, and an existing absolute backup folder. **Connect & trust** fetches the fingerprint without typing; approve the server once to remember it. Create the watch key, export or copy its public key, and authorize it on your server. Test connection before uploading. See [server setup](docs/backup.md). -- **Transfers:** shows saved recordings and their status. **Back up / Retry** queues unfinished or changed recordings. **Pause all backups** cancels transfers and turns automatic backup off. Local recordings are never deleted by backup; local deletion does not delete server copies. +- **Transfers:** shows saved recordings and their status. **Back up / Retry** queues unfinished or changed recordings. **Pause all** cancels transfers and turns automatic backup off. Local recordings are never deleted by backup; local deletion does not delete server copies. - **Server recordings:** Refresh lists completed Remember backups (up to 1,000 per folder). Select a recording to download a verified temporary copy and play it with seeking and bookmark buttons. This is cached playback, not live streaming; sufficient watch storage is required. Leaving the activity pauses playback. - **Automatic backup:** opt in to checks every hour, every six hours, or daily. Charging and unmetered connections are required by default and can be changed. Unmetered does not necessarily mean Wi-Fi. Android schedules work when conditions allow, rather than at an exact clock time; jobs persist across reboot. - **Advanced:** choose 1/3/5 retry attempts, a 20/40/60-second connection timeout, or clear the playback cache. Server identity shows the remembered fingerprint; Forget trust pauses backups and allows a verified server-key change to be approved again. @@ -154,7 +160,7 @@ Device tests require a **disposable** emulator with a microphone. They create au ./gradlew :app:connectedDebugAndroidTest ``` -Coverage includes backup destination validation, encrypted watch-key persistence, backup-page navigation, manifest safety, and (with an opt-in disposable SFTP fixture) resumable transfers, checksum verification, host-key rejection, actual scheduled uploads, scheduling constraints, and cached remote playback/background pause. Network fixture instructions are in [docs/backup.md](docs/backup.md). Coverage also includes duration formatting, limit boundaries, pause exclusion, real one-minute automatic stop and split rollover, playable file output, bookmarks, settings persistence/navigation, storage accounting, and clip rename/delete behavior. +Coverage includes backup destination validation, encrypted watch-key persistence, the shared menu, direct section navigation and back behavior, backup-page navigation, manifest safety, and (with an opt-in disposable SFTP fixture) resumable transfers, checksum verification, host-key rejection, actual scheduled uploads, scheduling constraints, and cached remote playback/background pause. Network fixture instructions are in [docs/backup.md](docs/backup.md). Coverage also includes duration formatting, limit boundaries, pause exclusion, real one-minute automatic stop and split rollover, playable file output, bookmarks, settings persistence/navigation, storage accounting, and clip rename/delete behavior. [Android checks](.github/workflows/android.yml) runs on pushes, pull requests, and manual dispatch. It verifies the wrapper, builds the debug app, runs lint and unit tests, and compiles device tests. It uploads check reports and a debug APK with a 14-day retention period. Device tests are run locally; the workflow does not claim to run them. The workflow uses pinned action commits and read-only repository permissions. Its first hosted run will happen after the repository is pushed to GitHub. diff --git a/app/src/androidTest/java/meghdad/remember/BackupTest.kt b/app/src/androidTest/java/meghdad/remember/BackupTest.kt index ffd11e4..4c8b028 100644 --- a/app/src/androidTest/java/meghdad/remember/BackupTest.kt +++ b/app/src/androidTest/java/meghdad/remember/BackupTest.kt @@ -39,18 +39,18 @@ class BackupTest { editor.commit() } @Test fun backupPagesAreReachableAndAutomaticUploadsDefaultOff() { - val activity = instrumentation.startActivitySync(Intent(context, BackupActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) - try { - instrumentation.runOnMainSync { - fun descendants(view: View): List = listOf(view) + if (view is ViewGroup) - (0 until view.childCount).flatMap { descendants(view.getChildAt(it)) } else emptyList() - fun button(label: String) = descendants(activity.window.decorView).filterIsInstance