╭ changed ──────╮ │src/ui/User.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │169 if (header.getSelectedIndex()) |index| { │ │170 stack.getFocus().child_id = stack.children.keys()[index]; │ │171 const name = self.data.route_name; │ │172 - switch (index) { │ │173 - 1 => self.session.data.current_page = .{ .user_settings = name }, │ │174 - 2 => self.session.data.current_page = .{ .user_auth = name }, │ │172 + switch (std.meta.activeTag(stack.children.values()[index])) { │ │173 + .home_settings => self.session.data.current_page = .{ .user_settings = name },│ │174 + .home_auth => self.session.data.current_page = .{ .user_auth = name }, │ │175 // the quit tab is tty-only and not a route, so leave current_page │ │176 // alone (nothing to mirror into the url). │ │177 - 3 => {}, │ │177 + .quit => {}, │ │178 + // the repos list (the default tab) │ │179 else => self.session.data.current_page = .{ .user = name }, │ │180 } │ │181 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯