╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │90 // of the repo title. │ │91 const owner = (try evt.User.readById(DB, hash_kind, haxy_moment, arena, repo.user_id)) orelse return error.NotFound; │ │92 │ │93 - // build commits first so its resolved ref (the default branch when the route │ │94 - // named none) can canonicalize the commits-tab mirror url. │ │93 + // build files and commits first so their resolved refs (the default branch │ │94 + // when the route named none) can canonicalize each tab's mirror url to the │ │95 + // explicit ref it's viewing rather than leaving it bare. │ │96 + const files = try Files.init(arena, session, &found.event_id, rf.identity, files_ref_kind, files_ref_value, files_dir); │ │97 const commits = try Commits.init(arena, session, &found.event_id, rf.identity, commits_ref.ref_or_oid, commits_ref.value, commits_after);│ │98 │ │99 // each tab mirror carries this page's route for that tab; tabs not targeted │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │100 // by the incoming route fall back to their root/first-page route. │ │ 99 - const route_name = (ui.RoutablePage.repoFilesRoute(rf.identity, files_ref_kind, files_ref_value, files_dir) orelse return error.NotFound).repo; │ │101 + const route_name = (ui.RoutablePage.repoFilesRoute(rf.identity, files.ref_or_oid, files.ref_or_oid_value, files.dir) orelse return error.NotFound).repo; │ │102 const commits_route_name = (ui.RoutablePage.repoCommitsRoute(rf.identity, commits.ref_or_oid, commits.ref_or_oid_value, commits_after) orelse return error.NotFound).repo_commits.name;│ │103 │ │104 return .{ │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │105 .header = try Header.init(arena, repo.name, owner.name), │ │106 .repo = repo, │ │105 - // the repo's event id is the on-disk repo directory name │ │106 - .files = try Files.init(arena, session, &found.event_id, rf.identity, files_ref_kind, files_ref_value, files_dir),│ │107 + .files = files, │ │108 .commits = commits, │ │109 .refs = try Refs.init(arena, session, &found.event_id, rf.identity, refs_kind, refs_after), │ │110 .settings = Settings.init(), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯