╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │1001 try inputKey(allocator, &nav.root, key, session); │ │1002 } │ │1003 │ │1004 - // local run has no repo to persist to, so just apply in-memory │ │1005 - session.applyPending(); │ │1004 + // persist queued actions when there's a repo; local mode has none, │ │1005 + // so just apply in-memory │ │1006 + if (repo_maybe) |repo| { │ │1007 + try session.applyAndWritePending(io, allocator, repo); │ │1008 + // reload so the next navigation builds its page from the current moment│ │1009 + try session.reloadMoment(allocator, repo); │ │1010 + } else { │ │1011 + session.applyPending(); │ │1012 + } │ │1013 │ │1007 - // pick up data written by other handles so the next navigation │ │1008 - // builds its page from a current moment (local mode has no admin repo) │ │1009 - if (repo_maybe) |repo| try session.reloadMoment(repo); │ │1010 - │ │1014 // reconcile navigation: forward to a new page, or back on escape. │ │1015 try nav.sync(allocator, session); │ │1016 │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯