╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │159 for ([_]Diff{ diff, fork_diff }) |data| { │ │160 for ([_]bool{ true, false }) |terminal| { │ │161 var session = ui.Session{ .arena = &arena, .page_arena = &arena, .is_terminal = terminal }; │ │162 - session.data.current_page = if (data.route == .repo) route else ui.RoutablePage.forkDiffRoute("alice/project", id, 0, "") orelse return error.BadRoute; │ │162 + session.data.current_page = if (data.route == .repo) route else ui.RoutablePage.forkDiffRoute("alice/project", id, "", "", 0, "") orelse return error.BadRoute;│ │163 var view = try Diff.View.init(allocator, &data, &session); │ │164 defer view.deinit(allocator); │ │165 const focus = view.getFocus(); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │200 .ref_or_oid_value = oid0, │ │201 .base_oid = base_oid, │ │202 .commits = &.{ │ │203 - .{ .oid = oid0, .date = "2024-01-01", .message = "first", .timestamp = "Jan 1, 2024, 00:00:00 UTC", .window = .{} }, │ │203 + .{ .oid = oid0, .parent_oid = base_oid, .date = "2024-01-01", .message = "first", .timestamp = "Jan 1, 2024, 00:00:00 UTC" },│ │204 }, │ │205 .next_start = next_oid, │ │206 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │207 │ │208 var session = ui.Session{ .arena = &arena, .page_arena = &arena, .is_terminal = true }; │ │209 - session.data.current_page = ui.RoutablePage.repoCommitsRoute(identity, .object, oid0, 0, "", base_oid).?;│ │209 + session.data.current_page = ui.RoutablePage.repoCommitsRoute(identity, .object, oid0, base_oid).?; │ │210 │ │211 var view = try Commits.View.init(allocator, &data, &session); │ │212 defer view.deinit(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │218 }, root_focus); │ │219 │ │220 // the "next" row is the last child of the list box: the view's outer box │ │221 - // holds the sub-header then the list/diff split, whose first child is the │ │221 + // holds the sub-header then the list/detail split, whose first child is the│ │222 // list scroll. │ │223 const content = &view.box.children.values()[1].widget.box; │ │224 const lb = &content.children.values()[0].widget.scroll.child.box; │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │239 const base_oid = "3333333333333333333333333333333333333333"; │ │240 │ │241 // the route layer holds the value already url-encoded ("feature%2Ffoo"). │ │242 - const route = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", 0, "", base_oid).?; │ │242 + const route = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", base_oid).?; │ │243 const url = try route.toUrl(&arena); │ │244 try std.testing.expectEqualStrings("/repo/alice/ziglings/commits/branch:feature%2Ffoo/base:" ++ base_oid, url);│ │245 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │250 try std.testing.expectEqual(RP.RefOrOid.branch, parsed_route.ref_or_oid.?); │ │251 try std.testing.expectEqualStrings("feature%2Ffoo", parsed_route.value.slice()); │ │252 try std.testing.expectEqualStrings(base_oid, parsed_route.base_oid.slice()); │ │253 - const unfiltered = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", 0, "", "").?;│ │253 + const unfiltered = RP.repoCommitsRoute("alice/ziglings", .branch, "feature%2Ffoo", "").?; │ │254 try std.testing.expect(!RP.eql(route, unfiltered)); │ │255 } │ │256 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │272 var arena = std.heap.ArenaAllocator.init(allocator); │ │273 defer arena.deinit(); │ │274 const handle = ui.RepoHandle{ .location = .{ .repo = "" } }; │ │275 - const content = ui.RoutablePage.RepoCommitsRoute.Content{ .diff = .{} };│ │275 const branch = xit.ref.Ref{ .kind = .head, .name = "master" }; │ │276 │ │277 // one more commit than fits on the first page │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │282 previous = tip; │ │283 tip = try repo.commitAtRef(io, allocator, .{ .message = "next" }, null, branch); │ │284 } │ │286 - const first = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &tip, content, &base, "", ""); │ │285 + const first = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &tip, false, &base, "", ""); │ │286 try std.testing.expectEqual(20, first.commits.len); │ │288 - const last = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, first.next_start orelse return error.MissingNext, content, &base, "", "");│ │287 + const last = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, first.next_start orelse return error.MissingNext, false, &base, "", ""); │ │288 try std.testing.expectEqual(1, last.commits.len); │ │289 try std.testing.expectEqual(null, last.next_start); │ │290 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │291 // the base at a page boundary must not create an empty next page │ │293 - const full = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &previous, content, &base, "", "");│ │292 + const full = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, .object, &previous, false, &base, "", ""); │ │293 try std.testing.expectEqual(20, full.commits.len); │ │294 try std.testing.expectEqual(null, full.next_start); │ │295 const tag_oid = try repo.addTag(io, allocator, .{ .name = "tip", .message = "annotated" }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │300 .{ .ref = .tag, .value = "tip" }, │ │301 }; │ │302 for (sources) |source| { │ │304 - const empty = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, content, &tip, "", ""); │ │303 + const empty = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, false, &tip, "", ""); │ │304 try std.testing.expectEqual(0, empty.commits.len); │ │306 - const paged = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, content, &base, "", first.next_start orelse return error.MissingNext);│ │305 + const paged = try Commits.init(kind, opts, &arena, &repo, io, allocator, null, handle, source.ref, source.value, false, &base, "", first.next_start orelse return error.MissingNext); │ │306 try std.testing.expectEqual(1, paged.commits.len); │ │307 try std.testing.expectEqualStrings(last.commits[0].oid, paged.commits[0].oid); │ │308 try std.testing.expectEqual(source.ref, paged.ref_or_oid); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯