The Settings tab pins itself to whichever settings page you were on, and no settings page has a back arrow #61
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#61
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported by Kaspa: 'on the settings page, if you go to app lock you can't unnavigate out of it.' Two causes, both real.
What is true now.
app/src/main/kotlin/dev/privacyllc/period/navigation/PeriodApp.kt:105-111navigates tabs withpopUpTo(findStartDestination){ saveState = true }+restoreState = true. From[today, settings, settings/lock], tapping the Settings tab saves the popped[settings, settings/lock]and immediately restores it — you land back on App lock, and the saved stack survives visiting other tabs, so the Settings tab is pinned to App lock for the rest of the process. The KDoc at:142-146asserts the opposite. The selected-tab check at:102(hierarchy.any { it.route == destination.route }) also means NO tab renders as selected while on any settings child, so the user taps an unselected Settings tab and lands back where she was.Secondly, a repo-wide grep for
TopAppBar,navigationIcon,ArrowBack,BackHandler,popBackStackandnavigateUpoverapp/,core/anddomain/returns ZERO hits. No screen has a back arrow;navControlleris never passed to a screen; sub-pages rely entirely on the system gesture.LockSettingsScreen.kt:106-117is a full-bleed Surface with a plainText("App lock")that looks like a top bar and is not one, and after setting a PIN the only button on screen — 'Done' (:185-188) — clears a message and navigates nowhere.What it costs. The scariest screen in the app is the one that appears to trap you. It applies equally to
settings/notificationsandsettings/export; App lock is simply where it gets reported.What to do. One shared
SettingsSubpage(title, onBack, content)composable inapp/.../feature/common/(besideConfidence.kt, the existing shared-composable precedent) wrapping an M3TopAppBarwith a back arrow; all three sub-pages takeonNavigateBackand use it. Make Settings a nested graph so its children sit in the tab's hierarchy, pop to the graph root when the already-selected tab is re-tapped, and passsaveState = !inSettingswhen leaving so the Settings stack is never saved and never restored.Traps. A nested graph ALONE does not fix it — the tab tap still saves and restores the graph's stack. Dropping
restoreStatealone is also not enough: the stack is still saved on leaving, so nav-scoped ViewModels are retained per exit and the tab still reads as unselected on children. Today, Calendar and Insights must keep their current save/restore behaviour. Screens with internal steps need mode-aware back (separate issue).ExportHost()is currently emitted as a sibling BEFORE the Scaffold inside a Box, so it is drawn underneath an opaque Scaffold container and has almost certainly never been visible — moving it toScaffold(topBar = ...)both reveals it and keeps it clear of the new bars.Verify:
SettingsSubpageTest(Back icon displayed with contentDescription, tapping it invokes onBack once) and a device check — Calendar → Settings lands on the settings tree, and re-tapping Settings from App lock returns to the tree.