╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │628 // backs each link item's `.custom` focus kind. │ │629 arena: std.heap.ArenaAllocator, │ │630 │ │631 - pub const Item = struct { text: []const u8, link: []const u8 = "" }; │ │631 + pub const Item = struct { text: []const u8, link: []const u8 = "", top_label: []const u8 = "" };│ │632 │ │633 pub fn init(allocator: std.mem.Allocator) !WordFlow { │ │634 return .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │652 self.arena.deinit(); │ │653 } │ │654 │ │655 - // the text box copies the item text; links are copied into the arena, so the │ │656 - // caller's slices needn't outlive this call. │ │655 + // the text box copies the item text; links and top labels are copied into the │ │656 + // arena, so the caller's slices needn't outlive this call. │ │657 pub fn setItems(self: *WordFlow, allocator: std.mem.Allocator, items: []const Item) !void {│ │658 for (self.text_boxes.items) |*tb| tb.deinit(allocator); │ │659 self.text_boxes.clearAndFree(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │665 self.focus.child_id = null; │ │666 │ │667 for (items) |item| { │ │668 - var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │668 + var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .top_label = .{ .text = try aa.dupe(u8, item.top_label) } });│ │669 errdefer text_box.deinit(allocator); │ │670 text_box.getFocus().mode = .all; │ │671 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1031 while (label_iter.next()) |label| { │ │1032 if (label.len == 0) continue; │ │1033 const search = try srch_thrd.withFilter(self.session.page_arena.allocator(), self.data.search orelse "", srch_thrd.label_prefix, label); │ │1034 - try items.append(allocator, .{ .text = label, .link = try listLink(self.session.page_arena, self.data.identity, entryStatus(entry), "", search) }); │ │1034 + try items.append(allocator, .{ .text = label, .link = try listLink(self.session.page_arena, self.data.identity, entryStatus(entry), "", search), .top_label = " label " });│ │1035 } │ │1036 if (items.items.len > 0) { │ │1037 var labels = try WordFlow.init(allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯