╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │119 return try out.toOwnedSlice(allocator); │ │120 } │ │121 │ │122 +fn cellFocusId(focus: *Focus, x: usize, y: usize) ?usize { │ │123 + var iter = focus.children.iterator(); │ │124 + while (iter.next()) |entry| { │ │125 + const child = entry.value_ptr.*; │ │126 + if (!child.focus.focusable) continue; │ │127 + const r = child.rect; │ │128 + if (x >= r.x and y >= r.y and x < r.x + r.size.width and y < r.y + r.size.height) { │ │129 + return entry.key_ptr.*; │ │130 + } │ │131 + } │ │132 + return null; │ │133 +} │ │134 + │ │135 fn appendEscapedHtml(allocator: std.mem.Allocator, out: *std.ArrayList(u8), input: []const u8) !void {│ │136 for (input) |ch| { │ │137 switch (ch) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │418 │ │419 pub fn build(self: *UserRepoView, constraint: layout.Constraint, root_focus: *Focus) !void {│ │420 self.clearGrid(); │ │421 + // refresh the repo list here (rather than in input) so it stays in │ │422 + // sync regardless of how the user selection changed — including │ │423 + // clicks that go straight through setFocus without touching input. │ │424 + // updateRepos is a no-op when the selected user hasn't changed. │ │425 + try self.updateRepos(); │ │426 try self.box.build(constraint, root_focus); │ │427 } │ │428 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────╮ │461 else => {}, │ │462 } │ │463 try child.input(key, root_focus); │ │430 - if (current_index == user_list_index) {│ │431 - try self.updateRepos(); │ │432 - } │ │464 break :blk current_index; │ │465 }; │ │466 │ ╰────────────────────────────────────────────────────────────────╯