╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────╮ │690 repo: *rp.Repo(.xit, evt.admin_repo_opts), │ │691 ) !void { │ │692 defer self.pending.clearRetainingCapacity();│ │693 - var wrote = false; │ │693 for (self.pending.items) |action| { │ │694 self.apply(action); │ │695 switch (action) { │ ╰─────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │696 .toggle_ansi => if (self.data.user_id) |user_id| { │ │697 try evt.User.toggleAnsi(evt.admin_repo_opts, io, allocator, repo, user_id);│ │699 - wrote = true; │ │698 }, │ │699 } │ │700 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │703 - // reload the moment so a later read off it sees what we just applied │ │704 - if (wrote) self.haxy_moment = try evt.currentMoment(evt.admin_repo_opts, repo);│ │701 + } │ │702 + │ │703 + // reload the moment from the admin repo │ │704 + pub fn reloadMoment(self: *Self, repo: *rp.Repo(.xit, evt.admin_repo_opts)) !void {│ │705 + self.haxy_moment = try evt.currentMoment(evt.admin_repo_opts, repo); │ │706 } │ │707 │ │708 // request a forward navigation to `route`; the host consumes next_page │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │712 } │ │713 }; │ │714 │ │714 -pub fn run(io: std.Io, allocator: std.mem.Allocator, session: *Session) !void { │ │715 +pub fn run(io: std.Io, allocator: std.mem.Allocator, session: *Session, repo: *rp.Repo(.xit, evt.admin_repo_opts)) !void {│ │716 var nav = try Nav.init(allocator, session); │ │717 defer nav.deinit(allocator); │ │718 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │750 // local run has no repo to persist to, so just apply in-memory │ │751 session.applyPending(); │ │752 │ │753 + // pick up data written by other handles so the next navigation │ │754 + // builds its page from a current moment │ │755 + try session.reloadMoment(repo); │ │756 + │ │757 // reconcile navigation: forward to a new page, or back on escape.│ │758 try nav.sync(allocator, session); │ │759 │ ╰───────────────────────────────────────────────────────────────────────────────╯