╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │119 const header = &self.box.children.values()[header_index].widget.home_header; │ │120 const stack = &self.box.children.values()[stack_index].widget.stack; │ │121 │ │122 - // each header tab maps 1:1 to a stack child by position │ │122 + // each header tab maps 1:1 to a stack child by position; mirror the │ │123 + // selected child's page into the url, keyed by its kind │ │124 if (header.getSelectedIndex()) |index| { │ │125 stack.getFocus().child_id = stack.children.keys()[index]; │ │125 - switch (index) { │ │126 + switch (std.meta.activeTag(stack.children.values()[index])) { │ │127 // mirror each list tab's built pagination window so the url stays │ │128 // consistent with what's shown (and so a build doesn't reset it). │ │128 - 0 => self.session.data.current_page = .{ .home_users = self.data.users.after }, │ │129 - 1 => self.session.data.current_page = .{ .home_repos = self.data.repos.after }, │ │130 - 2 => self.session.data.current_page = .home_settings, │ │131 - 3 => self.session.data.current_page = .home_auth, │ │129 + .home_users => self.session.data.current_page = .{ .home_users = self.data.users.after },│ │130 + .home_repos => self.session.data.current_page = .{ .home_repos = self.data.repos.after },│ │131 + .home_settings => self.session.data.current_page = .home_settings, │ │132 + .home_auth => self.session.data.current_page = .home_auth, │ │133 // the quit tab is tty-only and not a route, so leave current_page │ │134 // alone (nothing to mirror into the url). │ │135 else => {}, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯