╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │1385 - return std.fmt.allocPrint(arena.allocator(), repo_segment ++ "{s}", .{identity});│ │1367 + return std.fmt.allocPrint(arena.allocator(), "/{s}", .{identity}); │ │1368 } │ │1369 │ │1370 // true when the page builds at its content height on the web, letting the │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │1377 }; │ │1378 } │ │1379 │ │1398 - // the "owner/name" a repo route carries, null for any other route. the│ │1380 + // the "owner:name" a repo route carries, null for any other route. the│ │1381 // result borrows the route, so it must outlive the slice. │ │1382 pub fn repoIdentity(self: *const RoutablePage) ?[]const u8 { │ │1383 return switch (self.*) { │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │53 if (!std.mem.eql(u8, target_record.event.name, identity.name)) return error.NotFound; │ │54 │ │55 const aa = arena.allocator(); │ │56 - const target_identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ owner.event.name, target_record.event.name });│ │56 + const target_identity = try std.fmt.allocPrint(aa, "{s}:{s}", .{ owner.event.name, target_record.event.name });│ │57 const id_hex = std.fmt.bytesToHex(id, .lower); │ │58 // the fork's viewer is the target repo's │ │59 const handle = ui.RepoHandle{ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │211 errdefer commits.deinit(allocator); │ │212 try stack.children.put(allocator, commits.getFocus().id, .{ .repo_commits = commits }); │ │213 } │ │214 - const identity = try std.fmt.allocPrint(session.page_arena.allocator(), "{s}/{s}", .{ data.header.forker_name, data.header.name });│ │214 + const identity = try std.fmt.allocPrint(session.page_arena.allocator(), "{s}:{s}", .{ data.header.forker_name, data.header.name });│ │215 if (session.data.user_id != null) { │ │216 const route = ui.RoutablePage.forkRepoNewRoute(identity, data.header.id) orelse return error.RouteTooLong; │ │217 var new_repo = try ui.NewRepo.View.init(allocator, session, route); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │60 errdefer tab_ids.deinit(allocator); │ │61 │ │62 const aa = session.page_arena.allocator(); │ │63 - const fork_identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.forker_name, data.name }); │ │63 + const fork_identity = try std.fmt.allocPrint(aa, "{s}:{s}", .{ data.forker_name, data.name }); │ │64 const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, commits_tab_label ++ " ({d})", .{count}) else commits_tab_label;│ │65 var first_group_width = try data.title.width(); │ │66 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │73 var forker = try wgt.TextBox.init(allocator, text, .{ .border_style = .hidden, .wrap_kind = .none }); │ │74 errdefer forker.deinit(allocator); │ │75 forker.getFocus().mode = .all; │ │76 - forker.getFocus().kind = .{ .custom = try std.fmt.allocPrint(aa, "a:/user/{s}", .{data.forker_name}) }; │ │76 + forker.getFocus().kind = .{ .custom = try std.fmt.allocPrint(aa, "a:/{s}", .{data.forker_name}) }; │ │77 first_group_width += try xitui.width.displayWidth(text) + 2; │ │78 try title_box.children.put(allocator, forker.getFocus().id, .{ .widget = .{ .text_box = forker }, .rect = null, .min_size = null });│ │79 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Home/Users.zig│ ╰─────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │112 } │ │113 for (data.users) |user| │ │114 // clicking a user opens their page; the "a:" prefix makes the web │ │115 - // renderer emit an <a href="/user/foo"> anchor. │ │115 + // renderer emit an <a href="/foo"> anchor. │ │116 try items.append(aa, .{ │ │117 .text = user.name, │ │118 - .link = try std.fmt.allocPrint(aa, "a:/user/{s}", .{user.name}),│ │118 + .link = try std.fmt.allocPrint(aa, "a:/{s}", .{user.name}), │ │119 }); │ │120 if (data.next_start) |next_start| { │ │121 var next = route; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/ui/NewRepo.zig│ ╰──────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │158 name_input.clear(allocator); │ │159 description_input.clear(allocator); │ │160 │ │161 - const identity = try std.fmt.allocPrint(self.session.page_arena.allocator(), "{s}/{s}", .{ user.event.name, name });│ │161 + const identity = try std.fmt.allocPrint(self.session.page_arena.allocator(), "{s}:{s}", .{ user.event.name, name });│ │162 try self.session.navigate(ui.RoutablePage.repoFilesRoute(identity, null, "", "", 0) orelse return); │ │163 } │ │164 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │56 const DB = evt.AdminDB; │ │57 const hash_kind = evt.admin_repo_opts.hash; │ │58 │ │59 - // every repo route stores its identity as "owner/name" (or elides it in local mode) │ │59 + // every repo route stores its identity as "owner:name" (or elides it in local mode) │ │60 const name_str = route.repoIdentity() orelse return error.UnexpectedRoute; │ │61 const repo_identity = ui.RoutablePage.RepoIdentity.parse(name_str) orelse return error.NotFound;│ │62 // files, commits and diff share the requested ref, or the default branch. │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │468 // the header shows new repo with a login, and new user without one │ │469 // and user only outside local mode, so keep the stack's children │ │470 // 1:1 with the tabs by skipping the same views. │ │471 - const identity = try std.fmt.allocPrint(session.page_arena.allocator(), "{s}/{s}", .{ data.header.owner_name, data.header.name }); │ │471 + const identity = try std.fmt.allocPrint(session.page_arena.allocator(), "{s}:{s}", .{ data.header.owner_name, data.header.name }); │ │472 if (session.data.user_id != null) { │ │473 const route = ui.RoutablePage{ .repo_repo_new = ui.RoutablePage.Array(ui.RoutablePage.repo_route_max_len).from(identity) orelse return error.RouteTooLong };│ │474 var new_repo_view = try ui.NewRepo.View.init(allocator, session, route); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯