╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │371 // the newest commit's message runs past what the detail pane │ │372 // reads, so it shows the truncated message and its link. │ │373 if (c == commit_count - 1) { │ │374 - var line: usize = 0; │ │375 - while (msg_writer.written().len <= ui.Repo.Commits.max_message_size) : (line += 1) { │ │374 + for (0..ui.detail_preview_lines) |line| { │ │375 try msg_writer.writer.print("\n{d} {s}", .{ line, scatter_words[line % scatter_words.len] });│ │376 } │ │377 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │571 // the fifth-newest issue's description runs past what the detail │ │572 // pane shows, so it shows the truncated description and its │ │573 // link. │ │575 - const description = if (i == issue_data.len - 5) desc: { │ │576 - var desc_writer = std.Io.Writer.Allocating.init(allocator); │ │577 - defer desc_writer.deinit(); │ │578 - try desc_writer.writer.print("{s}", .{issue.description}); │ │579 - var line: usize = 0; │ │580 - while (desc_writer.written().len <= ui.Repo.Issues.max_description_size) : (line += 1) { │ │581 - try desc_writer.writer.print("\n{d} {s}", .{ line, scatter_words[line % scatter_words.len] });│ │582 - } │ │583 - break :desc try arena.allocator().dupe(u8, desc_writer.written()); │ │584 - } else issue.description; │ │574 + const description = if (i == issue_data.len - 5) │ │575 + try longDescription(arena.allocator(), issue.description) │ │576 + else │ │577 + issue.description; │ │578 issue_events[i] = .{ │ │579 .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │580 // stepped timestamps so the issues list in a stable order │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │932 "falcon", "otter", "badger", "walrus", "ferret", "marmot", │ │933 "scatter", "gather", "encode", "decode", "render", "commit", │ │934 }; │ │935 + │ │936 +fn longDescription(allocator: std.mem.Allocator, initial: []const u8) ![]u8 { │ │937 + var writer = std.Io.Writer.Allocating.init(allocator); │ │938 + defer writer.deinit(); │ │939 + try writer.writer.print("{s}", .{initial}); │ │940 + for (0..ui.detail_preview_lines) |line| │ │941 + try writer.writer.print("\n{d} {s}", .{ line, scatter_words[line % scatter_words.len] });│ │942 + return writer.toOwnedSlice(); │ │943 +} │ │944 │ │945 // write `path` as 40 lines of mostly-stable filler. revision `c` and file │ │946 // index `fi` shift which lines change and the words used, so each (c, fi) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1213 var ours_values = values; │ │1214 ours_values[0].title = "Drop the legacy configuration loader"; │ │1215 ours_values[0].tags = "cleanup config breaking"; │ │1214 - ours_values[1].description = "Cache parsed manifests for the lifetime of a command invocation and invalidate entries when their files change.";│ │1216 + const closed_description = try longDescription( │ │1217 + patch_arena.allocator(), │ │1218 + "Cache parsed manifests for the lifetime of a command invocation and invalidate entries when their files change.", │ │1219 + ); │ │1220 + ours_values[1].description = closed_description; │ │1221 ours_values[2].description = "Add JSON output to inspect with versioned field names and deterministic object ordering."; │ │1222 var theirs_values = values; │ │1223 theirs_values[0].title = "Delete compatibility configuration support"; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯