@native-sdk/cli 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/app.zig +357 -33
- package/build.zig +234 -11
- package/native-sdk.d.ts +8 -0
- package/package.json +10 -10
- package/packages/core/compile-surface/core.ts +70 -1
- package/packages/core/package-lock.json +11 -11
- package/packages/core/package.json +2 -2
- package/packages/core/scripts/merge_static_archives.mjs +78 -0
- package/packages/core/scripts/run_external_core_compiler.mjs +52 -7
- package/packages/core/scripts/run_external_service_compiler.mjs +53 -13
- package/packages/core/scripts/stage_external_services.mjs +1 -1
- package/packages/core/sdk/core.d.ts +75 -0
- package/packages/core/sdk/core.ts +170 -13
- package/packages/core/sdk/events.d.ts +53 -0
- package/packages/core/sdk/events.ts +78 -7
- package/packages/core/src/checker.ts +470 -2
- package/packages/core/src/cli.ts +13 -0
- package/packages/core/src/contract.ts +3 -1
- package/packages/core/src/devhost.ts +30 -1
- package/packages/core/src/devhost_journal.mjs +10 -8
- package/packages/core/src/diagnostics.ts +99 -8
- package/packages/core/src/frontend.ts +6 -0
- package/packages/core/src/infer.ts +24 -0
- package/skill-data/automation/SKILL.md +1 -1
- package/skill-data/native-ui/SKILL.md +18 -12
- package/skill-data/ts-core/SKILL.md +54 -21
- package/skill-data/ts-services/SKILL.md +4 -4
- package/skill-data/ts-services/references/service-surface.md +2 -1
- package/skill-data/zig/SKILL.md +1 -1
- package/src/app_runner/root.zig +122 -6
- package/src/app_runner/ts_core_main.zig +9 -4
- package/src/app_runner/ts_core_mobile.zig +241 -0
- package/src/app_runner/window_placement.zig +63 -0
- package/src/automation/protocol.zig +5 -1
- package/src/automation/snapshot.zig +8 -6
- package/src/embed/app_exports.zig +3 -1
- package/src/embed/conversions.zig +1 -0
- package/src/embed/host.zig +10 -3
- package/src/embed/root.zig +2 -0
- package/src/embed/tests.zig +41 -1
- package/src/embed/types.zig +2 -0
- package/src/embed/ui_host.zig +94 -4
- package/src/platform/android/NativeSdkActivity.java +49 -4
- package/src/platform/android/android_host.c +3 -3
- package/src/platform/android/native_sdk_app.h +1 -1
- package/src/platform/ios/apple_image_fit.h +38 -0
- package/src/platform/ios/files.zig +1 -0
- package/src/platform/ios/native_sdk_app.h +1 -1
- package/src/platform/ios/uikit_host.m +28 -5
- package/src/platform/linux/cef_host.cpp +17 -3
- package/src/platform/linux/gtk_host.c +243 -15
- package/src/platform/linux/gtk_host.h +5 -4
- package/src/platform/linux/root.zig +91 -11
- package/src/platform/macos/appkit_host.h +18 -11
- package/src/platform/macos/appkit_host.m +402 -128
- package/src/platform/macos/cef_host.mm +342 -122
- package/src/platform/macos/image_fit_test.m +44 -0
- package/src/platform/macos/root.zig +231 -39
- package/src/platform/null_platform.zig +251 -54
- package/src/platform/null_platform_tests.zig +97 -4
- package/src/platform/root.zig +12 -0
- package/src/platform/types.zig +174 -35
- package/src/platform/windows/root.zig +42 -13
- package/src/platform/windows/webview2_host.cpp +72 -11
- package/src/primitives/app_manifest/root.zig +3 -0
- package/src/primitives/app_manifest/tests.zig +24 -0
- package/src/primitives/app_manifest/types.zig +13 -0
- package/src/primitives/app_manifest/validation.zig +24 -0
- package/src/primitives/canvas/a11y_audit.zig +9 -7
- package/src/primitives/canvas/a11y_audit_tests.zig +24 -0
- package/src/primitives/canvas/events.zig +50 -0
- package/src/primitives/canvas/layout_audit.zig +6 -6
- package/src/primitives/canvas/markdown.zig +4 -0
- package/src/primitives/canvas/markdown_tests.zig +1 -0
- package/src/primitives/canvas/png.zig +138 -0
- package/src/primitives/canvas/root.zig +13 -2
- package/src/primitives/canvas/text_span_tests.zig +5 -3
- package/src/primitives/canvas/text_spans.zig +2 -0
- package/src/primitives/canvas/text_tests.zig +20 -0
- package/src/primitives/canvas/ui.zig +55 -2
- package/src/primitives/canvas/ui_markup.zig +40 -13
- package/src/primitives/canvas/ui_markup_binary.zig +8 -6
- package/src/primitives/canvas/ui_markup_binary_tests.zig +14 -4
- package/src/primitives/canvas/ui_markup_compiled.zig +5 -1
- package/src/primitives/canvas/ui_markup_compiled_tests.zig +52 -0
- package/src/primitives/canvas/ui_markup_tests.zig +11 -2
- package/src/primitives/canvas/ui_markup_view.zig +8 -2
- package/src/primitives/canvas/ui_markup_view_tests.zig +49 -4
- package/src/primitives/canvas/ui_schema.zig +17 -13
- package/src/primitives/canvas/ui_tests.zig +47 -0
- package/src/primitives/canvas/widget_access.zig +3 -3
- package/src/primitives/canvas/widget_anchored_tests.zig +106 -0
- package/src/primitives/canvas/widget_builtin_tests.zig +580 -32
- package/src/primitives/canvas/widget_invalidation.zig +33 -6
- package/src/primitives/canvas/widget_layout.zig +333 -126
- package/src/primitives/canvas/widget_layout_tests.zig +169 -0
- package/src/primitives/canvas/widget_metrics.zig +7 -8
- package/src/primitives/canvas/widget_render.zig +76 -44
- package/src/primitives/canvas/widget_render_controls.zig +110 -32
- package/src/primitives/canvas/widget_render_style.zig +58 -18
- package/src/primitives/canvas/widget_render_surfaces.zig +45 -14
- package/src/primitives/canvas/widget_routing.zig +40 -34
- package/src/primitives/canvas/widget_runtime.zig +11 -2
- package/src/primitives/canvas/widget_runtime_tests.zig +10 -14
- package/src/primitives/canvas/widget_semantics.zig +8 -3
- package/src/primitives/canvas/widget_semantics_tests.zig +6 -2
- package/src/primitives/canvas/widget_tree.zig +99 -5
- package/src/primitives/canvas/widgets.zig +20 -7
- package/src/root.zig +10 -0
- package/src/runtime/api.zig +14 -0
- package/src/runtime/automation_commands.zig +35 -2
- package/src/runtime/automation_snapshot.zig +32 -24
- package/src/runtime/automation_widget_dispatch.zig +48 -6
- package/src/runtime/bridge_permission_tests.zig +35 -1
- package/src/runtime/bridge_responses.zig +1 -1
- package/src/runtime/builtin_bridge.zig +16 -3
- package/src/runtime/canvas_frame_packet_tests.zig +22 -13
- package/src/runtime/canvas_image_tests.zig +146 -2
- package/src/runtime/canvas_images.zig +35 -16
- package/src/runtime/canvas_limits.zig +13 -3
- package/src/runtime/canvas_widget_accessibility_tests.zig +279 -4
- package/src/runtime/canvas_widget_anchored_tests.zig +54 -0
- package/src/runtime/canvas_widget_control_tests.zig +31 -1
- package/src/runtime/canvas_widget_events.zig +151 -26
- package/src/runtime/canvas_widget_floating_tests.zig +48 -0
- package/src/runtime/canvas_widget_runtime.zig +322 -102
- package/src/runtime/canvas_widget_scroll_driver_tests.zig +34 -0
- package/src/runtime/canvas_widget_scroll_drivers.zig +12 -10
- package/src/runtime/canvas_widget_scroll_tests.zig +193 -2
- package/src/runtime/canvas_widget_semantics_tests.zig +337 -3
- package/src/runtime/canvas_widget_split_tree_tests.zig +55 -0
- package/src/runtime/canvas_widget_state.zig +33 -7
- package/src/runtime/core.zig +28 -6
- package/src/runtime/effects.zig +1337 -49
- package/src/runtime/effects_file_tests.zig +587 -0
- package/src/runtime/effects_image_tests.zig +91 -0
- package/src/runtime/effects_notification_tests.zig +11 -0
- package/src/runtime/file_access.zig +400 -0
- package/src/runtime/file_effect_crash_helper.zig +28 -0
- package/src/runtime/file_effect_crash_tests.zig +37 -0
- package/src/runtime/flow.zig +21 -9
- package/src/runtime/gpu_surface_events.zig +25 -2
- package/src/runtime/native_command_event_tests.zig +44 -2
- package/src/runtime/pty.zig +5 -2
- package/src/runtime/root.zig +7 -0
- package/src/runtime/session_blobs.zig +4 -1
- package/src/runtime/session_journal.zig +56 -5
- package/src/runtime/session_record.zig +38 -0
- package/src/runtime/session_replay.zig +110 -15
- package/src/runtime/session_tests.zig +192 -4
- package/src/runtime/shell_layout_tests.zig +12 -0
- package/src/runtime/state.zig +10 -0
- package/src/runtime/system_services.zig +129 -36
- package/src/runtime/ts_core_host.zig +281 -11
- package/src/runtime/ts_core_host_tests.zig +142 -1
- package/src/runtime/ts_ui_app.zig +461 -8
- package/src/runtime/ui_app.zig +330 -112
- package/src/runtime/ui_app_tests.zig +251 -25
- package/src/runtime/ui_app_window_tests.zig +74 -8
- package/src/runtime/validation.zig +20 -0
- package/src/runtime/view.zig +3 -0
- package/src/runtime/view_widget_control.zig +18 -0
- package/src/runtime/view_widget_scroll.zig +112 -18
- package/src/runtime/view_widget_tree.zig +110 -13
- package/src/runtime/widget_bridge.zig +2 -0
- package/src/runtime/window_command_bridge_tests.zig +86 -0
- package/src/runtime/window_storage.zig +16 -1
- package/src/runtime/window_views.zig +1 -0
- package/src/tooling/ios.zig +3 -0
- package/src/tooling/manifest.zig +90 -2
- package/src/tooling/package.zig +67 -2
- package/src/tooling/raw_manifest.zig +10 -0
- package/src/tooling/templates.zig +156 -18
- package/src/tooling/ts_core.zig +83 -0
- package/src/tooling/web_engine.zig +1 -1
- package/tools/corewire/emit.zig +3 -3
- package/tools/corewire/emit_facade.zig +65 -5
- package/tools/corewire/emit_profile.zig +2 -2
- package/tools/corewire/emit_service.zig +2 -2
- package/tools/corewire/service_contract.zig +4 -4
- package/tools/corewire/sidecar.zig +4 -4
|
@@ -12,6 +12,7 @@ const app_manifest = @import("app_manifest");
|
|
|
12
12
|
const core = @import("core.zig");
|
|
13
13
|
const ui_app_mod = @import("ui_app.zig");
|
|
14
14
|
const effects_mod = @import("effects.zig");
|
|
15
|
+
const canvas_limits = @import("canvas_limits.zig");
|
|
15
16
|
const platform = @import("../platform/root.zig");
|
|
16
17
|
const journal = @import("session_journal.zig");
|
|
17
18
|
const session_record = @import("session_record.zig");
|
|
@@ -1448,6 +1449,8 @@ const ImageSessionModel = struct {
|
|
|
1448
1449
|
exits: u32 = 0,
|
|
1449
1450
|
exits_rejected: u32 = 0,
|
|
1450
1451
|
files: u32 = 0,
|
|
1452
|
+
stream_bytes: u64 = 0,
|
|
1453
|
+
stream_done: bool = false,
|
|
1451
1454
|
/// Armed by `.arm_fetch_chain` / `.arm_file_chain`: the NEXT
|
|
1452
1455
|
/// terminal of that family answers by reissuing the SAME key from
|
|
1453
1456
|
/// inside its own update (one-shot) — the poll/reload idiom whose
|
|
@@ -1475,6 +1478,7 @@ const ImageSessionMsg = union(enum) {
|
|
|
1475
1478
|
fetch_cover,
|
|
1476
1479
|
spawn_cover,
|
|
1477
1480
|
read_note,
|
|
1481
|
+
stream_note,
|
|
1478
1482
|
line: effects_mod.EffectLine,
|
|
1479
1483
|
image: effects_mod.EffectImageResult,
|
|
1480
1484
|
response: effects_mod.EffectResponse,
|
|
@@ -1519,6 +1523,7 @@ fn imageSessionUpdate(model: *ImageSessionModel, msg: ImageSessionMsg, fx: *Imag
|
|
|
1519
1523
|
// A file read on its own key (26 — never colliding with the
|
|
1520
1524
|
// image/fetch/spawn probes above).
|
|
1521
1525
|
.read_note => fx.readFile(.{ .key = 26, .path = "notes/session.txt", .on_result = ImageSessionApp.Effects.fileMsg(.file) }),
|
|
1526
|
+
.stream_note => fx.readFileStream(.{ .key = 27, .path = "notes/large.bin", .on_result = ImageSessionApp.Effects.fileMsg(.file) }),
|
|
1522
1527
|
// Aimed at the cover's id: against a running load this marks
|
|
1523
1528
|
// it cancelled; against a staged start-failure rejection (no
|
|
1524
1529
|
// slot exists) it is a no-op and the rejection stands.
|
|
@@ -1547,6 +1552,10 @@ fn imageSessionUpdate(model: *ImageSessionModel, msg: ImageSessionMsg, fx: *Imag
|
|
|
1547
1552
|
},
|
|
1548
1553
|
.file => |result| {
|
|
1549
1554
|
model.files += 1;
|
|
1555
|
+
if (result.op == .read_stream) {
|
|
1556
|
+
if (result.event == .chunk) model.stream_bytes += result.bytes.len;
|
|
1557
|
+
if (result.event == .done) model.stream_done = true;
|
|
1558
|
+
}
|
|
1550
1559
|
// The armed reload idiom, the fetch chain's file twin.
|
|
1551
1560
|
if (model.chain_next_file and result.key == 26) {
|
|
1552
1561
|
model.chain_next_file = false;
|
|
@@ -1590,6 +1599,7 @@ fn imageSessionView(ui: *ImageSessionApp.Ui, model: *const ImageSessionModel) Im
|
|
|
1590
1599
|
ui.text(.{}, ui.fmt("{d} lines, {d} before image", .{ model.lines_seen, model.lines_before_image })),
|
|
1591
1600
|
ui.text(.{}, ui.fmt("{d}/{d} responses, {d}/{d} exits rejected", .{ model.responses_rejected, model.responses, model.exits_rejected, model.exits })),
|
|
1592
1601
|
ui.text(.{}, ui.fmt("{d} files", .{model.files})),
|
|
1602
|
+
ui.text(.{}, ui.fmt("stream {d} done {}", .{ model.stream_bytes, model.stream_done })),
|
|
1593
1603
|
});
|
|
1594
1604
|
}
|
|
1595
1605
|
|
|
@@ -1604,6 +1614,7 @@ fn imageSessionCommand(name: []const u8) ?ImageSessionMsg {
|
|
|
1604
1614
|
if (std.mem.eql(u8, name, "image.fetch-chain")) return .arm_fetch_chain;
|
|
1605
1615
|
if (std.mem.eql(u8, name, "image.file-chain")) return .arm_file_chain;
|
|
1606
1616
|
if (std.mem.eql(u8, name, "image.read-note")) return .read_note;
|
|
1617
|
+
if (std.mem.eql(u8, name, "image.stream-note")) return .stream_note;
|
|
1607
1618
|
if (std.mem.eql(u8, name, "image.cancel")) return .cancel_cover;
|
|
1608
1619
|
if (std.mem.eql(u8, name, "image.chatty")) return .start_chatty;
|
|
1609
1620
|
if (std.mem.eql(u8, name, "image.fetch-cover")) return .fetch_cover;
|
|
@@ -1778,6 +1789,104 @@ test "image loads record into the blob store (deduplicated) and replay byte-iden
|
|
|
1778
1789
|
try std.testing.expect(harness.runtime.registeredCanvasImage(23) == null);
|
|
1779
1790
|
}
|
|
1780
1791
|
|
|
1792
|
+
test "raised-budget photo load replays recorded dimensions under a smaller current budget" {
|
|
1793
|
+
const gpa = std.testing.allocator;
|
|
1794
|
+
const buffer = try std.heap.page_allocator.create(JournalBuffer);
|
|
1795
|
+
defer std.heap.page_allocator.destroy(buffer);
|
|
1796
|
+
buffer.len = 0;
|
|
1797
|
+
var store = session_blobs.MemoryBlobStore.init(gpa);
|
|
1798
|
+
defer store.deinit();
|
|
1799
|
+
|
|
1800
|
+
const recorder = try std.heap.page_allocator.create(session_record.SessionRecorder);
|
|
1801
|
+
defer std.heap.page_allocator.destroy(recorder);
|
|
1802
|
+
recorder.* = session_record.SessionRecorder.init(buffer.sink());
|
|
1803
|
+
recorder.blob_sink = store.sink();
|
|
1804
|
+
recorder.begin(.{ .platform_name = "test", .app_name = "image-session-demo", .window_width = 400, .window_height = 300 });
|
|
1805
|
+
|
|
1806
|
+
const record_harness = try core.TestHarness().create(gpa, .{ .size = geometry.SizeF.init(400, 300) });
|
|
1807
|
+
defer record_harness.destroy(gpa);
|
|
1808
|
+
record_harness.null_platform.gpu_surfaces = true;
|
|
1809
|
+
record_harness.null_platform.image_decode = true;
|
|
1810
|
+
core.Runtime.initAt(&record_harness.runtime, .{
|
|
1811
|
+
.platform = record_harness.null_platform.platform(),
|
|
1812
|
+
.trace_sink = record_harness.trace_sink.sink(),
|
|
1813
|
+
.max_image_pixel_bytes = canvas_limits.max_registered_canvas_image_pixel_bytes_ceiling,
|
|
1814
|
+
.environ = std.testing.environ,
|
|
1815
|
+
.session_recorder = recorder,
|
|
1816
|
+
});
|
|
1817
|
+
record_harness.runtime.dispatch_error_policy = .propagate;
|
|
1818
|
+
|
|
1819
|
+
const record_app = try gpa.create(ImageSessionApp);
|
|
1820
|
+
defer gpa.destroy(record_app);
|
|
1821
|
+
record_app.* = ImageSessionApp.init(std.heap.page_allocator, .{}, imageSessionOptions());
|
|
1822
|
+
defer record_app.deinit();
|
|
1823
|
+
record_app.effects.executor = .fake;
|
|
1824
|
+
const record_runtime_app = record_app.app();
|
|
1825
|
+
try record_harness.start(record_runtime_app);
|
|
1826
|
+
try record_harness.runtime.dispatchPlatformEvent(record_runtime_app, .{ .gpu_surface_frame = .{
|
|
1827
|
+
.label = image_canvas_label,
|
|
1828
|
+
.size = geometry.SizeF.init(400, 300),
|
|
1829
|
+
.scale_factor = 1,
|
|
1830
|
+
.frame_index = 1,
|
|
1831
|
+
.timestamp_ns = 1_000_000,
|
|
1832
|
+
} });
|
|
1833
|
+
|
|
1834
|
+
const width: usize = 640;
|
|
1835
|
+
const height: usize = 480;
|
|
1836
|
+
const pixels = try gpa.alloc(u8, width * height * 4);
|
|
1837
|
+
defer gpa.free(pixels);
|
|
1838
|
+
var pixel_offset: usize = 0;
|
|
1839
|
+
while (pixel_offset < pixels.len) : (pixel_offset += 4) pixels[pixel_offset..][0..4].* = .{ 31, 97, 211, 255 };
|
|
1840
|
+
const encoded_len = try canvas.png.encodedRgba8ByteLen(width, height);
|
|
1841
|
+
const encoded = try gpa.alloc(u8, encoded_len);
|
|
1842
|
+
defer gpa.free(encoded);
|
|
1843
|
+
var writer = std.Io.Writer.fixed(encoded);
|
|
1844
|
+
try canvas.png.writeRgba8(&writer, width, height, pixels);
|
|
1845
|
+
|
|
1846
|
+
try record_harness.runtime.dispatchPlatformEvent(record_runtime_app, .{ .menu_command = .{ .name = "image.cover", .window_id = 1 } });
|
|
1847
|
+
try record_app.effects.feedImageBytes(21, writer.buffered());
|
|
1848
|
+
try record_harness.runtime.dispatchPlatformEvent(record_runtime_app, .wake);
|
|
1849
|
+
try record_harness.runtime.dispatchPlatformEvent(record_runtime_app, .frame_requested);
|
|
1850
|
+
const recorded_model = record_app.model;
|
|
1851
|
+
const recorded_fingerprint = record_harness.runtime.sessionStateFingerprint();
|
|
1852
|
+
const recorded_pixels = record_harness.runtime.registeredCanvasImages()[0].pixels;
|
|
1853
|
+
const recorded_pixel_len = recorded_pixels.len;
|
|
1854
|
+
try std.testing.expectEqual(width, recorded_model.last_width);
|
|
1855
|
+
try std.testing.expectEqual(height, recorded_model.last_height);
|
|
1856
|
+
recorder.finish();
|
|
1857
|
+
try std.testing.expect(!recorder.failed);
|
|
1858
|
+
|
|
1859
|
+
const replay_harness = try core.TestHarness().create(gpa, .{ .size = geometry.SizeF.init(400, 300) });
|
|
1860
|
+
defer replay_harness.destroy(gpa);
|
|
1861
|
+
replay_harness.null_platform.gpu_surfaces = true;
|
|
1862
|
+
core.Runtime.initAt(&replay_harness.runtime, .{
|
|
1863
|
+
.platform = replay_harness.null_platform.platform(),
|
|
1864
|
+
.trace_sink = replay_harness.trace_sink.sink(),
|
|
1865
|
+
.environ = std.testing.environ,
|
|
1866
|
+
});
|
|
1867
|
+
replay_harness.runtime.dispatch_error_policy = .propagate;
|
|
1868
|
+
platform.installHeadlessImageCodec("null", &replay_harness.null_platform, &replay_harness.runtime.options.platform.services);
|
|
1869
|
+
const replay_app = try gpa.create(ImageSessionApp);
|
|
1870
|
+
defer gpa.destroy(replay_app);
|
|
1871
|
+
replay_app.* = ImageSessionApp.init(std.heap.page_allocator, .{}, imageSessionOptions());
|
|
1872
|
+
defer replay_app.deinit();
|
|
1873
|
+
|
|
1874
|
+
const report = try session_replay.replaySession(&replay_harness.runtime, replay_app.app(), buffer.journalBytes(), .{
|
|
1875
|
+
.verify = true,
|
|
1876
|
+
.require_same_platform = false,
|
|
1877
|
+
.blobs = store.source(),
|
|
1878
|
+
});
|
|
1879
|
+
try std.testing.expect(report.ok());
|
|
1880
|
+
try std.testing.expectEqualDeep(recorded_model, replay_app.model);
|
|
1881
|
+
try std.testing.expectEqual(recorded_fingerprint, replay_harness.runtime.sessionStateFingerprint());
|
|
1882
|
+
const replay_info = replay_harness.runtime.registeredCanvasImage(21).?;
|
|
1883
|
+
try std.testing.expectEqual(recorded_model.last_width, replay_app.model.last_width);
|
|
1884
|
+
try std.testing.expectEqual(recorded_model.last_height, replay_app.model.last_height);
|
|
1885
|
+
try std.testing.expect(replay_info.width * replay_info.height * 4 <= replay_harness.runtime.max_image_pixel_bytes);
|
|
1886
|
+
try std.testing.expect(replay_info.width < width or replay_info.height < height);
|
|
1887
|
+
try std.testing.expect(recorded_pixel_len != replay_harness.runtime.registeredCanvasImages()[0].pixels.len);
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1781
1890
|
/// Record the undelivered-window reference session: load id 21, feed
|
|
1782
1891
|
/// its bytes (terminal queued, slot `.draining`, delivery still
|
|
1783
1892
|
/// ahead), then — before any drain — an UNRELATED dispatch loads id
|
|
@@ -2522,6 +2631,77 @@ test "a same-key retry from a fetch or file terminal handler is accepted live an
|
|
|
2522
2631
|
try std.testing.expectEqual(recorded.fingerprint, harness.runtime.sessionStateFingerprint());
|
|
2523
2632
|
}
|
|
2524
2633
|
|
|
2634
|
+
test "a multi-megabyte file stream records through blobs and replays byte-identically" {
|
|
2635
|
+
const gpa = std.testing.allocator;
|
|
2636
|
+
const buffer = try std.heap.page_allocator.create(JournalBuffer);
|
|
2637
|
+
defer std.heap.page_allocator.destroy(buffer);
|
|
2638
|
+
buffer.len = 0;
|
|
2639
|
+
var store = session_blobs.MemoryBlobStore.init(gpa);
|
|
2640
|
+
defer store.deinit();
|
|
2641
|
+
|
|
2642
|
+
const recorder = try std.heap.page_allocator.create(session_record.SessionRecorder);
|
|
2643
|
+
defer std.heap.page_allocator.destroy(recorder);
|
|
2644
|
+
recorder.* = session_record.SessionRecorder.init(buffer.sink());
|
|
2645
|
+
recorder.blob_sink = store.sink();
|
|
2646
|
+
recorder.begin(.{ .platform_name = "test", .app_name = "file-stream-session", .window_width = 400, .window_height = 300 });
|
|
2647
|
+
|
|
2648
|
+
const harness = try core.TestHarness().create(gpa, .{ .size = geometry.SizeF.init(400, 300) });
|
|
2649
|
+
defer harness.destroy(gpa);
|
|
2650
|
+
harness.null_platform.gpu_surfaces = true;
|
|
2651
|
+
harness.runtime.options.session_recorder = recorder;
|
|
2652
|
+
const app_state = try gpa.create(ImageSessionApp);
|
|
2653
|
+
defer gpa.destroy(app_state);
|
|
2654
|
+
app_state.* = ImageSessionApp.init(std.heap.page_allocator, .{}, imageSessionOptions());
|
|
2655
|
+
defer app_state.deinit();
|
|
2656
|
+
app_state.effects.executor = .fake;
|
|
2657
|
+
const app = app_state.app();
|
|
2658
|
+
try harness.start(app);
|
|
2659
|
+
try harness.runtime.dispatchPlatformEvent(app, .{ .gpu_surface_frame = .{
|
|
2660
|
+
.label = image_canvas_label,
|
|
2661
|
+
.size = geometry.SizeF.init(400, 300),
|
|
2662
|
+
.scale_factor = 1,
|
|
2663
|
+
.frame_index = 1,
|
|
2664
|
+
.timestamp_ns = 1_000_000,
|
|
2665
|
+
} });
|
|
2666
|
+
try harness.runtime.dispatchPlatformEvent(app, .{ .menu_command = .{ .name = "image.stream-note", .window_id = 1 } });
|
|
2667
|
+
const stream_key: u64 = 27;
|
|
2668
|
+
const chunk = try gpa.alloc(u8, effects_mod.effect_file_stream_chunk_bytes);
|
|
2669
|
+
defer gpa.free(chunk);
|
|
2670
|
+
var total: u64 = 0;
|
|
2671
|
+
for (0..5) |chunk_index| {
|
|
2672
|
+
for (chunk, 0..) |*byte, index| byte.* = @truncate(index + chunk_index * 17);
|
|
2673
|
+
total += chunk.len;
|
|
2674
|
+
try app_state.effects.feedFileResultDetailed(.{ .key = stream_key, .op = .read_stream, .event = .chunk, .outcome = .ok, .bytes = chunk, .total = total });
|
|
2675
|
+
try harness.runtime.dispatchPlatformEvent(app, .wake);
|
|
2676
|
+
}
|
|
2677
|
+
try std.testing.expect(total > effects_mod.max_effect_file_bytes);
|
|
2678
|
+
try app_state.effects.feedFileResultDetailed(.{ .key = stream_key, .op = .read_stream, .event = .done, .outcome = .ok, .total = total });
|
|
2679
|
+
try harness.runtime.dispatchPlatformEvent(app, .wake);
|
|
2680
|
+
try harness.runtime.dispatchPlatformEvent(app, .frame_requested);
|
|
2681
|
+
recorder.finish();
|
|
2682
|
+
try std.testing.expect(!recorder.failed);
|
|
2683
|
+
try std.testing.expectEqual(@as(usize, 5), store.count);
|
|
2684
|
+
const recorded_model = app_state.model;
|
|
2685
|
+
const recorded_fingerprint = harness.runtime.sessionStateFingerprint();
|
|
2686
|
+
|
|
2687
|
+
const replay_harness = try core.TestHarness().create(gpa, .{ .size = geometry.SizeF.init(400, 300) });
|
|
2688
|
+
defer replay_harness.destroy(gpa);
|
|
2689
|
+
replay_harness.null_platform.gpu_surfaces = true;
|
|
2690
|
+
const replay_app = try gpa.create(ImageSessionApp);
|
|
2691
|
+
defer gpa.destroy(replay_app);
|
|
2692
|
+
replay_app.* = ImageSessionApp.init(std.heap.page_allocator, .{}, imageSessionOptions());
|
|
2693
|
+
defer replay_app.deinit();
|
|
2694
|
+
const report = try session_replay.replaySession(&replay_harness.runtime, replay_app.app(), buffer.journalBytes(), .{
|
|
2695
|
+
.verify = true,
|
|
2696
|
+
.require_same_platform = false,
|
|
2697
|
+
.blobs = store.source(),
|
|
2698
|
+
});
|
|
2699
|
+
try std.testing.expect(report.ok());
|
|
2700
|
+
try std.testing.expectEqual(@as(u64, 6), report.effects_fed);
|
|
2701
|
+
try std.testing.expectEqualDeep(recorded_model, replay_app.model);
|
|
2702
|
+
try std.testing.expectEqual(recorded_fingerprint, replay_harness.runtime.sessionStateFingerprint());
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2525
2705
|
/// Record the queue-saturation reference session: a chatty spawn and
|
|
2526
2706
|
/// an image load whose results journal as ONE unbroken run — 64 line
|
|
2527
2707
|
/// records (the completion queue's whole capacity) followed by the
|
|
@@ -2999,10 +3179,18 @@ test "an image record claiming dimensions on a non-loaded outcome refuses replay
|
|
|
2999
3179
|
try std.testing.expectError(error.ReplayDamagedRecord, result);
|
|
3000
3180
|
}
|
|
3001
3181
|
|
|
3002
|
-
test "an image record claiming .loaded past the
|
|
3003
|
-
//
|
|
3004
|
-
//
|
|
3005
|
-
const result = replayWithPatchedImageDims(.loaded,
|
|
3182
|
+
test "an image record claiming .loaded past the SDK ceiling refuses replay as damage" {
|
|
3183
|
+
// 2048x2048 RGBA8 is 16 MiB - past the largest registered-image slot
|
|
3184
|
+
// any conforming recording can accept.
|
|
3185
|
+
const result = replayWithPatchedImageDims(.loaded, 2048, 2048);
|
|
3186
|
+
try std.testing.expectError(error.ReplayDamagedRecord, result);
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
test "an image record claiming .loaded past the decoded-axis ceiling refuses replay as damage" {
|
|
3190
|
+
// Source metadata may exceed this ceiling, but every conforming host fits
|
|
3191
|
+
// it before registration and therefore before these result dimensions are
|
|
3192
|
+
// journaled.
|
|
3193
|
+
const result = replayWithPatchedImageDims(.loaded, platform.max_decoded_image_dimension + 1, 1);
|
|
3006
3194
|
try std.testing.expectError(error.ReplayDamagedRecord, result);
|
|
3007
3195
|
}
|
|
3008
3196
|
|
|
@@ -278,6 +278,18 @@ test "runtime materializes manifest shell windows into laid out views" {
|
|
|
278
278
|
const window = try harness.runtime.createShellWindow(shell_window, platform.WebViewSource.html("<h1>Shell</h1>"));
|
|
279
279
|
try std.testing.expectEqual(@as(platform.WindowId, 2), window.id);
|
|
280
280
|
try std.testing.expectEqualStrings("shell", window.label);
|
|
281
|
+
try std.testing.expectEqual(platform.WindowInitialPlacement.default, harness.null_platform.window_placement[1]);
|
|
282
|
+
try std.testing.expectEqual(platform.WindowRestorePolicy.center_on_primary, harness.null_platform.window_restore_policy[1]);
|
|
283
|
+
|
|
284
|
+
const positioned = try harness.runtime.createShellWindow(.{
|
|
285
|
+
.label = "positioned",
|
|
286
|
+
.x = 96,
|
|
287
|
+
.y = 144,
|
|
288
|
+
.views = &.{},
|
|
289
|
+
}, platform.WebViewSource.html("<h1>Positioned</h1>"));
|
|
290
|
+
try std.testing.expectEqual(@as(f32, 96), positioned.frame.x);
|
|
291
|
+
try std.testing.expectEqual(@as(f32, 144), positioned.frame.y);
|
|
292
|
+
try std.testing.expectEqual(platform.WindowInitialPlacement.explicit, harness.null_platform.window_placement[2]);
|
|
281
293
|
|
|
282
294
|
var views_buffer: [13]platform.ViewInfo = undefined;
|
|
283
295
|
const views = harness.runtime.listViews(window.id, &views_buffer);
|
package/src/runtime/state.zig
CHANGED
|
@@ -88,6 +88,16 @@ pub const RuntimeTrayItem = struct {
|
|
|
88
88
|
key_storage: [platform.max_menu_key_bytes]u8 = undefined,
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
pub const RuntimeStatusItem = struct {
|
|
92
|
+
id: platform.StatusItemId = 0,
|
|
93
|
+
active: bool = false,
|
|
94
|
+
visible: bool = true,
|
|
95
|
+
title: []const u8 = "",
|
|
96
|
+
title_storage: [platform.max_tray_title_bytes]u8 = undefined,
|
|
97
|
+
items: [platform.max_tray_items]RuntimeTrayItem = undefined,
|
|
98
|
+
item_count: usize = 0,
|
|
99
|
+
};
|
|
100
|
+
|
|
91
101
|
pub const ShellApplyMode = enum {
|
|
92
102
|
create,
|
|
93
103
|
update,
|
|
@@ -26,8 +26,14 @@ const validateRevealPath = validation.validateRevealPath;
|
|
|
26
26
|
const validateSaveDialogOptions = validation.validateSaveDialogOptions;
|
|
27
27
|
const validateTrayMenuItems = validation.validateTrayMenuItems;
|
|
28
28
|
const validateTrayOptions = validation.validateTrayOptions;
|
|
29
|
+
const validateTrayShell = validation.validateTrayShell;
|
|
29
30
|
const validateTrayTitle = validation.validateTrayTitle;
|
|
30
31
|
|
|
32
|
+
fn optionalNotificationString(payload: []const u8, field: []const u8, storage: *json.StringStorage) ![]const u8 {
|
|
33
|
+
if (json.fieldValue(payload, field) == null) return "";
|
|
34
|
+
return jsonStringField(payload, field, storage) orelse error.InvalidNotificationOptions;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
pub fn RuntimeSystemServices(comptime Runtime: type) type {
|
|
32
38
|
return struct {
|
|
33
39
|
pub fn readClipboard(self: *Runtime, buffer: []u8) anyerror![]const u8 {
|
|
@@ -136,58 +142,113 @@ pub fn RuntimeSystemServices(comptime Runtime: type) type {
|
|
|
136
142
|
return self.options.platform.services.formatLocalTime(timestamp_ms, style, buffer);
|
|
137
143
|
}
|
|
138
144
|
|
|
139
|
-
pub fn
|
|
145
|
+
pub fn createStatusItem(self: *Runtime, status_item_id: platform.StatusItemId, options: platform.TrayOptions) anyerror!void {
|
|
146
|
+
try validation.validateStatusItemId(status_item_id);
|
|
140
147
|
try validateTrayOptions(options);
|
|
141
|
-
try self
|
|
142
|
-
|
|
148
|
+
const status_item = try statusItemSlot(self, status_item_id);
|
|
149
|
+
const was_active = status_item.active;
|
|
150
|
+
try self.options.platform.services.createStatusItem(status_item_id, options);
|
|
151
|
+
try storeTrayItems(status_item, options.items);
|
|
143
152
|
const title = if (options.presentation.title.len > 0) options.presentation.title else options.title;
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
status_item.title = try copyInto(&status_item.title_storage, title);
|
|
154
|
+
status_item.id = status_item_id;
|
|
155
|
+
status_item.active = true;
|
|
156
|
+
status_item.visible = options.visible;
|
|
157
|
+
if (!was_active) self.status_item_count += 1;
|
|
146
158
|
}
|
|
147
159
|
|
|
148
|
-
pub fn
|
|
160
|
+
pub fn createTray(self: *Runtime, options: platform.TrayOptions) anyerror!void {
|
|
161
|
+
return self.createStatusItem(platform.primary_status_item_id, options);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
pub fn updateStatusItemShell(self: *Runtime, status_item_id: platform.StatusItemId, shell: platform.TrayShell) anyerror!void {
|
|
165
|
+
try validation.validateStatusItemId(status_item_id);
|
|
166
|
+
try validateTrayShell(shell);
|
|
167
|
+
const status_item = findStatusItem(self, status_item_id) orelse return error.InvalidTrayOptions;
|
|
168
|
+
try self.options.platform.services.updateStatusItemShell(status_item_id, shell);
|
|
169
|
+
status_item.visible = shell.visible;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
pub fn updateStatusItemMenu(self: *Runtime, status_item_id: platform.StatusItemId, items: []const platform.TrayMenuItem) anyerror!void {
|
|
173
|
+
try validation.validateStatusItemId(status_item_id);
|
|
149
174
|
try validateTrayMenuItems(items);
|
|
150
|
-
|
|
151
|
-
try
|
|
175
|
+
const status_item = findStatusItem(self, status_item_id) orelse return error.InvalidTrayOptions;
|
|
176
|
+
try self.options.platform.services.updateStatusItemMenu(status_item_id, items);
|
|
177
|
+
try storeTrayItems(status_item, items);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
pub fn updateTrayMenu(self: *Runtime, items: []const platform.TrayMenuItem) anyerror!void {
|
|
181
|
+
return self.updateStatusItemMenu(platform.primary_status_item_id, items);
|
|
152
182
|
}
|
|
153
183
|
|
|
154
184
|
/// Retitle the live status-bar button without re-creating the
|
|
155
185
|
/// status item (a model-driven badge like "3 open" in the menu
|
|
156
186
|
/// bar rides this seam). Platforms without the
|
|
157
187
|
/// title seam report `UnsupportedService`; the menu keeps working.
|
|
158
|
-
pub fn
|
|
188
|
+
pub fn updateStatusItemTitle(self: *Runtime, status_item_id: platform.StatusItemId, title: []const u8) anyerror!void {
|
|
189
|
+
try validation.validateStatusItemId(status_item_id);
|
|
159
190
|
try validateTrayTitle(title);
|
|
160
|
-
|
|
161
|
-
|
|
191
|
+
const status_item = findStatusItem(self, status_item_id) orelse return error.InvalidTrayOptions;
|
|
192
|
+
try self.options.platform.services.updateStatusItemTitle(status_item_id, title);
|
|
193
|
+
status_item.title = try copyInto(&status_item.title_storage, title);
|
|
162
194
|
}
|
|
163
195
|
|
|
164
|
-
pub fn
|
|
196
|
+
pub fn updateTrayTitle(self: *Runtime, title: []const u8) anyerror!void {
|
|
197
|
+
return self.updateStatusItemTitle(platform.primary_status_item_id, title);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
pub fn updateStatusItemPresentation(self: *Runtime, status_item_id: platform.StatusItemId, presentation: platform.TrayPresentation) anyerror!void {
|
|
201
|
+
try validation.validateStatusItemId(status_item_id);
|
|
165
202
|
try validation.validateTrayPresentation(presentation);
|
|
166
|
-
|
|
167
|
-
|
|
203
|
+
const status_item = findStatusItem(self, status_item_id) orelse return error.InvalidTrayOptions;
|
|
204
|
+
try self.options.platform.services.updateStatusItemPresentation(status_item_id, presentation);
|
|
205
|
+
status_item.title = try copyInto(&status_item.title_storage, presentation.title);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
pub fn updateTrayPresentation(self: *Runtime, presentation: platform.TrayPresentation) anyerror!void {
|
|
209
|
+
return self.updateStatusItemPresentation(platform.primary_status_item_id, presentation);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
pub fn removeStatusItem(self: *Runtime, status_item_id: platform.StatusItemId) anyerror!void {
|
|
213
|
+
try validation.validateStatusItemId(status_item_id);
|
|
214
|
+
const status_item = findStatusItem(self, status_item_id) orelse return;
|
|
215
|
+
try self.options.platform.services.removeStatusItem(status_item_id);
|
|
216
|
+
status_item.* = .{};
|
|
217
|
+
self.status_item_count -= 1;
|
|
168
218
|
}
|
|
169
219
|
|
|
170
220
|
pub fn removeTray(self: *Runtime) anyerror!void {
|
|
171
|
-
|
|
172
|
-
self.tray_item_count = 0;
|
|
173
|
-
self.tray_created = false;
|
|
174
|
-
self.tray_title = "";
|
|
221
|
+
return self.removeStatusItem(platform.primary_status_item_id);
|
|
175
222
|
}
|
|
176
223
|
|
|
177
|
-
pub fn
|
|
178
|
-
|
|
224
|
+
pub fn statusItemExists(self: *const Runtime, status_item_id: platform.StatusItemId) bool {
|
|
225
|
+
return findStatusItemConst(self, status_item_id) != null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
pub fn statusItemMenuItemExists(self: *const Runtime, status_item_id: platform.StatusItemId, item_id: platform.TrayItemId) bool {
|
|
229
|
+
const status_item = findStatusItemConst(self, status_item_id) orelse return false;
|
|
230
|
+
for (status_item.items[0..status_item.item_count]) |item| {
|
|
179
231
|
if (item.id == item_id) return true;
|
|
180
232
|
}
|
|
181
233
|
return false;
|
|
182
234
|
}
|
|
183
235
|
|
|
184
|
-
pub fn
|
|
185
|
-
|
|
236
|
+
pub fn trayItemExists(self: *const Runtime, item_id: platform.TrayItemId) bool {
|
|
237
|
+
return self.statusItemMenuItemExists(platform.primary_status_item_id, item_id);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
pub fn statusItemCommandNameForItem(self: *const Runtime, status_item_id: platform.StatusItemId, item_id: platform.TrayItemId) []const u8 {
|
|
241
|
+
const status_item = findStatusItemConst(self, status_item_id) orelse return "tray.action";
|
|
242
|
+
for (status_item.items[0..status_item.item_count]) |item| {
|
|
186
243
|
if (item.id == item_id and item.command.len > 0) return item.command;
|
|
187
244
|
}
|
|
188
245
|
return "tray.action";
|
|
189
246
|
}
|
|
190
247
|
|
|
248
|
+
pub fn trayCommandNameForItem(self: *const Runtime, item_id: platform.TrayItemId) []const u8 {
|
|
249
|
+
return self.statusItemCommandNameForItem(platform.primary_status_item_id, item_id);
|
|
250
|
+
}
|
|
251
|
+
|
|
191
252
|
pub fn supportsFeatureFromJson(self: *Runtime, payload: []const u8, output: []u8) ![]const u8 {
|
|
192
253
|
var scratch: [64]u8 = undefined;
|
|
193
254
|
var storage = json.StringStorage.init(&scratch);
|
|
@@ -270,12 +331,21 @@ pub fn RuntimeSystemServices(comptime Runtime: type) type {
|
|
|
270
331
|
pub fn showNotificationFromJson(self: *Runtime, payload: []const u8, output: []u8) ![]const u8 {
|
|
271
332
|
var storage = json.StringStorage.init(output);
|
|
272
333
|
const title = jsonStringField(payload, "title", &storage) orelse return error.InvalidNotificationOptions;
|
|
273
|
-
const subtitle =
|
|
274
|
-
const body =
|
|
334
|
+
const subtitle = try optionalNotificationString(payload, "subtitle", &storage);
|
|
335
|
+
const body = if (json.fieldValue(payload, "body") != null)
|
|
336
|
+
try optionalNotificationString(payload, "body", &storage)
|
|
337
|
+
else
|
|
338
|
+
try optionalNotificationString(payload, "message", &storage);
|
|
339
|
+
const notification_id = try optionalNotificationString(payload, "id", &storage);
|
|
340
|
+
const action_label = try optionalNotificationString(payload, "actionLabel", &storage);
|
|
341
|
+
const action_command = try optionalNotificationString(payload, "actionCommand", &storage);
|
|
275
342
|
try self.showNotification(.{
|
|
343
|
+
.id = notification_id,
|
|
276
344
|
.title = title,
|
|
277
345
|
.subtitle = subtitle,
|
|
278
346
|
.body = body,
|
|
347
|
+
.action_label = action_label,
|
|
348
|
+
.action_command = action_command,
|
|
279
349
|
});
|
|
280
350
|
return writeTrueJson(output);
|
|
281
351
|
}
|
|
@@ -398,20 +468,43 @@ pub fn RuntimeSystemServices(comptime Runtime: type) type {
|
|
|
398
468
|
};
|
|
399
469
|
}
|
|
400
470
|
|
|
401
|
-
fn storeTrayItems(
|
|
402
|
-
|
|
471
|
+
fn storeTrayItems(status_item: anytype, items: []const platform.TrayMenuItem) !void {
|
|
472
|
+
status_item.item_count = 0;
|
|
403
473
|
for (items, 0..) |item, index| {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
474
|
+
status_item.items[index].id = item.id;
|
|
475
|
+
status_item.items[index].command = try copyInto(&status_item.items[index].command_storage, item.command);
|
|
476
|
+
status_item.items[index].label = try copyInto(&status_item.items[index].label_storage, item.label);
|
|
477
|
+
status_item.items[index].detail = try copyInto(&status_item.items[index].detail_storage, item.detail);
|
|
478
|
+
status_item.items[index].separator = item.separator;
|
|
479
|
+
status_item.items[index].enabled = item.enabled;
|
|
480
|
+
status_item.items[index].role = item.role;
|
|
481
|
+
status_item.items[index].key = try copyInto(&status_item.items[index].key_storage, item.key);
|
|
482
|
+
status_item.items[index].modifiers = item.modifiers;
|
|
483
|
+
}
|
|
484
|
+
status_item.item_count = items.len;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
fn findStatusItem(self: anytype, status_item_id: platform.StatusItemId) ?@TypeOf(&self.status_items[0]) {
|
|
488
|
+
for (&self.status_items) |*status_item| {
|
|
489
|
+
if (status_item.active and status_item.id == status_item_id) return status_item;
|
|
490
|
+
}
|
|
491
|
+
return null;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
fn findStatusItemConst(self: anytype, status_item_id: platform.StatusItemId) ?@TypeOf(&self.status_items[0]) {
|
|
495
|
+
for (&self.status_items) |*status_item| {
|
|
496
|
+
if (status_item.active and status_item.id == status_item_id) return status_item;
|
|
497
|
+
}
|
|
498
|
+
return null;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
fn statusItemSlot(self: anytype, status_item_id: platform.StatusItemId) !@TypeOf(&self.status_items[0]) {
|
|
502
|
+
if (findStatusItem(self, status_item_id)) |status_item| return status_item;
|
|
503
|
+
if (self.status_item_count >= self.status_items.len) return error.InvalidTrayOptions;
|
|
504
|
+
for (&self.status_items) |*status_item| {
|
|
505
|
+
if (!status_item.active) return status_item;
|
|
413
506
|
}
|
|
414
|
-
|
|
507
|
+
return error.InvalidTrayOptions;
|
|
415
508
|
}
|
|
416
509
|
|
|
417
510
|
fn validateExternalUrl(self: anytype, url: []const u8) !void {
|