╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │421 }, │ │422 }, │ │423 .{ │ │424 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │425 - .data = .{ │ │424 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │425 + .event = .{ │ │426 .issue = .{ │ │427 .title = "Issue list does not persist selected sort order", │ │428 .description = "Changing the issue list sort order is lost after refresh. Store the selected sort field and direction with the user's view preferences.",│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │495 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │496 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │497 │ │498 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.description); │ │499 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.tags); │ │498 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description);│ │499 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │500 } │ │501 │ │502 // │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │503 // define more test events │ │504 // │ │505 │ │506 - const events_to_consume2 = [_]evt.Event{ │ │506 + const events_to_consume2 = [_]evt.EventWithId{ │ │507 .{ │ │508 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │509 - .data = .{ │ │508 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │509 + .event = .{ │ │510 .issue = .{ │ │511 .title = "Kanban card status badge falls behind after drag", │ │512 .description = "Moving an issue between columns updates the card position immediately, but the status badge keeps showing the previous state until refresh.",│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │515 }, │ │516 }, │ │517 .{ │ │518 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │519 - .data = .{ │ │518 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │519 + .event = .{ │ │520 .issue = .{ │ │521 .title = "Assignee autocomplete omits recently invited users", │ │522 .description = "Users invited during the current session do not appear in the assignee picker until the project page is reloaded.",│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │525 }, │ │526 }, │ │527 .{ │ │528 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │529 - .data = .{ │ │528 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │529 + .event = .{ │ │530 .issue = .{ │ │531 .title = "Add due date warning for issues blocked by dependencies", │ │532 .description = "Show a warning when an issue's due date is earlier than an unresolved blocking issue so planners can adjust the schedule.",│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │619 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │620 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │621 │ │622 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.description); │ │623 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.tags); │ │622 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description);│ │623 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │624 } │ │625 │ │626 // make sure one of the new issues is there │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │632 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │633 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │634 │ │635 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.description, first_issue.description); │ │636 - try std.testing.expectEqualStrings(events_to_consume2[0].data.issue.?.tags, first_issue.tags); │ │635 + try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.description, first_issue.description);│ │636 + try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.tags, first_issue.tags); │ │637 } │ │638 } │ │639 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │710 // define test events that modify the same issue in conflicting ways │ │711 // │ │712 │ │713 - const events_to_consume3 = [_]evt.Event{ │ │713 + const events_to_consume3 = [_]evt.EventWithId{ │ │714 .{ │ │715 .id = events_to_consume[0].id, │ │716 - .data = .{ │ │716 + .event = .{ │ │717 .issue = .{ │ │718 .title = "Login form clears password on validation error", │ │719 .description = "Submitting an invalid email address resets the password field. Preserve the field value and show an inline validation message.",│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │723 }, │ │724 .{ │ │725 .id = events_to_consume[0].id, │ │726 - .data = .{ │ │726 + .event = .{ │ │727 .issue = .{ │ │728 .title = "Login form clears password on validation error", │ │729 .description = "Submitting an invalid email address resets the password field. Preserve the field value and show an inline validation message.",│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │817 // │ │818 │ │819 var prng = std.Random.DefaultPrng.init(std.testing.random_seed); │ │820 - const user_event_id = evt.Event.randomId(prng.random()); │ │821 - const repo_event_id = evt.Event.randomId(prng.random()); │ │820 + const user_event_id = evt.EventWithId.randomId(prng.random()); │ │821 + const repo_event_id = evt.EventWithId.randomId(prng.random()); │ │822 │ │823 var first_password_hash_buf: [evt.User.password_hash_max_len]u8 = undefined; │ │824 const first_password_hash = try evt.User.hashPassword("correct horse battery staple", &first_password_hash_buf, io);│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯