╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │55 errdefer tab_ids.deinit(allocator); │ │56 │ │57 const aa = session.page_arena.allocator(); │ │58 + const ref_name = std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.ref_or_oid_value)); │ │59 + const bottom_label = try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), ref_name);│ │60 + const bottom_label_width = try xitui.width.displayWidth(bottom_label); │ │61 │ │62 // the user's name (local mode has no user pages to link to) │ │63 if (!session.data.is_local) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │150 │ │151 // files tab │ │152 { │ │150 - var text_box = try wgt.TextBox(ui.Widget).init(allocator, "files", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │153 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "files", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none, .bottom_label = bottom_label });│ │154 errdefer text_box.deinit(allocator); │ │155 text_box.getFocus().focusable = true; │ │156 text_box.getFocus().kind = .{ .custom = files_link }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │159 try box.children.put(allocator, text_box.getFocus().id, .{ │ │160 .widget = .{ .text_box = text_box }, │ │161 .rect = null, │ │159 - .min_size = .{ .width = "files".len + 2, .height = null }, │ │162 + .min_size = .{ .width = @max("files".len, bottom_label_width) + 2, .height = null },│ │163 }); │ │164 } │ │165 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │166 // commits tab │ │167 { │ │165 - var text_box = try wgt.TextBox(ui.Widget).init(allocator, "commits", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │168 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "commits", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none, .bottom_label = bottom_label });│ │169 errdefer text_box.deinit(allocator); │ │170 text_box.getFocus().focusable = true; │ │171 text_box.getFocus().kind = .{ .custom = commits_link }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │174 try box.children.put(allocator, text_box.getFocus().id, .{ │ │175 .widget = .{ .text_box = text_box }, │ │176 .rect = null, │ │174 - .min_size = .{ .width = "commits".len + 2, .height = null }, │ │177 + .min_size = .{ .width = @max("commits".len, bottom_label_width) + 2, .height = null },│ │178 }); │ │179 } │ │180 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯