╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │1 const std = @import("std"); │ │2 const ui = @import("../ui.zig"); │ │3 const Commits = @import("../ui/Repo/Commits.zig"); │ │4 +const SubHeader = @import("../ui/Repo/SubHeader.zig"); │ │5 │ │6 // the "next" row at the bottom of the commits list must be recognized as a │ │7 // cross-page link (so a click navigates), exactly like the diff pane's "next".│ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │22 .{ .oid = oid0, .date = "2024-01-01", .message = "first", .hunks = &.{}, .window_start = 0, .has_prev = false, .has_more = false },│ │23 }, │ │24 .next_start = next_oid, │ │25 + .sub_header = try SubHeader.init(arena.allocator(), .object, oid0), │ │26 }; │ │27 │ │28 var session = ui.Session{ .arena = &arena, .page_arena = &arena, .is_terminal = true }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │37 .max_size = .{ .width = 120, .height = 60 }, │ │38 }, root_focus); │ │39 │ │38 - // the "next" row is the last child of the list box. │ │39 - const lb = &view.box.children.values()[0].widget.scroll.child.box; │ │40 + // the "next" row is the last child of the list box: the view's outer box │ │41 + // holds the sub-header then the list/diff split, whose first child is the │ │42 + // list scroll. │ │43 + const content = &view.box.children.values()[1].widget.box; │ │44 + const lb = &content.children.values()[0].widget.scroll.child.box; │ │45 const next_id = lb.children.keys()[lb.children.count() - 1]; │ │46 │ │47 const route = ui.crossPageLink(root_focus, next_id, session.data.current_page);│ ╰───────────────────────────────────────────────────────────────────────────────────────╯