Skip to content

refactor: navigation state - #44

Merged
SmilingPixel merged 4 commits into
mainfrom
refactor/navigation_state_0912
Sep 21, 2026
Merged

SmilingPixel merged 4 commits into
mainfrom
refactor/navigation_state_0912

Conversation

@SmilingPixel

Copy link
Copy Markdown
Owner

This pull request refactors the main application navigation and screen management in App.kt to use a more robust, route-based navigation system. It removes legacy state variables and navigation logic, replacing them with route-aware navigation and back stack handling. The changes also introduce deep linking for entry details and new entry creation, and unify navigation logic for better maintainability and clarity.

@SmilingPixel
SmilingPixel requested a balanced review from Copilot September 20, 2026 01:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several navigation paths are incomplete, including external/new-entry deep links, wide-layout actions, and draft recovery edge cases.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 Medium severity

Open (4)

var pendingDeletedEntries by remember { mutableStateOf<List<DiaryEntry>>(emptyList()) }
var pendingDeletedEntryLinks by remember { mutableStateOf<List<MomentEntryLink>>(emptyList()) }
var requestedEntryFromMoments by rememberSaveable { mutableStateOf<String?>(null) }
var restoredNewDraft by rememberSaveable { mutableStateOf(false) }
Comment on lines +542 to +545
deepLinks = listOf(
navDeepLink {
uriPattern = "markday://entry/{syncId}"
},
Comment on lines +567 to +568
composable<NewEntryRoute> { backStackEntry ->
val route = backStackEntry.toRoute<NewEntryRoute>()
Comment on lines +42 to +46
if (route is EntryDetailsRoute && entry == null) {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text("This entry is no longer available.")
}
return
@SmilingPixel
SmilingPixel merged commit 681bf21 into main Sep 21, 2026
4 checks passed
@SmilingPixel
SmilingPixel deleted the refactor/navigation_state_0912 branch September 21, 2026 02:27
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.

2 participants