╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │669 tab.getFocus().kind = .{ .custom = try ui.inPageTabLink(session, route, selected) }; │ │670 tab_ids[i] = tab.getFocus().id; │ │671 try box.children.put(allocator, tab.getFocus().id, .{ .widget = .{ .text_box = tab }, .rect = null, .min_size = .{ .width = label.len + 2, .height = null } });│ │672 + } │ │673 + │ │674 + // pushes the sync button and status to the right │ │675 + { │ │676 + var spacer = try ui.widget.Spacer.init(allocator); │ │677 + errdefer spacer.deinit(allocator); │ │678 + try box.children.put(allocator, spacer.getFocus().id, .{ .widget = .{ .spacer = spacer }, .rect = null, .min_size = null, .flex = .grow }); │ │679 } │ │680 │ │681 var button_id: ?usize = null; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │718 │ │719 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │720 const selected = self.box.getFocus().child_id orelse return; │ │714 - const current = self.box.children.getIndex(selected) orelse return; │ │721 + const stops = [_]?usize{ self.tab_ids[0], self.tab_ids[1], self.button_id }; │ │722 const count = 2 + @as(usize, @intFromBool(self.button_id != null)); │ │723 + const current = std.mem.indexOfScalar(?usize, stops[0..count], selected) orelse return; │ │724 if (inp.moveTab(key, current, count)) |next| { │ │717 - root_focus.setFocus(self.box.children.keys()[next]); │ │725 + root_focus.setFocus(stops[next] orelse unreachable); │ │726 return; │ │727 } │ │728 switch (key) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯