╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#21c3262c439b77af418c4e38def24c8e684314e5",│ │ 7 - .hash = "xit-0.0.0-Ub3nDEWZUAHwKJj3wD391-8pG1EngZD4Y_rLhcni3cRV", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#de3f0644e170c07669b150f8dc38409f253fd13a",│ │ 7 + .hash = "xit-0.0.0-Ub3nDCmaUAGKRJF8rMIsHAlz-FH7TAXQOhDgrf8J71yx", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────────────────────────────────────────────────────────╮ │3 const rp = xit.repo; │ │4 const xitui = xit.xitui; │ │5 const StreamTerminal = xitui.stream_terminal.StreamTerminal;│ │6 -const Grid = xitui.grid.Grid; │ │6 const Size = xitui.layout.Size; │ │7 const ui = @import("./ui.zig"); │ │8 const ssh = @import("./serve_ssh_protocol.zig"); │ ╰───────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │220 }; │ │221 var terminal_maybe: ?StreamTerminal = try StreamTerminal.init(allocator, &session_writer.interface, terminal_size);│ │222 defer if (terminal_maybe) |*terminal| terminal.deinit(); │ │224 - │ │225 - var last_size = Size{ .width = 0, .height = 0 }; │ │226 - var last_grid = try Grid.init(allocator, last_size); │ │227 - defer last_grid.deinit(); │ │223 │ │224 // initial render — user sees the page immediately │ │230 - try nav.root.build(allocator, .{ │ │231 - .min_size = .{ .width = null, .height = null }, │ │232 - .max_size = .{ .width = last_size.width, .height = last_size.height }, │ │233 - }, nav.root.getFocus()); │ │234 - if (terminal_maybe) |*terminal| _ = try terminal.render(&nav.root, &last_grid, &last_size); │ │225 + if (terminal_maybe) |*terminal| _ = try terminal.render(&nav.root); │ │226 │ │227 // event loop. nextEvent blocks until something interesting arrives; │ │228 // for each event, rebuild the widget tree and re-render so the user │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │253 defer allocator.free(payload); │ │254 if (std.mem.indexOfAny(u8, payload, "\r\n") == null) continue; │ │255 terminal_maybe = try StreamTerminal.init(allocator, &session_writer.interface, terminal_size);│ │265 - last_size = .{ .width = 0, .height = 0 }; │ │256 }, │ │257 .resize => |sz| { │ │258 terminal_size = .{ .width = sz.width_cells, .height = sz.height_cells }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │290 │ │291 try nav.root.build(allocator, .{ │ │292 .min_size = .{ .width = null, .height = null }, │ │303 - .max_size = .{ .width = last_size.width, .height = last_size.height }, │ │293 + .max_size = .{ .width = terminal_size.width, .height = terminal_size.height }, │ │294 }, nav.root.getFocus()); │ │305 - if (terminal_maybe) |*terminal| _ = try terminal.render(&nav.root, &last_grid, &last_size);│ │295 + if (terminal_maybe) |*terminal| _ = try terminal.render(&nav.root); │ │296 } │ │297 } │ │298 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │1379 pending: std.ArrayList(Action) = .empty, // actions queued by widgets this frame│ │1380 // focus id -> the live TextInput, refreshed each frame by the views that own │ │1381 // inputs. web/wasm form handling looks widgets up here by focus id. │ │1382 - text_inputs: std.AutoHashMapUnmanaged(usize, *wgt.TextInput(Widget)) = .empty, │ │1382 + text_inputs: std.AutoHashMapUnmanaged(usize, *wgt.TextInput) = .empty, │ │1383 // focus id -> the page-constant text the web renderer puts in an input │ │1384 // initially, refreshed each frame alongside `text_inputs`. never an │ │1385 // editable input's live content: the overlay html must not change as the │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │1556 // when a panic/segfault happens │ │1557 term.setActive(&terminal); │ │1558 defer term.setActive(null); │ │1559 - │ │1560 - var last_size = layout.Size{ .width = 0, .height = 0 }; │ │1561 - var last_grid = try Grid.init(allocator, last_size); │ │1562 - defer last_grid.deinit(); │ │1559 │ │1560 while (!terminal.shouldQuit()) { │ │1565 - const grid_changed = try terminal.render(&nav.root, &last_grid, &last_size);│ │1561 + const grid_changed = try terminal.render(&nav.root); │ │1562 │ │1563 // process any inputs. │ │1564 // │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │1592 terminal = try term.Terminal.init(io, allocator);│ │1593 terminal_live = true; │ │1594 term.setActive(&terminal); │ │1599 - last_size = .{ .width = 0, .height = 0 }; │ │1595 }, │ │1596 .sync_events => { │ │1597 try nav.root.build(allocator, .{ │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1598 .min_size = .{ .width = null, .height = null }, │ │1604 - .max_size = .{ .width = last_size.width, .height = last_size.height }, │ │1599 + .max_size = .{ .width = terminal.size.width, .height = terminal.size.height },│ │1600 }, nav.root.getFocus()); │ │1606 - _ = try terminal.render(&nav.root, &last_grid, &last_size); │ │1601 + _ = try terminal.render(&nav.root); │ │1602 try Repo.Events.performSync(allocator, session); │ │1603 }, │ │1604 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │1622 │ │1623 try nav.root.build(allocator, .{ │ │1624 .min_size = .{ .width = null, .height = null }, │ │1630 - .max_size = .{ .width = last_size.width, .height = last_size.height }, │ │1625 + .max_size = .{ .width = terminal.size.width, .height = terminal.size.height },│ │1626 }, nav.root.getFocus()); │ │1627 } │ │1628 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯