ReviewOS

also looking at this

craft-native/craft

feat(notifications): make the banner answerable — clicks, buttons, and a crash

#74
Merged glennmichael123 wants to merge feat/notification-actions into main
8 files +942 -17
packages/zig/build.zigmodified+13-0
Changes to packages/zig/build.zig
@@ -695,6 +695,17 @@ pub fn build(b: *std.Build) void {
695695 });
696696 cli_unit_tests.root_module.link_libc = true;
697697
698 // Notification action buttons: which category a set of buttons forms, and
699 // what a response means. Pure, so the whole thing is provable without
700 // posting a banner or clicking one.
701 const notification_actions_tests = b.addTest(.{
702 .root_module = b.createModule(.{
703 .root_source_file = b.path("src/notification_actions.zig"),
704 .target = target,
705 .optimize = optimize,
706 }),
707 });
708
698709 // The conformance test: what craft declares, against what it dispatches.
699710 const capability_conformance_tests = b.addTest(.{
700711 .root_module = b.createModule(.{
@@ -1069,6 +1080,7 @@ pub fn build(b: *std.Build) void {
10691080 const run_external_link_tests = b.addRunArtifact(external_link_tests);
10701081 const run_webview_recovery_tests = b.addRunArtifact(webview_recovery_tests);
10711082 const run_request_context_tests = b.addRunArtifact(request_context_tests);
1083 const run_notification_actions_tests = b.addRunArtifact(notification_actions_tests);
10721084 const run_cli_unit_tests = b.addRunArtifact(cli_unit_tests);
10731085 const run_lifecycle_policy_tests = b.addRunArtifact(lifecycle_policy_tests);
10741086 const run_prefs_tests = b.addRunArtifact(prefs_tests);
@@ -1187,6 +1199,7 @@ pub fn build(b: *std.Build) void {
11871199 test_step.dependOn(&run_external_link_tests.step);
11881200 test_step.dependOn(&run_webview_recovery_tests.step);
11891201 test_step.dependOn(&run_request_context_tests.step);
1202 test_step.dependOn(&run_notification_actions_tests.step);
11901203 test_step.dependOn(&run_cli_unit_tests.step);
11911204 test_step.dependOn(&run_lifecycle_policy_tests.step);
11921205 // macOS only: the registry describes the dispatch chain in macos.zig, and