╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────╮ │41 pub fn init( │ │42 arena: *std.heap.ArenaAllocator, │ │43 session: *ui.Session, │ │44 - event_id: *const [evt.event_id_size]u8,│ │44 + source_maybe: ?ui.RepoSource, │ │45 identity: []const u8, │ │46 tag: []const u8, │ │47 selected_id: []const u8, │ ╰───────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │59 // no filesystem (wasm) or nowhere to look: empty listing. the wasm path │ │60 // never calls init anyway — it rebuilds from the serialized snapshot. │ │61 const io = session.io orelse return empty; │ │62 - const repos_dir = session.repos_dir orelse return empty; │ │62 + const source = source_maybe orelse return empty; │ │63 │ │64 - // the repo's working copy lives at <repos_dir>/<hex event id>. │ │65 - const hex = std.fmt.bytesToHex(event_id.*, .lower); │ │66 - const repo_path = try std.fs.path.join(aa, &.{ repos_dir, &hex }); │ │64 + // issues live in the repo's own xit db, so a git-backed repo has none. │ │65 + if (source.repo_kind == .git) return empty; │ │66 │ │67 // open with the arena's backing allocator (transient; the issue strings are│ │68 // duped into the page arena so they outlive the repo handle). │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │69 const gpa = arena.child_allocator; │ │71 - var any_repo = rp.AnyRepo(.xit, .{}).open(io, gpa, .{ .path = repo_path }) catch return empty; │ │70 + var any_repo = rp.AnyRepo(.xit, .{}).open(io, gpa, .{ .path = source.path }) catch return empty;│ │71 defer any_repo.deinit(io, gpa); │ │72 │ │73 return switch (any_repo) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯