╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │173 // rather than navigating. │ │174 if (header.getSelectedIndex()) |index| { │ │175 stack.getFocus().child_id = stack.children.keys()[index]; │ │176 - switch (index) { │ │176 + switch (std.meta.activeTag(stack.children.values()[index])) { │ │177 // files/commits carry this page's content route (directory / log │ │178 // page); settings/auth carry only "owner/name". │ │179 - 1 => self.session.data.current_page = .{ .repo_commits = .{ .name = self.data.commits_route_name } }, │ │180 - 2 => self.session.data.current_page = .{ .repo_settings = self.data.identity }, │ │181 - 3 => self.session.data.current_page = .{ .repo_auth = self.data.identity }, │ │179 + .repo_commits => self.session.data.current_page = .{ .repo_commits = .{ .name = self.data.commits_route_name } },│ │180 + .home_settings => self.session.data.current_page = .{ .repo_settings = self.data.identity }, │ │181 + .home_auth => self.session.data.current_page = .{ .repo_auth = self.data.identity }, │ │182 // the quit tab is tty-only and not a route, so leave current_page │ │183 // alone (nothing to mirror into the url). │ │184 - 4 => {}, │ │184 + .quit => {}, │ │185 + // the files tab (this page's directory route) │ │186 else => self.session.data.current_page = .{ .repo = self.data.route_name }, │ │187 } │ │188 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯