╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │570 break :blk try ui.Session.init(&session_arena, &repo, .{ .user_id = &admin_user_id });│ │571 }; │ │572 session.is_terminal = true; │ │573 - // try uses the default serve options below, so the footer's url points at │ │574 - // the default web UI port. │ │575 - session.web_port = try (srv.Options{}).wuiPort(); │ │573 │ │574 // start the server │ │575 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │614 io: std.Io, │ │615 key_path: []const u8, │ │616 │ │620 - pub fn run(self: @This()) !void { │ │617 + pub fn run(self: @This(), web_port: u16, ssh_port: u16) !void {│ │618 + _ = web_port; │ │619 std.debug.print( │ │620 \\ │ │621 \\connect to the TUI with: │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │624 - \\ ssh -p 8022 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null localhost│ │622 + \\ ssh -p {d} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null localhost │ │623 \\ │ │624 \\create a git repo and push over SSH: │ │625 \\ mkdir -p temp-try/client/test │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │628 \\ echo "hello" > hello.txt │ │629 \\ git add hello.txt │ │630 \\ git commit -m "let there be light" │ │633 - \\ GIT_SSH_COMMAND='ssh -p 8022 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -i {s}' git push localhost:admin/test HEAD:master│ │631 + \\ GIT_SSH_COMMAND='ssh -p {d} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -i {s}' git push localhost:admin/test HEAD:master │ │632 \\ │ │633 \\to quit, press enter. │ │634 \\ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │637 - , .{self.key_path}); │ │635 + , .{ ssh_port, ssh_port, self.key_path }); │ │636 // portable stdin read via std.Io — equivalent to the │ │637 // std.posix.read(STDIN_FILENO, ...) that doesn't compile│ │638 // on windows. │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │655 session: *ui.Session, │ │656 repo: *Repo, │ │657 │ │660 - pub fn run(self: @This()) !void { │ │661 - // launch the TUI │ │658 + pub fn run(self: @This(), web_port: u16, ssh_port: u16) !void { │ │659 + _ = ssh_port; │ │660 + // launch the TUI; the footer points at whatever port was bound │ │661 + self.session.web_port = web_port; │ │662 try hx.ui.run(self.io, self.allocator, self.session, self.repo);│ │663 } │ │664 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────╯