Repository navigation
Conversation
…gation_plugin_connection # Conflicts: # app/src/main/java/com/sameerasw/essentials/data/repository/SettingsRepository.kt # app/src/main/java/com/sameerasw/essentials/domain/registry/FeatureRegistry.kt # app/src/main/java/com/sameerasw/essentials/island/service/IslandCoordinator.kt # app/src/main/java/com/sameerasw/essentials/ui/features/display/IslandSettingsUI.kt # app/src/main/java/com/sameerasw/essentials/viewmodels/MainViewModel.kt # app/src/main/res/values/strings.xml
sameerasw
requested changes
Oct 15, 2026
sameerasw
left a comment
Owner
There was a problem hiding this comment.
Should fix
-
A single unrelated action can become the "Exit" button.
NavigationParser.exitActionIndexreturns 0 whenever the notification has exactly one action, whatever its label, andexitAction()in the test asserts that (listOf("Something")→ 0).- An app whose only action is "Mute", "Share ETA" or "Pause" would show it as "Exit" in the expanded island and run it when tapped.
- Please match by label only, or at least drop the
titles.size == 1fallback. The// ponytail:comment above the function also doesn't describe what the code does.
-
The PR description doesn't match the defaults.
- The description says a new instruction expands the island by default and "Line peek after expanding" is off by default.
- The code defaults to Line peek (
getIslandNavigationOnNew()falls back toISLAND_NAVIGATION_ON_NEW_PEEK) and "Line peek after expanding" to on (getBoolean(KEY_ISLAND_NAVIGATION_PEEK_AFTER_EXPAND, true)). - Please fix whichever is wrong. Users will go by the description.
-
Distance parsing only knows Latin units.
isDistanceandmetersmatchkm|m|mi|ft|yd. In Russian, Chinese or Japanese locales Maps writes units like "м" or "米".- Those distances aren't recognised, so the title and text can be swapped and
meters()returns null. That silently disables "Expand before a turn" there, with nothing telling the user why. - If supporting more units is out of scope, please say in the description that this is English-unit only. Otherwise add the common ones and a test.
Minor
- Refresh coupling.
- The navigation update runs inside the progress refresh. If
extractLatestProgressNotificationthrows, the earlyreturn@executeskips the navigation update as well. - While a trip is active, every 250 ms refresh also re-extracts and re-decodes the large icon bitmap. Reusing the previous bitmap when the notification key and icon are unchanged would avoid that.
- The navigation update runs inside the progress refresh. If
- Settings sheet.
IslandNavigationOptionsBottomSheetcreates its ownSettingsRepositoryand keeps local state, where the other island sheets go through the ViewModel.MainViewModelhasisIslandShowNavigationbut no case for it in the settings listener, so a change made elsewhere won't update it.
- Broad detection.
isNavigationNotificationmatches any ongoing notification whose channel id merely contains "navigation". That method already exists, but this PR means those notifications now appear on the island.- Consider limiting the island item to packages that have shown navigation-style content, or at least noting the limitation.
- Comments. There are several explanatory comments, for example "Navigation shares the progress refresh pass", "The island's navigation item replaces the progress ring for these", "Distance jumped back up: a new maneuver with the same text…" and the comments on the settings getters. Please drop them, per the repo's comment rules.
- Unrelated change. The diff removes two unused imports in
IslandSettingsUI(IslandBorderOutlineOptionsBottomSheetandIslandPulseShadowOptionsBottomSheet). That's harmless, but it's separate from the feature. - Tests. There are none for
NavigationPlugin's expand and peek decisions, which hold most of the logic. A small test around theapproaching,announceandsurfacedhandling would catch regressions.
sameerasw
marked this pull request as draft
October 15, 2026 12:06
isaacsa51
marked this pull request as ready for review
October 15, 2026 18:45
Contributor
Author
|
@sameerasw fixed all comments and seems like the branch doesn't have conflicts so it's ready |
9 of 15 tasks
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.
Description
Enable navigation popup on island when any type of navigation.
Navigation only accepts ongoing notifications that pass isNavigationNotification. That means the channel ID is in the navigation channel list or contains "navigation", or the category contains "navigation".
Maps' Live Update has a progress bar, so it would also qualify for the progress ring. While the island and its Navigation item are on, extractLatestProgressNotification skips navigation notifications, so the progress plugin doesn't show it a second time.
Inside the changes a couple of settings can be enabled inside the toggle:

This implementation was only tested on a real device and on an emulator with no issues, Waze doesn't create any notification with nav info apart of the only persistent notification to keep the app alive.
Type of change
UI changes
Screen-20261012-181522-1791853972543.Mp4.2.mp4
Screen_recording_20261013_115734.webm
Checklist
Before submitting, please make sure:
develop(notmain)../gradlew assembleDebug../gradlew testDebugUnitTest.SettingsRepositoryfor keys and getter/setter methods.FeatureRegistry.ktfor search indexing.ui/core/(RoundedCardContainer,IconToggleItem, etc.).res/values/strings.xmland drawables use rounded variants (R.drawable.rounded_*).