╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────╮ │11 const diff3 = @import("../../diff3.zig"); │ │12 const Comment = @import("Comment.zig"); │ │13 const Attachment = @import("Attachment.zig");│ │14 -const Threads = @import("Threads.zig"); │ │14 +const thread = ui.widget.thread; │ │15 const fork = @import("../../fork.zig"); │ │16 const pch = @import("../../patch.zig"); │ │17 │ ╰─────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │345 if (try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Patch.tag_status_to_id_set_key))) |tag_to_patches_cursor| { │ │346 const tag_to_patches = try DB.SortedMap(.read_only).init(tag_to_patches_cursor); │ │347 const decoded = std.Uri.percentDecodeInPlace(try aa.dupe(u8, empty.tag)); │ │348 - open_set = try Threads.tagStatusSet(Self, DB, tag_to_patches, decoded, .open); │ │349 - closed_set = try Threads.tagStatusSet(Self, DB, tag_to_patches, decoded, .closed); │ │350 - merged_set = try Threads.tagStatusSet(Self, DB, tag_to_patches, decoded, .merged); │ │348 + open_set = try thread.tagStatusSet(Self, DB, tag_to_patches, decoded, .open); │ │349 + closed_set = try thread.tagStatusSet(Self, DB, tag_to_patches, decoded, .closed); │ │350 + merged_set = try thread.tagStatusSet(Self, DB, tag_to_patches, decoded, .merged); │ │351 } │ │352 } else if (try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Patch.status_to_id_set_key))) |status_to_patches_cursor| {│ │353 const status_to_patches = try DB.SortedMap(.read_only).init(status_to_patches_cursor); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │354 - open_set = try Threads.statusSet(Self, DB, status_to_patches, .open); │ │355 - closed_set = try Threads.statusSet(Self, DB, status_to_patches, .closed); │ │356 - merged_set = try Threads.statusSet(Self, DB, status_to_patches, .merged); │ │354 + open_set = try thread.statusSet(Self, DB, status_to_patches, .open); │ │355 + closed_set = try thread.statusSet(Self, DB, status_to_patches, .closed); │ │356 + merged_set = try thread.statusSet(Self, DB, status_to_patches, .merged); │ │357 } else if (strict) return error.NotFound; │ │358 │ │359 const event_id_to_patch_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Patch.record_map_key)) orelse {│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │422 if (conflicts_map) |map| { │ │423 if (try map.getCursor(order_key)) |conflict_cursor| { │ │424 const conflict_entry = try DB.HashMap(.read_only).init(conflict_cursor); │ │425 - conflict_data = try Threads.readConflict(Self, repo_kind, repo_opts, arena, repo, io, admin_moment, haxy_moment, &id_bytes, patch_event, conflict_entry);│ │425 + conflict_data = try thread.readConflict(Self, repo_kind, repo_opts, arena, repo, io, admin_moment, haxy_moment, &id_bytes, patch_event, conflict_entry); │ │426 resolved_view = .resolve; │ │427 } │ │428 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │431 } │ │432 } │ │433 const thread_comments_start = if (empty.comment_id.len == 0) comments_start else 0; │ │434 - const open_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start); │ │435 - const closed_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start); │ │436 - const merged_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, merged_set, merged_root, conflict_set, empty.selected_id, thread_comments_start); │ │437 - const conflicts_window = try Threads.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start);│ │434 + const open_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start); │ │435 + const closed_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start); │ │436 + const merged_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, merged_set, merged_root, conflict_set, empty.selected_id, thread_comments_start); │ │437 + const conflicts_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start); │ │438 if (view == .conflicts and conflicts_window.count > 0) resolved_view = .conflicts; │ │439 │ │440 const comment_page = if (empty.comment_id.len == 0) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │442 else │ │443 try Comment.init(repo_opts.hash, arena, admin_moment, haxy_moment, empty.selected_id, empty.comment_id, comments_start);│ │444 │ │445 - const tags = try Threads.loadTags(Self, repo_opts.hash, arena, haxy_moment); │ │445 + const tags = try thread.loadTags(Self, repo_opts.hash, arena, haxy_moment); │ │446 │ │447 return .{ │ │448 .identity = empty.identity, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │563 }; │ │564 } │ │565 │ │566 -pub const View = Threads.View(.patch, Self); │ │566 +pub const View = thread.View(.patch, Self); │ │567 │ │568 -pub const Header = Threads.Header; │ │568 +pub const Header = thread.Header; │ │569 │ │570 pub fn appendDraftDetails(self: *const Self, allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), session: *ui.Session, entry: Entry) !void {│ │571 const aa = session.page_arena.allocator(); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │572 - var fields: [2]ui.CopyableText.Choice = undefined; │ │572 + var fields: [2]ui.widget.CopyableText.Choice = undefined; │ │573 var field_count: usize = 0; │ │574 │ │575 if (entry.target_branch.len != 0) if (session.data.git_ssh_port) |port| {│ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │580 try std.fmt.allocPrint(aa, "git clone {s}", .{url}) │ │581 else │ │582 try std.fmt.allocPrint(aa, "git clone {s} {s}", .{ url, clone_name });│ │583 - const choices: [2]ui.CopyableText.Choice = .{ │ │583 + const choices: [2]ui.widget.CopyableText.Choice = .{ │ │584 .{ │ │585 .selector = "push", │ │586 .text = push_command, │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │594 .label = " clone this patch ", │ │595 }, │ │596 }; │ │597 - var copyable_text = try ui.CopyableText.View.init(allocator, session, &choices); │ │597 + var copyable_text = try ui.widget.CopyableText.init(allocator, session, &choices); │ │598 errdefer copyable_text.deinit(allocator); │ │599 try box.children.put(allocator, copyable_text.getFocus().id, .{ .widget = .{ .copyable_text = copyable_text }, .rect = null, .min_size = null });│ │600 try addDetailGap(allocator, box); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯