╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1428 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1429 defer allocator.free(form_location); │ │1430 if (!evt.titleValid(title)) { │ │1425 - return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(parts.thread_kind, title, tags, description, target_branch)); │ │1431 + return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(parts.thread_kind, title, tags, description, target_branch, null));│ │1432 } │ │1433 try request.respond("", .{ │ │1434 .status = .see_other, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1448 if (!try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1449 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1450 defer allocator.free(form_location); │ │1445 - return respondThreadFormFailure(request, allocator, host, form_location, invalidTargetBranchFeedback(title, tags, description, target_branch)); │ │1451 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, tags, description, target_branch, null));│ │1452 } │ │1453 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │1454 var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1505 }); │ │1506 return; │ │1507 }, │ │1502 - else => |e| return e, │ │1508 + else => { │ │1509 + if (parts.thread_kind != .patch) return err; │ │1510 + const failure = ui.Session.FormFeedback.PatchFailure.fromError(err) orelse return err; │ │1511 + const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1512 + defer allocator.free(form_location); │ │1513 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, tags, description, target_branch, null));│ │1514 + }, │ │1515 }; │ │1516 │ │1517 try request.respond("", .{ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2059 const child = entry.value_ptr.*; │ │2060 const r = child.rect; │ │2061 │ │2062 + if (r.size.width == 0 or r.size.height == 0) continue; // not laid out, rather than merely off-screen│ │2063 + │ │2064 switch (child.focus.kind) { │ │2065 .text_input, .text_input_password, .text_area => { │ │2066 const ti = session.text_inputs.get(id) orelse continue; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯