ci: consolidate platform pipelines and test prerequisites on macOS support
PR and Push Build/Test / windows-build-and-test (push) Failing after 38m25s
PR and Push Build/Test / portable-build-and-test (push) Successful in 8m9s
PR and Push Build/Test / macos-native-full (push) Skipped

This commit is contained in:
dh committed 2026-10-06 09:02:19 +02:00
1 parent 1b19b08f2e
commit 728e66dd72
76 files changed
+7477 -239

No files matched your search

@@ -1,5 +1,6 @@
using System.Text.Json;
using MeetingAssistant.Calendar;
using MeetingAssistant.Notifications;
using MeetingAssistant.MeetingNotes;
using MeetingAssistant.Screenshots;
using MeetingAssistant.Transcription;
@@ -362,33 +363,30 @@ internal sealed class MacOsCalendarMeetingProvider : ICalendarMeetingProvider
}
}
internal sealed class MacOsMeetingStartPromptService : IMeetingStartPromptService
internal sealed class MacOsMeetingStartPromptService(
DesktopUserRequestStore requests, TimeProvider timeProvider) : IMeetingStartPromptService
{
private readonly IMacOsMeetingPromptClient client;
private readonly ILogger<MacOsMeetingStartPromptService> logger;
public MacOsMeetingStartPromptService(
IMacOsMeetingPromptClient client,
ILogger<MacOsMeetingStartPromptService> logger)
{
this.client = client;
this.logger = logger;
}
public async Task ShowPromptAsync(
MeetingStartPromptRequest request,
public Task ShowPromptAsync(MeetingStartPromptRequest request,
Func<MeetingStartPromptResponse, CancellationToken, Task> handleResponseAsync,
CancellationToken cancellationToken)
{
try
{
var response = await client.ShowMeetingStartPromptAsync(request, cancellationToken);
await handleResponseAsync(response, cancellationToken);
}
catch (Exception exception) when (exception is not OperationCanceledException)
{
logger.LogError(exception, "Failed to display native macOS meeting-start prompt");
}
cancellationToken.ThrowIfCancellationRequested();
var timeout = request.Meeting.End - timeProvider.GetUtcNow();
if (timeout <= TimeSpan.Zero) return Task.CompletedTask;
if (timeout > TimeSpan.FromMinutes(5)) timeout = TimeSpan.FromMinutes(5);
var actions = new List<DesktopRequestAction> { new("record", "Record"), new("skip", "Skip") };
if (request.CanAttachToCurrentMeeting) actions.Add(new("attach-metadata", "Add metadata to current meeting"));
requests.Add(new DesktopUserRequestSpec(
"meeting-start", "Record meeting?",
$"{request.Meeting.Subject} starts at {request.Meeting.Start.LocalDateTime:t}.",
timeout, actions), cancellationToken,
(action, token) => handleResponseAsync(action switch
{
"record" => MeetingStartPromptResponse.Record,
"attach-metadata" => MeetingStartPromptResponse.AttachMetadataToCurrentMeeting,
_ => MeetingStartPromptResponse.Skip
}, token));
return Task.CompletedTask;
}
}