╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │935 } │ │936 │ │937 for (child.widget.getFocus().children.keys(), child.widget.getFocus().children.values()) |id, focus_child| {│ │938 - if (!focus_child.focus.focusable) continue; │ │938 + if (focus_child.focus.mode != .all) continue; │ │939 const rect: layout.IRect = .{ │ │940 .x = child_rect.x + @as(isize, @intCast(focus_child.rect.x)), │ │941 .y = child_rect.y + @as(isize, @intCast(focus_child.rect.y)), │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │982 │ │983 fn childFocusable(self: *This, child_index: usize) bool { │ │984 const focus = self.inner().children.values()[child_index].widget.getFocus();│ │985 - if (focus.focusable) return true; │ │985 + if (focus.mode == .all) return true; │ │986 for (focus.children.values()) |item| { │ │987 - if (item.focus.focusable) return true; │ │987 + if (item.focus.mode == .all) return true; │ │988 } │ │989 return false; │ │990 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1587 { │ │1588 var frame = try wgt.Box(Widget).init(allocator, .{ .border_style = .hidden, .direction = .vert });│ │1589 errdefer frame.deinit(allocator); │ │1590 + frame.getFocus().mode = .mouse; │ │1591 var detail_view = try DetailType.init(allocator, data, session, null, .{}); │ │1592 errdefer detail_view.deinit(allocator); │ │1593 frame.getFocus().child_id = detail_view.getFocus().id; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1613 { │ │1614 var title = try wgt.TextInput.init(allocator, .{ .label = " title ", .name = "title", .visible_width = null, .rounded_corners = true, .render_content = session.is_terminal });│ │1615 errdefer title.deinit(allocator); │ │1615 - title.getFocus().focusable = true; │ │1616 + title.getFocus().mode = .all; │ │1617 if (saved_fields) |saved| │ │1618 try title.setContent(allocator, saved.title) │ │1619 else if (record) |r| │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1624 { │ │1625 var tags = try wgt.TextInput.init(allocator, .{ .label = " tags (separate with spaces) ", .name = "tags", .visible_width = null, .rounded_corners = true, .render_content = session.is_terminal });│ │1626 errdefer tags.deinit(allocator); │ │1626 - tags.getFocus().focusable = true; │ │1627 + tags.getFocus().mode = .all; │ │1628 if (saved_fields) |saved| │ │1629 try tags.setContent(allocator, saved.tags) │ │1630 else if (record) |r| │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1635 { │ │1636 var description = try wgt.TextInput.init(allocator, .{ .label = " description ", .name = "description", .visible_width = null, .rounded_corners = true, .render_content = session.is_terminal, .multiline = true, .scroll = .{ .fill = true } });│ │1637 errdefer description.deinit(allocator); │ │1637 - description.getFocus().focusable = true; │ │1638 + description.getFocus().mode = .all; │ │1639 if (saved_fields) |saved| │ │1640 try description.setContent(allocator, saved.description) │ │1641 else if (record) |r| │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1646 if (supports_drafts) { │ │1647 var target = try wgt.TextInput.init(allocator, .{ .label = " target branch ", .name = "target_branch", .visible_width = null, .rounded_corners = true, .render_content = session.is_terminal });│ │1648 errdefer target.deinit(allocator); │ │1648 - target.getFocus().focusable = true; │ │1649 + target.getFocus().mode = .all; │ │1650 const content = if (saved_fields) |saved| saved.target_branch else if (record) |r| r.event.target_branch else data.default_target_branch; │ │1651 try target.setContent(allocator, content); │ │1652 try box.children.put(allocator, target.getFocus().id, .{ .widget = .{ .text_input = target }, .rect = null, .min_size = .{ .width = null, .height = 3 } }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1683 .scroll = .{ .fill = true }, │ │1684 }); │ │1685 errdefer body.deinit(allocator); │ │1685 - body.getFocus().focusable = true; │ │1686 + body.getFocus().mode = .all; │ │1687 if (initial_body) |text| try body.setContent(allocator, text); │ │1688 try box.children.put(allocator, body.getFocus().id, .{ .widget = .{ .text_input = body }, .rect = null, .min_size = null });│ │1689 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1710 for (buttons, 0..) |options, index| { │ │1711 var button = try wgt.TextBox.init(allocator, options.label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │1712 errdefer button.deinit(allocator); │ │1712 - button.getFocus().focusable = true; │ │1713 + button.getFocus().mode = .all; │ │1714 button.getFocus().kind = .{ .custom = options.action }; │ │1715 try box.children.put(allocator, button.getFocus().id, .{ .widget = .{ .text_box = button }, .rect = null, .min_size = null }); │ │1716 if (index == 0) box.getFocus().child_id = button.getFocus().id; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1782 .same => |text| { │ │1783 var tb = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .word });│ │1784 errdefer tb.deinit(allocator); │ │1784 - tb.getFocus().focusable = true; │ │1785 + tb.getFocus().mode = .all; │ │1786 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │1787 }, │ │1788 // an auto-resolved chunk: only one side changed it, so its │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯