╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │513 │ │514 var issue_events: [issue_data.len]evt.EventWithId = undefined; │ │515 for (issue_data, 0..) |issue, i| { │ │516 + // the newest issue's description runs past what the detail │ │517 + // pane shows, so it shows the truncated description and its │ │518 + // link. │ │519 + const description = if (i == issue_data.len - 1) desc: { │ │520 + var desc_writer = std.Io.Writer.Allocating.init(allocator); │ │521 + defer desc_writer.deinit(); │ │522 + try desc_writer.writer.print("{s}", .{issue.description}); │ │523 + var line: usize = 0; │ │524 + while (desc_writer.written().len <= ui.Repo.Issues.max_description_size) : (line += 1) { │ │525 + try desc_writer.writer.print("\n{d} {s}", .{ line, scatter_words[line % scatter_words.len] });│ │526 + } │ │527 + break :desc try arena.allocator().dupe(u8, desc_writer.written()); │ │528 + } else issue.description; │ │529 issue_events[i] = .{ │ │530 .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │531 // stepped timestamps so the issues list in a stable order │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │533 .event = .{ │ │534 .issue = .{ │ │535 .title = issue.title, │ │523 - .description = issue.description,│ │536 + .description = description, │ │537 .tags = issue.tags, │ │538 .status = issue.status, │ │539 }, │ ╰──────────────────────────────────────────────────────────────────╯