From 603692c8effa9bf85a5fddc1afd1ac896227c0d3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 21 Nov 2026 21:07:11 -0300 Subject: pair: a window's facts are its client's (P47): a client window applies the session's WindowOpacity to the view it draws, as the own window does at the request (dev/gui/gui.zig: the window's half of `syncWindowOpacity` is `applyWindowOpacity`, the own window answers the core with it as before, `Client.own` applies each opacity it has not taken, `Client.opacity`, null again at a join, and answers nothing: a replica cannot change the core), and `Font` is the core's word in every desktop build as Fonts is (core/exec.zig gated it by the frontend's build, `pardes.font_picker`, so a terminal build's core ignored it while a window build's asked the machine's fonts: a window pair's session is the tui binary and its client window's replay made a host call the session's tape lacks, diverged and, with no daemon, was let go; a window client of a terminal's session typing Font on the own path diverged and joined again: `builtins.capabilities.font_picker` now, core/root.zig's `fonts` likewise, `may_wait`'s Font row beside Fonts' in core/replica.zig, dev/fonts.zig's comment); a terminal's own view still refuses Font (`viewCapabilities`), a session with no window leaves the request pending and the client window follows it (`syncReplicaFont`); the corpus through a pair's client window under PARDES_TERM_BYTES is byte-identical to tree3's for frames 0-62 (58-59 the opacity, 61 the font, 62 the resize), the own window through the same prefix 77 of 77; frame 63 on (an addon loaded by path) is the next wall (reports/pardes-pair-9.md); core-test 896/1056, shell-test 1098/1101 Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- dev/fonts.zig | 6 +++--- dev/gui/gui.zig | 32 ++++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) (limited to 'dev') diff --git a/dev/fonts.zig b/dev/fonts.zig index 540e3a60..3d69c8a1 100644 --- a/dev/fonts.zig +++ b/dev/fonts.zig @@ -4,9 +4,9 @@ //! because the core has no font and the shells have no builtin dispatch. //! //! It lives at src/ rather than under gui/ because two shells draw their own -//! text. It is compiled only behind `pardes.font_picker` (gui or macos), so -//! the tui binary never opens a font directory, and the browser has none to -//! open. +//! text. It is compiled behind `builtins.capabilities.font_picker` (a +//! desktop build, whose terminal steps a window's Fonts and Font as the +//! window does, or the Mac's): the browser has none to open. //! //! No fontconfig and no CoreText. Enumerating fonts is a walk over a handful //! of well-known directories, and the one thing the picker must know about diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index 4e074a6a..da9a9150 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -1132,6 +1132,9 @@ const Client = struct { titled: bool = false, moving: bool = false, blink: ?Blink = null, + /// The session's WindowOpacity this window last took (P47: each + /// window applies it to the view it draws; none answers the core). + opacity: ?u8 = null, fn deinit(cl: *Client) void { cl.pending.deinit(cl.gpa); @@ -1173,6 +1176,7 @@ const Client = struct { const g = cl.g; const core = l.link.r.core(); g.session_font_request = null; + cl.opacity = null; cl.shell.core = core; cl.shell.gview = cl.joins.joined.view; cl.shell.surface = null; @@ -1206,6 +1210,14 @@ const Client = struct { const link = &l.link; l.frames.period_ns = refreshNs(g); if (syncReplicaFont(g, &cl.in.core.settings.font, gpa)) link.dirty = true; + const opacity = cl.in.core.settings.window_opacity; + if (cl.opacity != opacity) { + cl.opacity = opacity; + if (applyWindowOpacity(g, opacity) catch return false) |why| { + log.warn("WindowOpacity: {s}", .{why}); + } else g.applied_window_opacity = opacity; + link.dirty = true; + } if (scrollRows(g, &cl.in, gpa)) link.dirty = true; if (fitTaglineFont(g, g.facts.tagline_percent)) link.dirty = true; const geom = windowCells(g); @@ -3027,12 +3039,24 @@ fn finishWindowOpacity(core: *pardes.Pardes, applied: *u8, failure: ?[]const u8) fn syncWindowOpacity(g: *Gui, core: *pardes.Pardes) void { if (!core.settings.window_opacity_pending) return; + const failure = applyWindowOpacity(g, core.settings.window_opacity) catch blk: { + core.quit = true; + break :blk null; + }; + finishWindowOpacity(core, &g.applied_window_opacity, failure); +} + +/// What the window does at a WindowOpacity, the own window's and a +/// client's (P47: a window's facts are the process's that draws it): why +/// it cannot, or null; error.NoWindow when it was made again and could +/// not be. +fn applyWindowOpacity(g: *Gui, opacity: u8) error{NoWindow}!?[]const u8 { // The first opacity under 100 on Wayland: the window made again, // transparent, presenting through SDL_Renderer from then on (the // capture's format, the swapchain's, is one it uploads). At a start's // own WindowOpacity this is before its first frame, so unseen. const unorm = g.present.swapchain_format == c.SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM or g.present.swapchain_format == c.SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM; - if (g.wayland and !g.present.surface_opacity and core.settings.window_opacity < 100 and unorm) { + if (g.wayland and !g.present.surface_opacity and opacity < 100 and unorm) { // A `--detach` session's window stays hidden. const hidden = c.SDL_GetWindowFlags(g.window) & c.SDL_WINDOW_HIDDEN; const mode = g.present.present_mode; @@ -3048,16 +3072,16 @@ fn syncWindowOpacity(g: *Gui, core: *pardes.Pardes) void { g.present.surface_opacity = false; g.present.present_mode = mode; g.win_flags &= ~@as(c.SDL_WindowFlags, c.SDL_WINDOW_TRANSPARENT); - if (!reopenWindow(g)) core.quit = true; + if (!reopenWindow(g)) return error.NoWindow; } g.win_flags &= ~hidden; } // Offscreen captures also support per-pixel alpha. Never approximate this // with SDL_SetWindowOpacity: that would make foreground text translucent. - finishWindowOpacity(core, &g.applied_window_opacity, if (g.present.surface_opacity or g.present.capture or core.settings.window_opacity == 100) + return if (g.present.surface_opacity or g.present.capture or opacity == 100) null else - "background transparency requires a native Wayland or alpha-capable SDL window"); + "background transparency requires a native Wayland or alpha-capable SDL window"; } fn present(ctx: ?*anyopaque, surface: *const pardes.Surface) bool { -- cgit v1.3 From 752cd81c1c5e1e91e1429cefc1c4651647981f88 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 21 Nov 2026 21:19:36 -0300 Subject: pair: a pair's session puts the user's terminal back when its client dies with no word (P48): a tty pair (runtime/main.zig `pair`) keeps /dev/tty and its termios as they are before the client enters it and hands them to the session (dev/tui/tui.zig `Term.pair`, `Kept`); `Peers` marks the pair's first peer (`Peer.pair`, from `Joining.own`) and a bye (`Peer.bye`) and says at that peer's leave whether it left with no word at all (`Peers.pair_left`: no bye, not let go by the session, not cut); the session's frontend (`Own.sent`, now before a no-daemon pair's end in runtime/session.zig) writes on a loss what the own path writes when a terminal is lost under it (`Killed`'s bytes, which now also turn the in-band resize off: vaxis's terminal query turns it on) and the cooked termios, and lets the device go either way (a terminal held open keeps an ssh or its emulator waiting); not across an Upgrade (close-on-exec) nor after the pair's client joined again; daemon.py plain with the variable passes on Debug (it failed at 'the terminal is put back'), its row after a killed stub listing `(tty)` under the variable (a loss: still a pair's, P36), and --upgrade counts the device let go at the exec; core-test 896/1056, shell-test 1098/1101 Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/replica.zig | 14 +++++++++++++- dev/tui/tui.zig | 41 ++++++++++++++++++++++++++++++++--------- runtime/main.zig | 33 ++++++++++++++++++--------------- runtime/session.zig | 6 ++++-- test/daemon.py | 8 +++++++- 5 files changed, 74 insertions(+), 28 deletions(-) (limited to 'dev') diff --git a/core/replica.zig b/core/replica.zig index 44fa922f..49dc7f7b 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -1717,6 +1717,12 @@ pub const Peer = struct { again: bool = false, /// ...or that its window was closed (Peers.closed). close: bool = false, + /// It said a bye: none, and the session let it go with no word of its + /// own (`closing`, `cut`), is a client that died (killed: P48). + bye: bool = false, + /// A pair's first client (`Joining.own`): the terminal its session + /// keeps is its (`Peers.pair_left`). + pair: bool = false, /// Its number in the session's `Screens`. sid: u16 = 0, /// Inputs read (each one's seq, as the client numbered them). @@ -1998,6 +2004,7 @@ pub const Peer = struct { const b = (wire.decodeClient(tag, payload) catch return false).bye; peer.again = b.again; peer.close = b.close; + peer.bye = true; return false; }, .ping => { @@ -2130,6 +2137,10 @@ pub const Peers = struct { /// hung up) and the session is a pair's not kept (daemon.sessionState): it /// ends there (runtime/session.zig). closed: bool = false, + /// Its pair's first client left (P48): with no word at all (killed), + /// true; its session's frontend puts the user's terminal back then, + /// and lets it go either way (tui.zig `Own.sent`), and clears this. + pair_left: ?bool = null, /// An Upgrade told its clients so (`refuseAll`): a connection handed /// over before its exec is told the same, never closed by the exec /// unanswered. Its exec failed: the next boundary takes joins again. @@ -2403,7 +2414,7 @@ pub const Peers = struct { core.gpa.free(bytes); return daemon.refuseReplica(fd, "out of memory"); }; - peer.* = .{ .peers = ps, .fd = fd, .id = ps.next_id, .view = .at(k), .dump = bytes, .blobs = blobs, .dump_gpa = core.gpa }; + peer.* = .{ .peers = ps, .fd = fd, .id = ps.next_id, .view = .at(k), .dump = bytes, .blobs = blobs, .dump_gpa = core.gpa, .pair = joining.own }; ps.next_id +%= 1; if (ps.next_id == 0) ps.next_id = 1; // The session's digest as dumped, for the joiner to check its load by @@ -2484,6 +2495,7 @@ pub const Peers = struct { ps.closeViewOf(core, peer, peer.again or peer.cut); if (ps.count() == 0) core.unattended = ps.detached; if (ps.count() == 0 and peer.close and daemon.sessionState() == .pair) ps.closed = true; + if (peer.pair) ps.pair_left = !peer.bye and !peer.closing and !peer.cut; ps.seq += 1; ps.unit(0, ps.seq); ps.letGo(peer); diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 92ac6a0c..25ee9075 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -559,8 +559,12 @@ fn surfaceHasKittyKey(surface: *const pardes.Surface, key: u64) bool { /// opens it; one open already (a session forked off its stub, /// daemon.forkSession); or none, detached from the start (`--detach`). /// The terminal a session starts on: /dev/tty, one its stub opened (an -/// upgraded session's is raw already, `termios` the cooked one), or none. -pub const Term = union(enum) { open, fd: struct { fd: posix.fd_t, termios: ?posix.termios = null }, detached }; +/// upgraded session's is raw already, `termios` the cooked one), or none: +/// a pair's (main.zig `pair`) draws on none, and keeps its client's, with +/// its modes before the client took it, to put back if that client dies +/// with no word (P48: `Own.sent`). +pub const Term = union(enum) { open, fd: struct { fd: posix.fd_t, termios: ?posix.termios = null }, detached, pair: Kept }; +pub const Kept = struct { fd: posix.fd_t, termios: posix.termios }; pub fn run(init: std.process.Init, opts: pardes.Options, term: Term) !void { const io = init.io; @@ -583,7 +587,7 @@ pub fn run(init: std.process.Init, opts: pardes.Options, term: Term) !void { switch (term) { .open => try screen.enter(try vaxis.Tty.init(io, &tty_buf)), .fd => |t| try screen.enter(try Screen.ttyOn(io, &tty_buf, t.fd, t.termios)), - .detached => {}, + .detached, .pair => {}, } defer screen.leave(); @@ -591,7 +595,7 @@ pub fn run(init: std.process.Init, opts: pardes.Options, term: Term) !void { defer paste_buf.deinit(); var loop: Loop = .init(io, &screen.tty, &screen.vx); - var own: Own = .{ .screen = &screen, .loop = &loop, .paste_buf = &paste_buf }; + var own: Own = .{ .screen = &screen, .loop = &loop, .paste_buf = &paste_buf, .kept = if (term == .pair) term.pair else null }; try session_loop.Loop(Own).run(init, opts, &own); } @@ -929,7 +933,9 @@ const Screen = struct { const Killed = struct { var fd: posix.fd_t = -1; var cooked: posix.termios = undefined; - const reset = "\x1b[= 0) { - _ = std.c.write(fd, reset, reset.len); - _ = std.c.tcsetattr(fd, .FLUSH, &cooked); - } + if (fd >= 0) putBack(fd, &cooked); // The 9P socket and private prompt files go too: a killed editor // leaves none behind. Its shells too, the daemon's dups let go. ninep_io.unlinkOwnSocket(); @@ -971,6 +979,9 @@ const Own = struct { paste_buf: *std.Io.Writer.Allocating, frame_arena: std.heap.ArenaAllocator = undefined, sh: Shell = undefined, + /// A pair's: its client's terminal (Term.pair), until that client + /// leaves. + kept: ?Kept = null, const Session = session_loop.Loop(Own); @@ -1027,6 +1038,7 @@ const Own = struct { o.screen.art.deinit(gpa); o.screen.glide.deinit(gpa); o.frame_arena.deinit(); + if (o.kept) |k| _ = libc.close(k.fd); } pub fn start(o: *Own, l: *Session) !void { @@ -1051,6 +1063,17 @@ const Own = struct { pub fn sent(o: *Own) void { const sh = &o.sh; if (sh.peers.recording and sh.detached()) sh.drawn_ns = @intCast(std.Io.Clock.awake.now(sh.io).nanoseconds); + // A pair's client gone: dead with no word (a kill -9), its + // terminal put back as the own path's survivor puts it back (a + // forked session's when its stub is killed), from the alternate + // screen and raw; with a word, it did that itself. Let go either + // way: a terminal held open keeps an ssh, or its emulator, waiting. + const lost = sh.peers.pair_left orelse return; + sh.peers.pair_left = null; + const k = o.kept orelse return; + o.kept = null; + if (lost) Killed.putBack(k.fd, &k.termios); + _ = libc.close(k.fd); } pub fn upgradeAsked(o: *Own) void { diff --git a/runtime/main.zig b/runtime/main.zig index 02a41c2f..5cdf5ee0 100644 --- a/runtime/main.zig +++ b/runtime/main.zig @@ -1593,8 +1593,7 @@ fn nativeMain(std_init: std.process.Init) !void { // The last step's way, behind its variable until it is the default: // this terminal or window a client of a session forked off for it // (`pair`). - pair(init, &opts, args); - term = .detached; + term = if (pair(init, &opts, args)) |kept| .{ .pair = kept } else .detached; } else if (daemon.wanted()) { if (detach != null or pardes.platform == .gui) { // A session started detached is kept from birth: a pair's word. @@ -1757,9 +1756,11 @@ fn pardesBeside(buf: *[4104]u8) ?[:0]const u8 { /// effects (runtime/session.zig). A window's child execs the `pardes` /// beside it (`--paired=FD` first, its arguments after), which dials the /// daemon itself: a window's session loop is woken through SDL (gui.zig -/// `sdlWake`), a terminal's needs none. Returns in a terminal's session; -/// the client exits. No fork to be had: returns, and this process is the -/// session, with no terminal: said by the caller's run. A window with no +/// `sdlWake`), a terminal's needs none. Returns in a terminal's session, +/// with the terminal its client draws on, cooked as it is now (P48: put +/// back if that client dies with no word); the client exits. No fork to +/// be had: returns, and this process is the session, with no terminal: +/// said by the caller's run. A window with no /// `pardes` beside it returns at once, its own session as before. /// A terminal's launch with no terminal to draw on (a detached pty, a /// daemon): said, not an error trace, and exit 1. @@ -1768,23 +1769,22 @@ fn noTerminal(io: std.Io) noreturn { std.process.exit(1); } -fn pair(init: std.process.Init, opts: *pardes.Options, args: []const [:0]const u8) void { +fn pair(init: std.process.Init, opts: *pardes.Options, args: []const [:0]const u8) ?@import("dev").tui.Kept { var path_buf: [4104]u8 = undefined; var fd_buf: [32]u8 = undefined; var argv: [64:null]?[*:0]const u8 = @splat(null); if (pardes.platform == .gui) { - const path = pardesBeside(&path_buf) orelse return; - if (args.len >= argv.len - 1 or std.c.access(path, std.c.X_OK) != 0) return; + const path = pardesBeside(&path_buf) orelse return null; + if (args.len >= argv.len - 1 or std.c.access(path, std.c.X_OK) != 0) return null; argv[0] = path.ptr; for (args[1..], 2..) |a, k| argv[k] = a.ptr; } // Its client draws on /dev/tty: none to be had, said as the own path - // says it, before a session is forked for nobody. - if (pardes.platform == .tui) { - const tty = std.c.open("/dev/tty", .{ .ACCMODE = .RDWR, .CLOEXEC = true }, @as(std.c.mode_t, 0)); - if (tty < 0) noTerminal(init.io); - _ = std.c.close(tty); - } + // says it, before a session is forked for nobody. The session keeps it, + // cooked as it is now. std.posix's termios: glibc's is a bigger struct. + const tty: c_int = if (pardes.platform == .tui) std.c.open("/dev/tty", .{ .ACCMODE = .RDWR, .CLOEXEC = true }, @as(std.c.mode_t, 0)) else -1; + if (pardes.platform == .tui and tty < 0) noTerminal(init.io); + const cooked = if (tty >= 0) std.posix.tcgetattr(tty) catch null else null; const conn: ?c_int = if (pardes.platform == .tui and daemon.wanted()) daemon.connect(true) else null; var fds: [2]c_int = undefined; if (std.c.socketpair(std.c.AF.UNIX, std.c.SOCK.STREAM | std.c.SOCK.CLOEXEC, 0, &fds) != 0) @@ -1816,8 +1816,11 @@ fn pair(init: std.process.Init, opts: *pardes.Options, args: []const [:0]const u // The daemon is the client's to start; the hello is this one's. daemon.startPending(false); if (conn) |c| _ = daemon.register(c, .tty, opts.ninep_name, .pair); - return; + if (cooked) |t| return .{ .fd = tty, .termios = t }; + if (tty >= 0) _ = std.c.close(tty); + return null; } + if (tty >= 0) _ = std.c.close(tty); _ = std.c.close(fds[0]); if (conn) |c| _ = std.c.close(c); daemon.startPending(true); diff --git a/runtime/session.zig b/runtime/session.zig index 65432d97..890302b1 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -23,7 +23,8 @@ //! - `start(l)`: after the first effects, the ptys and the watches //! read: its input, its readers, the listener's wake, a detached //! session's first wait (`l.watch`). -//! - `sent()`: after each step's unit went to the clients. +//! - `sent()`: after each step's unit went to the clients (a pair's +//! client gone with it: before its session ends). //! - `upgradeAsked()`: an Upgrade asked in the step, done (it execs). //! - `restoring(nc)`, `restored(l)`: a Restore's new core, before it //! replaces the old one (its devices let go, what it is told of the @@ -133,11 +134,12 @@ pub fn Loop(comptime Frontend: type) type { try l.core.pump(l.host); // Its unit to each replica client, and theirs taken in. l.peers.boundary(l.core); + // Before a pair's end: its client's terminal put back (P48). + fe.sent(); // A pair's session with no daemon ends with its last link: // nothing could attach to it again; with one, when its last // client left with a close (not a loss) and it is not kept. if (l.peers.count() == 0 and (l.peers.closed or (o.pair != null and daemon.link < 0))) break; - fe.sent(); upgrade.locate(); // Asked in the step (the word), done between steps: the // session whole. diff --git a/test/daemon.py b/test/daemon.py index aa06c76d..32ff5908 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -2773,7 +2773,9 @@ def main(binary, cycles): wait_for('the client\'s first frame', lambda: b'\x1b[?1049h' in term.text()) listed = wait_for('the client in --ps', lambda: (lambda out: f'client {stub.pid} ' in out and out)( subprocess.run([binary, '--ps'], env=env, capture_output=True, timeout=30).stdout.decode())) - assert f'session fresh {session} {listed_as("detached")}' in listed, listed + # (Under the variable the killed stub was the pair's client: a loss, + # the session still a pair's, P36.) + assert f'session fresh {session} {"(tty)" if WITH_PAIR else listed_as("detached")}' in listed, listed print('daemon: a session whose stub was killed outright detached, and was attached again, as a client') # The end: the session quits, its shells hang up, its client and @@ -3186,6 +3188,10 @@ def upgrades(old, new): # (A client of a build that execs at an Upgrade comes back: its # connection is the session's again.) gone = 2 if b'detached from' in term2.text() else 0 if knows_exec(old) and stub2.poll() is None else 1 + # (Under the variable a pair's session of a build that keeps its + # client's terminal, P48, lets it go: close-on-exec, not carried; + # such a build's put-back turns the in-band resize off.) + gone += 1 if WITH_PAIR and b'\x1b[?2048l\x1b[0m' in Path(old).read_bytes() else 0 return fds_before[0] - 2 - gone + min(state_fds(session), 1) - state_before, fds_before[1] try: wait_for('the fds level', lambda: (fds(session), fds(daemon)) == level(), timeout=5) -- cgit v1.3 From 6401b327a217c144895e22fb7ad24d986af97d86 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 22 Nov 2026 00:38:38 -0300 Subject: pair: an upgraded pair's session keeps what it says until its client is back: its "Upgrade: now" (runtime/upgrade.zig, set on the restored core's live view at load) went 800 ms after it was said (`message_linger_ms`), on the clock an unattended session's messages are put on (Messages.expireUnattended), and a pair's session has no terminal of its own (dev/tui/tui.zig `detached`) and no client until its client dials again after the exec, which takes longer; the own path's session is attended by its terminal throughout; so a session resumed by an Upgrade whose record says it was a pair's (`Record.state` .pair: its client is on its way) starts attended, as a Restore's does for its clients (runtime/session.zig `restore`), and goes unattended again when its last client leaves (Peers.leave); daemon.py --with-pair --upgrade both ways now passes "the word said" and stops at the next check, the daemon's hello for a new view refused "that session has as many views as it takes" (test/daemon.py:3220), which the own path's run (no variable) on the same two builds is refused too, until the views kept for the old build's clients have been away 30 s (views.away_kept_ns), and the pair's for good (45 s tried) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- dev/tui/tui.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dev') diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 25ee9075..2c6b25d2 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -1018,6 +1018,12 @@ const Own = struct { if (comptime !builtin.is_test) if (upgrade.resumed) |*rec| sh.resumeTerminals(rec); // Nobody to see it, and nobody to size it: `size` sets it (ctl.zig). sh.setAttended(!sh.detached()); + // An upgraded pair's client joins again at once: what the session + // says meanwhile ("Upgrade: now") waits for it, as at a Restore + // (session.zig `restore`), not 800 ms on an unattended clock. + if (comptime !builtin.is_test) if (upgrade.resumed) |rec| if (rec.state == .pair) { + l.core.unattended = false; + }; return host; } -- cgit v1.3